Closed agoryuno closed 10 months ago
I've tried installing directly from the main branch as pip install git+https://github.com/DiffEqML/torchdyn
and the problem went away. So this seems to be some kind of a pip package problem.
@agoryuno I had a similar issue, after installing torchdyn, jupyter just wouldn't see it. There is a problem with the installer, they must fix. I detected that the final problem is that it wouldn't install just like any other package, where you get the folder and another one called dist-.... Take a look at it yourself, go to site-packages folder or where everything gets downloaded. So, torchdyn just installs the dist one folder, why, I can't say, anyways, falling to import it because what the importing this in any python environment is to call the folder, where as mentioned somehow is not installed just like any other package. So, my workaround was, naturally, to just clone the repo, look the downloaded folder in my computer and just drop it in the site-packages folder. Complete manual workaround. It worked.
This commit should have fixed the issue
https://github.com/DiffEqML/torchdyn/commit/fcab1e2854d65f88c102c8f1259b8a905f8dbda0
but I don't think they have released a new version on pypi for a while.
Fixed on pypi in release 1.0.5 https://github.com/DiffEqML/torchdyn/releases/tag/1.0.5.1
Describe the bug
Unable to import torchdyn installed with pip inside a Docker image.
I've tried importing in a JupyterLab instance, ipython shell and by simply executing a script with a single line: 'import torchdyn'. All methods result in:
pip list
shows that "torchdyn 1.0.4" is installed.Step to Reproduce
Steps to reproduce the behavior:
Create a 'work' dir in the current directory with
mkdir work
Run the image with
docker run -p 8888:8888 -v $(pwd)/work:/home/jovyan/work -it jupyter-image
Open JupyterLab and try importing torchdyn
Close JupyterLab and restart the image with
docker run -p 8888:8888 -v $(pwd)/work:/home/jovyan/work -it jupyter-image /bin/bash
Start
ipython
and tryimport torchdyn
Exit
ipython
, do:echo "import torchdyn" > test.py; python test.py
Expected behavior
For torchdyn to be properly imported
Additional context
I've had the same problem on latest Ubuntu 23.04 but assumed that this is a Python 3.11 incompatibility, so I tried with Ubuntu 20.04 and Python 3.10 in Docker to no avail.