DiffEqML / torchdyn

A PyTorch library entirely dedicated to neural differential equations, implicit models and related numerical methods
https://torchdyn.org
Apache License 2.0
1.35k stars 125 forks source link

No module named 'torchdyn.core' #114

Closed merdan-9 closed 2 years ago

merdan-9 commented 3 years ago

Hi,

I installed torchdyn and ran the Quickstart code, but it occurs: "ModuleNotFoundError: No module named 'torchdyn.core'".

How should I fix it?

Thanks for your help!

Zymrael commented 3 years ago

Which torchdyn version was installed?

merdan-9 commented 3 years ago

torchdyn 0.2.2.1 pypi_0 pypi

j-koch commented 3 years ago

Having same issue - clean install in new conda environment; installed torchdyn 1.0 using pip. Attempting: from torchdyn.core import * fails with "No module names 'torchdyn.core'.

sumit-sinha-seas commented 3 years ago

getting the same error.


ModuleNotFoundError Traceback (most recent call last)

in () ----> 1 from torchdyn.core import NeuralODE ModuleNotFoundError: No module named 'torchdyn.core' --------------------------------------------------------------------------- NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt. To view examples of installing some common dependencies, click the "Open Examples" button below. ---------------------------------------------------------------------------
Zymrael commented 3 years ago

One issue is fixed by upgrading your Python to >=3.8. Attempting to pip install torchdyn with a Python version <3.8 installs torchdyn=0.2.2.1 or a different earlier version compatible with older Python.

If that fails pip install torchdyn==1.0.0

rsrad commented 3 years ago

I am using conda environment with python 3.9.1 and pip21.2.3 on Ubuntu. I did use pip install torchdyn==1.0.0 to install it. (1) I can import torchdyn, which gives torchdyn version '1.0'. (2) from torchdyn.datasets import Works well with out issue However, (3) from torchdyn.core import OR from torchdyn.core import NeuralODE throws error ModuleNotFoundError: No module named 'torchcde'

Please suggest

j-koch commented 3 years ago

@Zymrael I get the same behavior as @rsrad just reported; my conda environment is using Python 3.9.5 and pip installed torchdyn version 1.0. Importing 'datasets' or '*' works, importing torchdyn.core fails.

Zymrael commented 3 years ago

torchcde is not installed automatically in 1.0.0 since at the time it was not available on PyPI. We have now added a direct dependency so installing torchdyn=1.0.1 will install that for you. You can also simply pip install torchcde

Zymrael commented 2 years ago

Closing for now as the issue seems resolved.