Forums

torchtext

PythonAnywhere includes many PyTorch packages but not torchtext. And when I try to install torchtext, it pulls in a newer version of torch than what's already installed:

pip3.10 install --user torchtext
Collecting torch==1.12.1
Downloading torch-1.12.1-cp310-cp310-manylinux1_x86_64.whl (776.3 MB)
Installing collected packages: torch, torchtext
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This 
behaviour is the source of the following dependency conflicts.
 torchvision 0.12.0+cpu requires torch==1.11.0, but you have torch 1.12.1 which is incompatible.
 torchaudio 0.11.0+rocm4.5.2 requires torch==1.11.0, but you have torch 1.12.1 which is incompatible.
Successfully installed torch-1.12.1 torchtext-0.13.1

So, this newer version of torch breaks torchvision and torchaudio which depended on the older version. Does someone know enough about Python package versioning to help me out?

You can either install older version of torchtext or install newer versions of torchaudio and torchvision

Thank you! I managed to get things to install but I ran into other issues with using PyTorch. I will keep debugging.

I'm getting the same issues. I need this to work so I can have ai driven NPC's in my game.

17:47 ~/lightwoodstudio $ pip3.9 install openchat --user openchat-install.log                                                                                                 
Looking in links: /usr/share/pip-wheels
Collecting openchat
  Using cached openchat-1.1.12-py3-none-any.whl (28 kB)
ERROR: Could not find a version that satisfies the requirement openchat-install.log (from versions: none)
ERROR: No matching distribution found for openchat-install.log
17:47 ~/lightwoodstudio $ pip3.9 install openchat --user > /tmp/openchat-install.log
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchvision 0.13.1 requires torch==1.12.1, but you have torch 1.13.0 which is incompatible.
torchaudio 0.12.1 requires torch==1.12.1, but you have torch 1.13.0 which is incompatible.
pelican 4.6.0 requires docutils>=0.16, but you have docutils 0.15.2 which is incompatible.
google-api-python-client 1.12.8 requires google-api-core<2dev,>=1.21.0, but you have google-api-core 2.10.2 which is incompatible.
17:57 ~/lightwoodstudio $ pip3.9 install torch==1.12.1 --user >/tmp/openchat-install.log                                                                                      
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchtext 0.14.0 requires torch==1.13.0, but you have torch 1.12.1 which is incompatible.
18:08 ~/lightwoodstudio $ pip3.9 install openchat==1.1.11 --user > /tmp/openchat-install.log                                                                                  
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchvision 0.13.1 requires torch==1.12.1, but you have torch 1.13.0 which is incompatible.
torchaudio 0.12.1 requires torch==1.12.1, but you have torch 1.13.0 which is incompatible.

This for the email notification on a reply.

Btw - something else that I've noticed is that on Bash its running Python 3.6 but my Python version is 3.9?

It looks like the packages you're installing need older versions of torch than the one than you have installed yourself; try specifying the exact version that you want on the pip command line -- that is:

pip3.9 install --user openchat==1.1.11 torch==1.12.1

Regarding your question about Bash -- when you say that on Bash it's running 3.6, but your Python version is 3.9, could you clarify exactly what you mean by the first bit? python3.9 will always run version 3.9. If you want to change what gets run when you type python with no version number, you can do that from the "System image" tab of the "Account" page.

Hi Giles, I'll give that a go, thanks.

Yeah, when I was opening up Bash from the "Open Bash Console here" link it was running 3.6, but it's now running 3.9. I thought that was odd. Have a great day. :-)

OK -- just let us know how you get on with that pip3.9 command :-)