pyvoro icon indicating copy to clipboard operation
pyvoro copied to clipboard

pypi distribution

Open Nagnar opened this issue 8 years ago • 3 comments

Issue with pyvoro as distributed on pypi

When running the main.py file:

import pyvoro

print('success?')

(test_env) .../test$ python3 main.py Traceback (most recent call last): File "main.py", line 1, in import pyvoro File ".../test/test_env/lib/python3.5/site-packages/pyvoro/init.py", line 1, in import voroplusplus File "voroplusplus.pyx", line 36, in init pyvoro.voroplusplus (pyvoro/voroplusplus.cpp:2696) SystemError: Parent module '' not loaded, cannot perform relative import

The contents of the pyvoro directory in the env where pyvoro was installed with pip3 (test_env) .../test/test_env/lib/python3.5/site-packages/pyvoro$ ls init.py pycache

The contents of the same directory in a different env where pyvoro was installed from source with python setup.py install .../voronoi/voronoi_env/lib/python3.5/site-packages/pyvoro-1.3.3-py3.5-linux-x86_64.egg/pyvoro$ ls init.py pycache voroplusplus.cpython-35m-x86_64-linux-gnu.so voroplusplus.py

Nagnar avatar Oct 10 '17 07:10 Nagnar

I get the same error regardless of whether I install via pip or from source

Python 3.6.2 (default, Jul 20 2017, 03:52:27) 
[GCC 7.1.1 20170630] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvoro
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/peter/kodesjov/pyvoro/pyvoro/__init__.py", line 1, in <module>
    import voroplusplus
  File "voroplusplus.pyx", line 36, in init pyvoro.voroplusplus (pyvoro/voroplusplus.cpp:2696)
SystemError: Parent module 'voroplusplus' not loaded, cannot perform relative import
>>> 

peterbjorgensen avatar Oct 13 '17 15:10 peterbjorgensen

@Nagnar @peder2tm : This module is only Python 2, and will not build with Python 3.

Previous issues: https://github.com/joe-jordan/pyvoro/issues/8

Some work was done to port it to Python 3: https://github.com/joe-jordan/pyvoro/pull/11

In the meantime, I also made a similar library that should work on python 3: http://tess.readthedocs.io/

wackywendell avatar Oct 13 '17 15:10 wackywendell

@wackywendell I see, the source I used which worked was the python3 feature branch. Tess is 3d based and the docs don't mention using it for 2d so would I be able to use it for that?

Nagnar avatar Oct 14 '17 03:10 Nagnar