Shmuma / ptan

PyTorch Agent Net: reinforcement learning toolkit for pytorch
MIT License
530 stars 164 forks source link

Can not install ptan because of Pytorch version #42

Closed furkanyorulmaz closed 4 years ago

furkanyorulmaz commented 4 years ago

Hello, first of all thank you very much for your deep rl book. When I try to install ptan I get the following error. I get the error that Pytorch's version does not fit. As far as I can see pytorch == 1.3.0 has been removed. What should I do?

My Pytorch and torchvison version are:

pip install ptan==0.6

Collecting ptan==0.6 Using cached ptan-0.6.tar.gz (19 kB) ERROR: Could not find a version that satisfies the requirement torch==1.3.0 (from ptan==0.6) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 1.4.0, 1.5.0, 1.5.1, 1.6.0) ERROR: No matching distribution found for torch==1.3.0 (from ptan==0.6) Note: you may need to restart the kernel to use updated packages.

Shmuma commented 4 years ago

Hi! I think the best way will be to pre-install pytorch from conda using conda install -c pytorch pytorch==1.3.0. Then pip install should work smoothly

furkanyorulmaz commented 4 years ago

Hi! I think the best way will be to pre-install pytorch from conda using conda install -c pytorch pytorch==1.3.0. Then pip install should work smoothly

Thank you! I did as you said but I keep getting the same error.

conda list torch

Shmuma commented 4 years ago

I suggest to create a clean virtual environment. Just checked on my linux box with the following commands:

conda create -n test python=3.7
conda activate test
conda install -c pytorch pytorch==1.3.0
pip install ptan

It worked smoothly with the following packages installed:

(t2) shmuma@gpu:~/tmp/1$ pip freeze
atari-py==0.2.6
certifi==2020.6.20
cffi @ file:///tmp/build/80754af9/cffi_1598370813909/work
cloudpickle==1.3.0
future==0.18.2
gym==0.17.2
mkl-fft==1.1.0
mkl-random==1.1.1
mkl-service==2.3.0
numpy @ file:///tmp/build/80754af9/numpy_and_numpy_base_1596233707986/work
opencv-python==4.4.0.42
ptan==0.6
pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work
pyglet==1.5.0
scipy==1.5.2
six==1.15.0
torch==1.3.0
furkanyorulmaz commented 4 years ago

It is working. Thank you so much!