jason
jason

Reputation: 2106

How python organized its code in the folder?

I am beginner for python and get stack at how python organize its code.

For example: https://github.com/HIPS/neural-fingerprint/blob/master/examples/regression.py

In the regession.py, it will import the neuralfingerprint directory. When I run the regession.py in anaconda python, it says that the neuralfingerprint doesn't exist. I need to copy neuralfingerprint again to make sure neuralfingerprint and regession.py are in the same folder.

Any convient way? or why the author put regession.py and neuralfingerprint put them in different folder?

Thanks.

Upvotes: 0

Views: 54

Answers (1)

user8181134
user8181134

Reputation: 486

That is because what you have linked is a python library, and should be installed before you can properly use it. From the command line, run python setup.py from within the folder, or just run pip install git+https://github.com/HIPS/neural-fingerprint.git on the command line. This will install the library, and python will be able to find the correct files.

For this library, however, some other libraries are needed that are not installed automatically.
To install scipy: pip install scipy or conda install scipy with anaconda
For RDKit: it seems like you have to follow this

Upvotes: 1

Related Questions