Steps to reproduce:
I am using Anaconda on Windows to set up environment for this repo.
conda create --name pytorch-yolo
Then I install all dependencies with conda install --file requirements.txt
Which returns
PackagesNotFoundError: The following packages are not available from current channels:
- torch[version='>=1.2']
So I install pytorch with conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
When I am trying to evaluate the model from the following repo: https://github.com/eriklindernoren/PyTorch-YOLOv3 with python3 test.py --weights_path weights/yolov3.weights
inside conda environment, it returns the following error ModuleNotFoundError: No module named 'torch'
If I run a Jupyter lab or notebook, or even go with python inside conda terminal, torch is easily imported.
What I've already tried:
Almost everything from this thread: No module named "Torch"
Specifically, creating a new conda environment with python set to 3.8.2, installing torch to base and then to the environment.
I'm also using pyenv to set global python to 3.8.2, but that doesn't help at all.
conda list
shows I have pytorch installed
Can't wrap my head around this issue.