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

Installation error with Python 3.9 #37

Closed
abey79 opened this issue Oct 12, 2020 · 1 comment · Fixed by #81
Closed

Installation error with Python 3.9 #37

abey79 opened this issue Oct 12, 2020 · 1 comment · Fixed by #81
Labels
packaging Issues with packaging and installation
Milestone

Comments

@abey79
Copy link
Owner

abey79 commented Oct 12, 2020

These issues must be resolved to be compatible with Python 3.9:


Edit: the current work-around is the following (in a virtual env of course):

1) Manually install bezier:

This step is no longer required, new bezier binaries have been uploaded: dhermes/bezier#245

2) Install from the fix-python39 branch:

pip install git+https://github.com/abey79/vsketch@fix-python39#egg=vsketch

See @f4nu comment below for another possible issue and fix on macOS Big Sur.

@abey79 abey79 added this to the release 1.0.0 milestone Feb 9, 2021
@f4nu
Copy link

f4nu commented Feb 10, 2021

For bezier we tried installing it with BEZIER_NO_EXTENSION=true pip install bezier and it worked

(vpype_venv) bash-5.0$ BEZIER_NO_EXTENSION=true pip install bezier
Collecting bezier
  Using cached bezier-2020.5.19.tar.gz (313 kB)
Requirement already satisfied: numpy>=1.18.1 in ./vpype_venv/lib/python3.9/site-packages (from bezier) (1.19.5)
Using legacy 'setup.py install' for bezier, since package 'wheel' is not installed.
Installing collected packages: bezier
    Running setup.py install for bezier ... done
Successfully installed bezier-2020.5.19

Furthermore, for macOS, after trying to install vsketch again from the python39-fix branch (on my system at least) it started complaining about the installation of noise:

    Running setup.py install for noise ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/fanu/git/p5js/vpype_venv/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b5/qt72rpsn267_j55zy1xc8h380000gn/T/pip-install-ftxu94bd/noise_a5f5e728354f4b9ca33c34d059444636/setup.py'"'"'; __file__='"'"'/private/var/folders/b5/qt72rpsn267_j55zy1xc8h380000gn/T/pip-install-ftxu94bd/noise_a5f5e728354f4b9ca33c34d059444636/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/b5/qt72rpsn267_j55zy1xc8h380000gn/T/pip-record-8pbapavv/install-record.txt --single-version-externally-managed --compile --install-headers /Users/fanu/git/p5js/vpype_venv/include/site/python3.9/noise
         cwd: /private/var/folders/b5/qt72rpsn267_j55zy1xc8h380000gn/T/pip-install-ftxu94bd/noise_a5f5e728354f4b9ca33c34d059444636/
    Complete output (17 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-11.0-x86_64-3.9
    creating build/lib.macosx-11.0-x86_64-3.9/noise
    copying shader.py -> build/lib.macosx-11.0-x86_64-3.9/noise
    copying perlin.py -> build/lib.macosx-11.0-x86_64-3.9/noise
    copying shader_noise.py -> build/lib.macosx-11.0-x86_64-3.9/noise
    copying __init__.py -> build/lib.macosx-11.0-x86_64-3.9/noise
    copying test.py -> build/lib.macosx-11.0-x86_64-3.9/noise
    running build_ext
    building 'noise._simplex' extension
    creating build/temp.macosx-11.0-x86_64-3.9
    /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -I/Users/fanu/git/p5js/vpype_venv/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c _simplex.c -o build/temp.macosx-11.0-x86_64-3.9/_simplex.o -funroll-loops
    clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.0'
    error: command '/usr/bin/clang' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/fanu/git/p5js/vpype_venv/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b5/qt72rpsn267_j55zy1xc8h380000gn/T/pip-install-ftxu94bd/noise_a5f5e728354f4b9ca33c34d059444636/setup.py'"'"'; __file__='"'"'/private/var/folders/b5/qt72rpsn267_j55zy1xc8h380000gn/T/pip-install-ftxu94bd/noise_a5f5e728354f4b9ca33c34d059444636/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/b5/qt72rpsn267_j55zy1xc8h380000gn/T/pip-record-8pbapavv/install-record.txt --single-version-externally-managed --compile --install-headers /Users/fanu/git/p5js/vpype_venv/include/site/python3.9/noise Check the logs for full command output.
(vpype_venv) bash-5.0$ clang --version
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin20.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

This seems to be an issue with an unsupported version of clang that comes from the Apple Store, a simple purge and reinstall from the command line fixed it:

(vpype_venv) bash-5.0$ sudo rm -rf /Library/Developer/CommandLineTools
(vpype_venv) bash-5.0$ sudo xcode-select --install
xcode-select: note: install requested for command line developer tools
(vpype_venv) bash-5.0$ clang --version
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin20.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
(vpype_venv) bash-5.0$ pip install noise
Collecting noise
  Using cached noise-1.2.2.zip (132 kB)
Using legacy 'setup.py install' for noise, since package 'wheel' is not installed.
Installing collected packages: noise
    Running setup.py install for noise ... done
Successfully installed noise-1.2.2

After this, vsketch worked fine.

@abey79 abey79 pinned this issue Feb 12, 2021
@abey79 abey79 changed the title Test with python 3.9 and updated CI accordingly Installation error with Python 3.9 Feb 12, 2021
@abey79 abey79 added the packaging Issues with packaging and installation label Feb 14, 2021
@abey79 abey79 mentioned this issue Feb 15, 2021
6 tasks
@abey79 abey79 unpinned this issue Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packaging Issues with packaging and installation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants