Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pypi distribution #16

Open
Nagnar opened this issue Oct 10, 2017 · 3 comments
Open

pypi distribution #16

Nagnar opened this issue Oct 10, 2017 · 3 comments

Comments

@Nagnar
Copy link

Nagnar commented Oct 10, 2017

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

@peterbjorgensen
Copy link

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
>>> 

@wackywendell
Copy link

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

Previous issues:
#8

Some work was done to port it to Python 3:
#11

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

@Nagnar
Copy link
Author

Nagnar commented Oct 14, 2017

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants