pyvoro icon indicating copy to clipboard operation
pyvoro copied to clipboard

How to install pyvoro for python 3.5.1

Open agoyal06 opened this issue 8 years ago • 3 comments

Hi,

I want to use pyvoro to analyze my crystal structure. I am using python3.5.1, and when used "pip install pyvoro" it says it successfully installed it. But, when I import pyvoro, ipython does not recognize it.

I read this thread "https://github.com/joe-jordan/pyvoro/issues/8", but still do not get how to install pyvoro for python3.5.1

Please, if you can give me some direction, I will highly appreciate.

Thanks, Anuj

agoyal06 avatar Apr 14 '16 10:04 agoyal06

heres how you're supposed to but I am getting an issue. $ cd pyvoro-feature-python3 $ python3 setup.py install

$ python3 import pyvoro

But then I get the error

Traceback (most recent call last): File "", line 1, in File "/Users/joelsimon/Downloads/pyvoro-feature-python3/pyvoro/init.py", line 1, in from . import voroplusplus ImportError: cannot import name 'voroplusplus'

joel-simon avatar May 15 '16 17:05 joel-simon

@Sloth6:

Just a guess: try switching to a different directory (like your home directory) before you run Python and import pyvoro. When you import it from /Users/joelsimon/Downloads/pyvoro-feature-python3/, it imports the version in the /Users/joelsimon/Downloads/pyvoro-feature-python3/pyvoro folder, instead of the installed version. The version in /Users/joelsimon/Downloads/pyvoro-feature-python3/pyvoro has most of the source files for pyvoro, so it can begin the import, but voroplusplus isn't built in that location, so it doesn't work.

Alternatively, from that directory you can run python3 setup.py build_ext -i, and then import pyvoro should work in that directory (but not necessarily outside of it).

wackywendell avatar May 16 '16 14:05 wackywendell

@wackywendell

Yes you are very correct, it's easy to forget about that. Thanks again for your work on the py3 branch.

cheers

joel-simon avatar May 17 '16 02:05 joel-simon