[GH-ISSUE #394] Ollama on VMware Photon OS #77855

Closed
opened 2026-05-08 19:56:25 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @dcasota on GitHub (Aug 22, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/394

Hi,

I'm tinkering with Ollama on VMware Photon OS.

The langchain example works, but the langchain-document example not.

This is ok

tdnf update -y
tdnf install -y git go build-essential

git clone https://github.com/jmorganca/ollama
cd ollama
go build .

tdnf install -y python3-pip

pip3 install -r examples/langchain/requirements.txt


./ollama serve &
./ollama pull llama2
python examples/langchain/main.py

Photon OS 5.0 comes with python 3.11. Actually seems to be an issue for tensorflow-macos.

pip3 install -r examples/langchain-document/requirements.txt

[...]
Collecting tensorflow-hub==0.14.0
  Downloading tensorflow_hub-0.14.0-py2.py3-none-any.whl (90 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.3/90.3 kB 9.2 MB/s eta 0:00:00
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement tensorflow-macos==2.13.0 (from versions: none)
ERROR: No matching distribution found for tensorflow-macos==2.13.0

The workaround using an older python version seems difficult as well.

# Built-in python3-pip (3.11) actually is not compatible with langchain-document' requirements.txt
tdnf remove -y python*

tdnf install -y zip unzip zlib-devel openssl-devel libffi-devel bazel sqlite sqlite-devel ncurses-devel gdbm-devel bzip2-devel 
curl -J -L -O https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz
tar -xzvf Python-3.9.17.tgz
cd ./Python-3.9.17/
./configure
make
make install
export PATH=/root/Python-3.9.17/:$PATH
./python setup.py install

curl -J -L -O https://bootstrap.pypa.io/get-pip.py
./python get-pip.py
pip install setuptools --force
cd ..

python -m venv .venv
source .venv/bin/activate

git clone https://github.com/jmorganca/ollama
cd ollama
go build .


pip install -r examples/langchain/requirements.txt

pip install unstructured
pip install pdf2image
pip install pdfminer
pip install pdfminer.six
pip install pyproject.toml
pip install pysqlite3
pip install gpt4all
pip install chromadb
pip install tensorflow
pip install -r examples/langchain-document/requirements.txt

Does langchain-document work on other distros? which python version?

Originally created by @dcasota on GitHub (Aug 22, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/394 Hi, I'm tinkering with Ollama on VMware Photon OS. The langchain example works, but the langchain-document example not. This is ok ``` tdnf update -y tdnf install -y git go build-essential git clone https://github.com/jmorganca/ollama cd ollama go build . tdnf install -y python3-pip pip3 install -r examples/langchain/requirements.txt ./ollama serve & ./ollama pull llama2 python examples/langchain/main.py ``` Photon OS 5.0 comes with python 3.11. Actually seems to be an issue for tensorflow-macos. ``` pip3 install -r examples/langchain-document/requirements.txt [...] Collecting tensorflow-hub==0.14.0 Downloading tensorflow_hub-0.14.0-py2.py3-none-any.whl (90 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.3/90.3 kB 9.2 MB/s eta 0:00:00 ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11 ERROR: Could not find a version that satisfies the requirement tensorflow-macos==2.13.0 (from versions: none) ERROR: No matching distribution found for tensorflow-macos==2.13.0 ``` The workaround using an older python version seems difficult as well. ``` # Built-in python3-pip (3.11) actually is not compatible with langchain-document' requirements.txt tdnf remove -y python* tdnf install -y zip unzip zlib-devel openssl-devel libffi-devel bazel sqlite sqlite-devel ncurses-devel gdbm-devel bzip2-devel curl -J -L -O https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz tar -xzvf Python-3.9.17.tgz cd ./Python-3.9.17/ ./configure make make install export PATH=/root/Python-3.9.17/:$PATH ./python setup.py install curl -J -L -O https://bootstrap.pypa.io/get-pip.py ./python get-pip.py pip install setuptools --force cd .. python -m venv .venv source .venv/bin/activate git clone https://github.com/jmorganca/ollama cd ollama go build . pip install -r examples/langchain/requirements.txt pip install unstructured pip install pdf2image pip install pdfminer pip install pdfminer.six pip install pyproject.toml pip install pysqlite3 pip install gpt4all pip install chromadb pip install tensorflow pip install -r examples/langchain-document/requirements.txt ``` Does langchain-document work on other distros? which python version?
Author
Owner

@mchiang0610 commented on GitHub (Aug 22, 2023):

Hey @dcasota thanks for submitting this. Since this looks like an issue with one of the dependencies of that example on Photon OS, I'm not sure how we can resolve it on the Ollama side.

Closing this for now, but happy to discuss more on the discord to resolve this -- https://discord.com/invite/ollama

<!-- gh-comment-id:1689069347 --> @mchiang0610 commented on GitHub (Aug 22, 2023): Hey @dcasota thanks for submitting this. Since this looks like an issue with one of the dependencies of that example on Photon OS, I'm not sure how we can resolve it on the Ollama side. Closing this for now, but happy to discuss more on the discord to resolve this -- https://discord.com/invite/ollama
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#77855