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

Fails to install with Python 3.11 #86

Open
kylebarron opened this issue Jun 29, 2023 · 2 comments
Open

Fails to install with Python 3.11 #86

kylebarron opened this issue Jun 29, 2023 · 2 comments

Comments

@kylebarron
Copy link

I'm hitting this issue: nodejs/node-gyp#2219

  File "/Users/kyle/.volta/tools/image/node/14.20.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
    return main(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^
  File "/Users/kyle/.volta/tools/image/node/14.20.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main
    return gyp_main(args)
           ^^^^^^^^^^^^^^
  File "/Users/kyle/.volta/tools/image/node/14.20.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 520, in gyp_main
    [generator, flat_list, targets, data] = Load(
                                            ^^^^^
  File "/Users/kyle/.volta/tools/image/node/14.20.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 136, in Load
    result = gyp.input.Load(build_files, default_variables, includes[:],
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kyle/.volta/tools/image/node/14.20.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2782, in Load
    LoadTargetBuildFile(build_file, data, aux_data,
  File "/Users/kyle/.volta/tools/image/node/14.20.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
    build_file_data = LoadOneBuildFile(build_file_path, data, aux_data,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kyle/.volta/tools/image/node/14.20.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 234, in LoadOneBuildFile
    build_file_contents = open(build_file_path, 'rU').read()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU' while trying to load binding.gyp

Downgrading to Python <3.11 works; it looks from the linked issue like you can probably upgrade node-gyp to fix as well?

@perllaghu
Copy link

If I install in a docker image based on quay.io/jupyter/base-notebook:2024-04-15, then it installs fine for me [I accept that the docker image part may be different]

That image has:

  • Ubuntu 22:04,
  • python 3.11.8,
  • hub 4.1.5,
  • lab 4.1.6,
  • notebook 7.1.2

@activescott
Copy link

Here is what got me past gyp errors trying to add tslab to quay.io/jupyter/base-notebook:2024-04-15 in a dockerfile:

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
  && apt-get -y install --no-install-recommends build-essential cmake \
  && bash /tmp/docker-scripts/common-debian.sh

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