bigd4 / PyNEP

A python interface of NEP
MIT License
46 stars 17 forks source link

Can't find pynep #10

Closed MES-physics closed 1 year ago

MES-physics commented 1 year ago

I installed PyNEP by setup.py and tried to run the example, and getting this error. I'm sure it is something simple I didn't do? Thanks for help!

$ plot_select_structure.py Traceback (most recent call last): File "/home/m/PyNEP/examples/plot_select_structure.py", line 9, in from pynep.calculate import NEP ModuleNotFoundError: No module named 'pynep'

bigd4 commented 1 year ago

It seems that you haven't install the PyNEP successfully,were there any errors during installation?
Or maybe when running the example, you are using different python of what you used in python setup.py install so the pynep is not in the PYTHONPATH.

MES-physics commented 1 year ago

I decided to make a python environment now and install everything in it by pip. (on Linux, Python3.9, pip, numpy==1.21.*, etc.) But now there is no PyNEP directory, I don't see a pynep executable (it's a directory, is there supposed to be an executable?), the select.py file is different than the one installed by setup.py, and when I try to run the select.py example, it cannot find numpy even though it is installed, I don't see a numpy executable among the codes, etc etc. I put the pythonpath for pynep in my .bashrc file. Can you please explain the differences and the idea of steps to be able to use the select.py code? Should I just go back to the other installation, not pip? I'm a student not in computer software. I would appreciate tremendously.

bigd4 commented 1 year ago

I think pip is ok, you can run python -c "import pynep; print(pynep.__path__)" to see where the pynep is installed. pynep is a python library so it will not produce executable.
For the problem of cannot find numpy, you may give the wrong PYTHONPATH. The PYTHONPATH should be the parent directory of the pynep folder containing the python files.

MES-physics commented 1 year ago

OK thanks