英文:
Install torchtext with pytorch 1.13.1 with cuda 11.7
问题
I currently have PyTorch 1.13.1 with CUDA 11.7 installed and it's working perfectly fine. However, when I try to install TorchText using 'pip install torchtext', it automatically installs PyTorch 2 which causes issues with my existing code that relies on PyTorch 1.13.1 with CUDA 11.7.
When I attempt to install an older version of TorchText, such as 0.14.0, it automatically uninstalls my current version of PyTorch and installs PyTorch 1.13.0 without GPU support.
Is there a way for me to install TorchText without upgrading my PyTorch version and while keeping my CUDA and PyTorch installations intact?
英文:
I currently have PyTorch 1.13.1 with CUDA 11.7 installed and it's working perfectly fine. However, when I try to install TorchText using 'pip install torchtext', it automatically installs PyTorch 2 which causes issues with my existing code that relies on PyTorch 1.13.1 with CUDA 11.7.
When I attempt to install an older version of TorchText, such as 0.14.0, it automatically uninstalls my current version of PyTorch and installs PyTorch 1.13.0 without GPU support.
Is there a way for me to install TorchText without upgrading my PyTorch version and while keeping my CUDA and PyTorch installations intact?
答案1
得分: 2
你可以尝试安装
pip install torchtext==0.14.0 --no-deps
它依赖于Pytorch 1.13.0
,而你已经安装了1.13.1
,所以应该可以正常工作。
如果不起作用,很可能需要降级Pytorch
pip3 install -U torch==1.13.0+cu117 torchtext==0.14.0 --extra-index-url https://download.pytorch.org/whl/cu117
英文:
You can try
pip install torchtext==0.14.0 --no-deps
It depends on Pytorch 1.13.0
and you already have 1.13.1
installed so it should work fine.
If it does not work, you will most probably need to downgrade Pytorch
pip3 install -U torch==1.13.0+cu117 torchtext==0.14.0 --extra-index-url https://download.pytorch.org/whl/cu117
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论