Closed laszukdawid closed 2 years ago
No one for this issue ? i got the same but with torch 0.4.0
torch 0.4.0 is not listed official anymore try this https://stackoverflow.com/questions/56181581/how-to-install-torch-0-3-1-in-python-3-6. Now we can install unity agents by pip install unityagents.
You can also install older versions of PyTorch by supplying a archive URL as a parameter to pip.
pip install torch==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html
I went with approach suggested by dheerjakula and victorgutemberg and they worked for me, specifically using a wheel I got myself instead of the one that is no longer in Pypi. Just documenting my steps here in case it would be useful for others troubleshooting this:
Something I tried that hit a roadblock
Originally I tried altering my requirements.txt file to have an entry for pytorch that looked like this:
git+https://github.com/pytorch/pytorch.git@v0.4.0#egg=torch
or git+https://github.com/pytorch/pytorch.git@v0.4.0#egg=torch
for ssh
that should have pulled the torch dependency directly from its tagged release version on github and you can then remove the unityagents dependency from setup.py and also not do a separate pip install.
Downside was cloning this repository into a cache somewhere takes a minute and it is 750Mb. Additionally, I was prompted for login on one of the subpackages and it wasn't accepting my github login creds. Tried that with both https and git to no avail.
what ended up working
Got around it with the above suggestion, getting a wheel for the version of pytorch that pypi doesn't list anymore. got it from pytorch with the command @victorgutemberg lists above but used python download
instead of python install
to get a local copy, saved it to a wheels/ directory in the same location that my requirements.txt file was and then added this line to my requirements.txt:
./wheels/torch-0.4.0-cp36-cp36m-win_amd64.whl
(note I'm on Windows)
once that was setup properly, my whole project setup pretty much consisted of running pip install -r requirements.txt
from within my python/ directory, I was able to delete the setup.py because as @dheerajakula points out we didn't need to build the unityagents package anymore
what I wish I could have done
I wanted to use conda for everything like the OP but ran into an issue that the conda scipy package selection was one that wouldn't work with python 3.6. I guess pip install .
selected an older version that was python 3.6 compatible (1.5.4). Didn't try to see what other compatibility issues I'd run into, just switched to pip for everything and installed unityagents directly to get past the issues.
Hoping this odd compatibility layer that involves older python and framework versions has more to do with the project being based on an assignment that has been around for a while and less to do with the environment tools themselves being behind. Something to experiment with when working on personal projects.
HEllo Everybody! I recently had the same issue and I was unable to solve it via the specified ways in previous posts. So i'm writing what worked for me.
I tried all solutions but still, i was unable to load torch==0.4.0 correctly, so here are my steps:
Then continue with the installation process and the kernel. It worked fine afterwards.
I hope this works for you too. :)
Hi guys,
I have a couple of questions:
Below is my bash log from trying to install this project's dependences. I have initially initially tried
pip install
, then, after some investigation, I took steps below. My OS is Ubuntu 20.04.