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

Failure to install #207

Open
PhilipVinc opened this issue Dec 2, 2024 · 2 comments
Open

Failure to install #207

PhilipVinc opened this issue Dec 2, 2024 · 2 comments

Comments

@PhilipVinc
Copy link

Hello, try to install this package with either pip or uv results in the following error:

Do you have some ideas of why it happens?
This machine is manylinux 28 compliant

[fvicenti@login02 test2]$ uv add tensorstore
Resolved 37 packages in 24ms
  × Failed to download and build `tensorstore==0.1.69`
  ╰─▶ Build backend failed to build wheel through `build_wheel` (exit status: 1)

      [stdout]
      running bdist_wheel
      running build
      running build_py
      creating /scratch_local/tmphwvzqsjy/lib.linux-x86_64-cpython-313/tensorstore
      copying python/tensorstore/__init__.py -> /scratch_local/tmphwvzqsjy/lib.linux-x86_64-cpython-313/tensorstore
      running build_ext
      /leonardo/home/userexternal/fvicenti/.cache/uv/builds-v0/.tmpP5IWUg/bin/python -u bazelisk.py build -c opt --copt=-O3
      //python/tensorstore:_tensorstore__shared_objects --verbose_failures --remote_download_regex=.*/_tensorstore\.(so|pyd) --copt=-fvisibility=hidden

      [stderr]
      WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
      Traceback (most recent call last):
        File "/leonardo/home/userexternal/fvicenti/.cache/uv/builds-v0/.tmpP5IWUg/lib/python3.13/site-packages/setuptools_scm/_integration/pyproject_reading.py",
      line 36, in read_pyproject
          section = defn.get("tool", {})[tool_name]
                    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
      KeyError: 'setuptools_scm'
      Downloading https://releases.bazel.build/7.4.0/release/bazel-7.4.0-linux-x86_64...
      Traceback (most recent call last):
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/urllib/request.py", line 1319, in do_open
          h.request(req.get_method(), req.selector, req.data, headers,
          ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    encode_chunked=req.has_header('Transfer-encoding'))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/http/client.py", line 1336, in request
          self._send_request(method, url, body, headers, encode_chunked)
          ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/http/client.py", line 1382, in
      _send_request
          self.endheaders(body, encode_chunked=encode_chunked)
          ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/http/client.py", line 1331, in endheaders
          self._send_output(message_body, encode_chunked=encode_chunked)
          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/http/client.py", line 1091, in _send_output
          self.send(msg)
          ~~~~~~~~~^^^^^
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/http/client.py", line 1035, in send
          self.connect()
          ~~~~~~~~~~~~^^
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/http/client.py", line 1477, in connect
          self.sock = self._context.wrap_socket(self.sock,
                      ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
                                                server_hostname=server_hostname)
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/ssl.py", line 455, in wrap_socket
          return self.sslsocket_class._create(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
              sock=sock,
              ^^^^^^^^^^
          ...<5 lines>...
              session=session
              ^^^^^^^^^^^^^^^
          )
          ^
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/ssl.py", line 1076, in _create
          self.do_handshake()
          ~~~~~~~~~~~~~~~~~^^
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/ssl.py", line 1372, in do_handshake
          self._sslobj.do_handshake()
          ~~~~~~~~~~~~~~~~~~~~~~~~~^^
      ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1020)

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/leonardo/home/userexternal/fvicenti/.cache/uv/sdists-v6/pypi/tensorstore/0.1.69/vIw4h3u9GfLy7UhAGmTun/src/bazelisk.py", line 506, in <module>
          sys.exit(main())
                   ~~~~^^
        File "/leonardo/home/userexternal/fvicenti/.cache/uv/sdists-v6/pypi/tensorstore/0.1.69/vIw4h3u9GfLy7UhAGmTun/src/bazelisk.py", line 491, in main
          bazel_path = get_bazel_path()
        File "/leonardo/home/userexternal/fvicenti/.cache/uv/sdists-v6/pypi/tensorstore/0.1.69/vIw4h3u9GfLy7UhAGmTun/src/bazelisk.py", line 484, in get_bazel_path
          return download_bazel_into_directory(bazel_version, is_commit, bazel_directory)
        File "/leonardo/home/userexternal/fvicenti/.cache/uv/sdists-v6/pypi/tensorstore/0.1.69/vIw4h3u9GfLy7UhAGmTun/src/bazelisk.py", line 318, in
      download_bazel_into_directory
          download(bazel_url, destination_path)
          ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/leonardo/home/userexternal/fvicenti/.cache/uv/sdists-v6/pypi/tensorstore/0.1.69/vIw4h3u9GfLy7UhAGmTun/src/bazelisk.py", line 367, in download
          with closing(urlopen(request)) as response, open(destination_path, "wb") as file:
                       ~~~~~~~^^^^^^^^^
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/urllib/request.py", line 189, in urlopen
          return opener.open(url, data, timeout)
                 ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/urllib/request.py", line 489, in open
          response = self._open(req, data)
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/urllib/request.py", line 506, in _open
          result = self._call_chain(self.handle_open, protocol, protocol +
                                    '_open', req)
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/urllib/request.py", line 466, in
      _call_chain
          result = func(*args)
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/urllib/request.py", line 1367, in
      https_open
          return self.do_open(http.client.HTTPSConnection, req,
                 ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                              context=self._context)
                              ^^^^^^^^^^^^^^^^^^^^^^
        File "/leonardo/home/userexternal/fvicenti/.local/share/uv/python/cpython-3.13.0-linux-x86_64-gnu/lib/python3.13/urllib/request.py", line 1322, in do_open
          raise URLError(err)
      urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1020)>
      error: command '/leonardo/home/userexternal/fvicenti/.cache/uv/builds-v0/.tmpP5IWUg/bin/python' failed with exit code 1

  help: `tensorstore` (v0.1.69) was included because `test2` (v0.1.0) depends on `tensorstore`
[fvicenti@login02 test2]$```
@laramiel
Copy link
Collaborator

laramiel commented Dec 3, 2024

This looks like it's failing to download bazel because your ssl certificate verification failed.

I tried this:

$ uv init ts1
Initialized project `ts1` at `/Users/lar/ts1`
$ cd ts1
$ uv venv -p 3.13 test-tensorstore-3.13
Using CPython 3.13.0
Creating virtual environment at: test-tensorstore-3.13
Activate with: source test-tensorstore-3.13/bin/activate

$ source test-tensorstore-3.13/bin/activate

$ uv add tensorstore

... and it failed differently.

@jbms
Copy link
Collaborator

jbms commented Dec 3, 2024

We will try to get 3.13 binary wheels built soon, which would avoid the need to build at all.

This particular error is due to failure to download the bazel build tool, which tensorstore does automatically as part of its setup. The download is done via the Python standard library urllib module. I suspect that you may not have SSL certificates configured appropriately for the version of Python you are using.

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