TyXe-BDL / TyXe

MIT License
144 stars 33 forks source link

cannot import tyxe #17

Open nlebang opened 2 years ago

nlebang commented 2 years ago

Dear, I have used pip install tyxe but cannot import it. >> no such module. How can I resolve this problem? Thanks.

hpplyt commented 2 years ago

Hi, it's a bit hard to tell what might have gone wrong without more details. Did you run pip install -e . after setting up a conda environment?

If you have all of the dependencies installed, all you need is to make sure that the directory where the tyxe module lives is in your Python's system path. On Linux you can add the directory to your PYTHONPATH environment variable, see e.g. here.

DengyingFu commented 1 year ago

This error occurs when I use the pip install -e command after running the command line to activate the environment. Is there more detailed installation steps under windows.? Thank you. ERROR: file:///C:/Users/fu%27d%27y does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

hpplyt commented 1 year ago

I'm afraid I haven't used Python under Windows before, so can't help with this unfortunately.

Would registering the package on pypi solve this for you so you could do a normal pip install tyxe?

Cam-B04 commented 1 year ago

Did you try to update setuptools pip and wheel ? I had a similar problem with other packages as well. Try: pip install -U setuptools pip wheel After the installation retry installing Tyxe with: pip install -e .

DengyingFu commented 1 year ago

Thanks for your response! but I'd also like to ask could I change the versions of torch and torchvision in install_requires in setup.py. Does it support torch 1.12.1+cu116 and torchvision 0.13.1+cu116. My cuda is version 11.6

DengyingFu commented 1 year ago

Thank you Cam-B04,I solved the problem by your suggestion!

hpplyt commented 1 year ago

Glad the installation problem is solved! I haven't tested any newer pytorch/torchvision versions than the ones in the setup.py, so can't make any promises, but would be surprised if moving to a newer minor version broke anything.