There are some lib in my environment. I need to install torchaudio. But I can't find torchaudio version ending with a0.
torch 1.9.0a0+2ecb2c7
torchtext 0.10.0a0
torchvision 0.9.0a0
Related
I am trying to install imageai in Python3.10. It is installed but when I import the module imageai, it requires installing pytorch and torchvision:
Dependency error!!! PyTorch and TorchVision are not installed. Please see installation instructions in the documentation https://imageai.readthedocs.io/
I installed Pytorch and Torchvision using the below commands in CMD:
pip3.10 install torch pip3.10 install torchvision
Yet I receive the above dependency error when I import imageai. Any idea?
I had the same problem. Try to use the exact versions of the dependencies listed in the instructions of imageai.
I have uninstalled all modules first, then installed with the exact versions and the problem is solved.
I am using python 3.8.5.
I hope this works with you also.
I am working on Compute Canada.
I am trying to install torch >= 1.7.1 because when my code has import torch but it fails even though I installed pytorch already in my conda environment and it is version 1.10.1.
I tried pip install torch >= 1.7.1, and this response
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
Answering to:
I am trying to install torch >= 1.17
There is no pytorch version >= 1.17. The latest version is 1.10.2.
my code has import torch but it fails even though I installed pytorch already in my conda environment
This is the issue that you should address instead. There is similar issues like this here on SO, but they usually are caused by the fact that you are running your code with a python interpreter that is different from the conda env that you have installed torch to.
Whenever I try to move a variable to cuda in pytorch (e.g. torch.zeros(1).cuda(), I get the error message "AssertionError: Torch not compiled with CUDA enabled". Besides,torch.cuda.is_available() returns False.
I have read several answers to approaching this error but for some reason several attempts to reinstall cuda and putorch didn't change anything. Here are some of the settings I used:
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
conda install pytorch torchvision cudatoolkit=11 -c pytorch-nightly
conda install pytorch torchvision cudatoolkit=9.0 -c pytorch
Yet the same error remains. What could be the issue?
Some settings:
I'm using Ubuntu 20.04, GPU is RTX 2080, nvidia-smi works fine (NVIDIA-SMI 460.91.03, Driver Version: 460.91.03, (max possible) CUDA Version: 11.2)
Try installing with pip
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
You can go through this thread for detailed explanations
Pytorch for cuda 11.2
I am using jetson NX xavier kit having cuda 10.2.89, open Cv 4.1.1 and tensorRT 7.1.3 . Trying to install pytorch. Tried installing with this line
conda install pytorch torchvision cpuonly -c pytorch
but when i write this line
import torch
It throws an error by saying that module not installed.
How I can verify if pytorch has been installed correctly.
Try this one
conda install -c pytorch pytorch
After executing this command, you need to enter yes(if prompted in the command line) for installing all the related packages. If there is no conflict while installing the libraries, the PyTorch library will be installed.
To check if it is properly installed or not, type the command python in your command line and type import torch to check if it is properly installed or not.
I have installed cpuonly pytorch and torchvision in anaconda. But when i try to import torchvision i get the following error.
ImportError: cannot import name 'Optional' from 'torch.jit.annotations'(C:\Users\MSI\Anaconda3\lib\site-packages\torch\jit\annotations.py)
How can i fix this?
Not sure if you are installing the correct versions of the libraries. This combination seems to work:
conda create --name test5 python=3.6
conda install -c pytorch pytorch torchvision cpuonly
python
>>> import torchvision