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

error installing pypotrace via pip #39

Open
Xardous opened this issue May 19, 2021 · 5 comments
Open

error installing pypotrace via pip #39

Xardous opened this issue May 19, 2021 · 5 comments

Comments

@Xardous
Copy link

Xardous commented May 19, 2021

trying to download pypotrace on virtualenv

os:mac 10.15.6 catalina

cmd i used
python3 -m pip install pypotrace

what i am getting:
`Collecting pypotrace
Using cached pypotrace-0.3.tar.gz (11 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pypotrace) (1.20.3)
Building wheels for collected packages: pypotrace
Building wheel for pypotrace (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/tmpdr5ftg9m
cwd: /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103
Complete output (66 lines):
A setup.py file already exists. Using it.
['-I/usr/local/Cellar/libagg/2.5/include/agg2']
['-L/usr/local/Cellar/libagg/2.5/lib', '-Wl,-rpath,/usr/local/Cellar/libagg/2.5/lib', '-lagg']
Compiling potrace/_potrace.pyx because it changed.
Compiling potrace/bezier.pyx because it changed.
Compiling potrace/agg/curves.pyx because it changed.
[1/3] Cythonizing potrace/_potrace.pyx
[2/3] Cythonizing potrace/agg/curves.pyx
[3/3] Cythonizing potrace/bezier.pyx
running build
running build_py
creating /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build
creating /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8
creating /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace
copying potrace/init.py -> /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace
creating /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace/agg
copying potrace/agg/init.py -> /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace/agg
copying potrace/_potrace.c -> /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace
copying potrace/bezier.pxd -> /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace
copying potrace/bezier.cpp -> /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace
copying potrace/_potrace.pxd -> /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace
copying potrace/_potrace.pyx -> /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace
copying potrace/bezier.pyx -> /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace
copying potrace/agg/curves.pyx -> /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace/agg
copying potrace/agg/basics.pxd -> /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace/agg
copying potrace/agg/curves.pxd -> /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace/agg
copying potrace/agg/curves.cpp -> /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/lib.macosx-10.9-x86_64-3.8/potrace/agg
running build_ext
building 'potrace._potrace' extension
creating /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/temp.macosx-10.9-x86_64-3.8
creating /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/temp.macosx-10.9-x86_64-3.8/potrace
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-build-env-flktxk3t/overlay/lib/python3.8/site-packages/numpy/core/include -I/private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-build-env-flktxk3t/overlay/lib/python3.8/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c potrace/_potrace.c -o /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build/temp.macosx-10.9-x86_64-3.8/potrace/_potrace.o
potrace/_potrace.c:635:10: fatal error: 'potracelib.h' file not found
#include "potracelib.h"
^~~~~~~~~~~~~~
1 error generated.
/private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-build-env-flktxk3t/overlay/lib/python3.8/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/potrace/_potrace.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
warning: potrace/_potrace.pyx:328:30: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
warning: potrace/_potrace.pyx:328:35: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
warning: potrace/_potrace.pyx:328:40: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
/private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-build-env-flktxk3t/overlay/lib/python3.8/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/potrace/agg/curves.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
/private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-build-env-flktxk3t/overlay/lib/python3.8/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/potrace/bezier.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
error: command 'gcc' failed with exit status 1
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 280, in
main()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 204, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-build-env-flktxk3t/overlay/lib/python3.8/site-packages/poetry/core/masonry/api.py", line 68, in build_wheel
return unicode(WheelBuilder.make_in(poetry, Path(wheel_directory)))
File "/private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-build-env-flktxk3t/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 72, in make_in
wb.build()
File "/private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-build-env-flktxk3t/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 103, in build
self._build(zip_file)
File "/private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-build-env-flktxk3t/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 135, in _build
self._run_build_command(setup)
File "/private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-build-env-flktxk3t/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 163, in _run_build_command
subprocess.check_call(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/python3', '/private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/setup.py', 'build', '-b', '/private/var/folders/tf/k90xr_cx3x35_6_spm02qcpr0000gn/T/pip-install-w4eu4b72/pypotrace_ee512bbaddbd461fab7ba85c2d563103/build']' returned non-zero exit status 1.

ERROR: Failed building wheel for pypotrace
Failed to build pypotrace
ERROR: Could not build wheels for pypotrace which use PEP 517 and cannot be installed directly`

how do i fix it?

thanks

@alexjslessor
Copy link

Hello, yes I am getting this also.

@flupke
Copy link
Owner

flupke commented May 28, 2021

Hello, the potrace library needs to be installed on your system.

On MacOS you can install it with brew: brew install potrace

Check brew output for any additional steps required to make the library visible to your compiler.

@Ubuntufanboy
Copy link

I found the solution. You cannot do sudo apt install potrace you need to use the command on the README sudo apt-get install build-essential python-dev libagg-dev libpotrace-dev pkg-config then clone the repo, cd into it, install numpy, then do pip3 install .

@hi101000
Copy link

I found the solution. You cannot do sudo apt install potrace you need to use the command on the README sudo apt-get install build-essential python-dev libagg-dev libpotrace-dev pkg-config then clone the repo, cd into it, install numpy, then do pip3 install .

I don't think apt works on mac

@dimcoord
Copy link

Try installing python-dev-is-python3 instead of python-dev. It worked for me.

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

6 participants