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

No support via PyPI for Python 3.10 #4

Open
harisont opened this issue Dec 20, 2022 · 4 comments
Open

No support via PyPI for Python 3.10 #4

harisont opened this issue Dec 20, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@harisont
Copy link

Describe the bug
I am trying (but failing) to install udon2 via pip.

To Reproduce
I tried running

pip install udon2

This fails with a metadata-generation-failed

Defaulting to user installation because normal site-packages is not writeable
Collecting udon2
  Using cached udon2-0.1.0.tar.gz (45 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-z_iz0t73/udon2_ef5a35f34543433fb466908e16db2def/setup.py", line 11, in <module>
          BOOST_DIR = os.environ['BOOST_DIR']
        File "/usr/lib/python3.10/os.py", line 680, in __getitem__
          raise KeyError(key) from None
      KeyError: 'BOOST_DIR'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

After taking a look at the docs, I tried to install Boost from my package manager and set LIB_BOOST accordingly, only to get a legacy-install-failure:

      In file included from udon2_cpp_src/Importer.cpp:5:
      udon2_cpp_src/Importer.h:9:10: fatal error: boost/python/list.hpp: No such file or directory
          9 | #include <boost/python/list.hpp>
            |          ^~~~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for udon2
  Running setup.py clean for udon2
Failed to build udon2
Installing collected packages: udon2
  Running setup.py install for udon2 ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for udon2 did not run successfully.
  │ exit code: 1
  ╰─> [47 lines of output]
      running install
      /home/harisont/.local/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/udon2
      copying src/udon2/__init__.py -> build/lib.linux-x86_64-cpython-310/udon2
      creating build/lib.linux-x86_64-cpython-310/udon2/visual
      copying src/udon2/visual/utils.py -> build/lib.linux-x86_64-cpython-310/udon2/visual
      copying src/udon2/visual/templates.py -> build/lib.linux-x86_64-cpython-310/udon2/visual
      copying src/udon2/visual/render.py -> build/lib.linux-x86_64-cpython-310/udon2/visual
      copying src/udon2/visual/__init__.py -> build/lib.linux-x86_64-cpython-310/udon2/visual
      running build_ext
      building 'udon2.core' extension
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/udon2_cpp_src
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -I/usr/include/python3.10 -I/var/lib/pacman/local/boost-python2-1.78.0-1/include -I/usr/include/python3.10 -c udon2_cpp_src/ConllReader.cpp -o build/temp.linux-x86_64-cpython-310/udon2_cpp_src/ConllReader.o
      In file included from udon2_cpp_src/ConllReader.h:12,
                       from udon2_cpp_src/ConllReader.cpp:5:
      udon2_cpp_src/Node.h:211:44: warning: ‘template<class _Arg, class _Result> struct std::unary_function’ is deprecated [-Wdeprecated-declarations]
        211 | struct compare_to_node_by_id : public std::unary_function<Node *, bool> {
            |                                            ^~~~~~~~~~~~~~
      In file included from /usr/include/c++/12.2.0/string:48,
                       from udon2_cpp_src/ConllReader.h:8:
      /usr/include/c++/12.2.0/bits/stl_function.h:117:12: note: declared here
        117 |     struct unary_function
            |            ^~~~~~~~~~~~~~
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -I/usr/include/python3.10 -I/var/lib/pacman/local/boost-python2-1.78.0-1/include -I/usr/include/python3.10 -c udon2_cpp_src/ConllWriter.cpp -o build/temp.linux-x86_64-cpython-310/udon2_cpp_src/ConllWriter.o
      In file included from udon2_cpp_src/ConllWriter.h:10,
                       from udon2_cpp_src/ConllWriter.cpp:5:
      udon2_cpp_src/Node.h:211:44: warning: ‘template<class _Arg, class _Result> struct std::unary_function’ is deprecated [-Wdeprecated-declarations]
        211 | struct compare_to_node_by_id : public std::unary_function<Node *, bool> {
            |                                            ^~~~~~~~~~~~~~
      In file included from /usr/include/c++/12.2.0/string:48,
                       from udon2_cpp_src/ConllWriter.h:8:
      /usr/include/c++/12.2.0/bits/stl_function.h:117:12: note: declared here
        117 |     struct unary_function
            |            ^~~~~~~~~~~~~~
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -I/usr/include/python3.10 -I/var/lib/pacman/local/boost-python2-1.78.0-1/include -I/usr/include/python3.10 -c udon2_cpp_src/Importer.cpp -o build/temp.linux-x86_64-cpython-310/udon2_cpp_src/Importer.o
      In file included from udon2_cpp_src/Importer.cpp:5:
      udon2_cpp_src/Importer.h:9:10: fatal error: boost/python/list.hpp: No such file or directory
          9 | #include <boost/python/list.hpp>
            |          ^~~~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> udon2

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Expected behavior
Successful installation of udon2.

Environment specs (please complete the following information):

  • OS: Manjaro 22.0.0 Sikaris
  • Python version: 3.10.8
  • Udon verision: latest on pip
@harisont harisont added the bug Something isn't working label Dec 20, 2022
@dkalpakchi
Copy link
Collaborator

dkalpakchi commented Dec 20, 2022

Hi!

Thank you for submitting a bug! Currently Python 3.10 is not supported out of the box. The highest supported Python version 3.9 with the available pre-compiled package. I intend to add the support on PyPI for Python 3.10 and 3.11 in the next release, which will most probably happen at around February 2023.

If you need the package before that, you could try compiling it from the source yourself, as described here: https://udon2.github.io/quickstart/#udon2-from-sources

I could help you out with this, if needed, and we could also improve the description of how to compile from sources, if any unclarities arise.

@dkalpakchi
Copy link
Collaborator

dkalpakchi commented Dec 20, 2022

An alternative solution, which is probably much easier, is to spin a Docker container with Python between 3.7 and 3.9 and install udon2 via pip there.

@dkalpakchi
Copy link
Collaborator

I have now added some scripts that could help you out spinning a Docker container and some explanations in the README file, so you can go ahead and try the Docker approach yourself if you'd like (unless you prefer compiling the package yourself, of course, which is also fine).

@harisont
Copy link
Author

harisont commented Dec 22, 2022

Great, thanks! I will try the Docker option.

@dkalpakchi dkalpakchi self-assigned this Dec 28, 2022
@dkalpakchi dkalpakchi changed the title BUG No support via PyPI for Python 3.10 Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants