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

uv pip install cannot find wheel module when installing openCC from git on uv 0.2.22. #4886

Closed
FishAlchemist opened this issue Jul 8, 2024 · 6 comments
Assignees

Comments

@FishAlchemist
Copy link
Contributor

OS: Ubuntu 20.04 (x86_64)
UV: uv 0.2.22
Note: This problem also occurs in Windows 11 23H2 (x86_64)

Command

uv pip install git+https://github.com/BYVoid/OpenCC.git@ver.1.1.7 --verbose

uv pip list (The same error occurs regardless of whether or not there are seed packages)

Package    Version
---------- -------
pip        24.1.2
setuptools 70.2.0
wheel      0.43.0
Verbose output
DEBUG uv 0.2.22
DEBUG Searching for Python interpreter in system path
DEBUG Found cpython 3.10.14 at `$HOME/LaniusTW_CSAI_114/project_api/.venv/bin/python3` (active virtual environment)
DEBUG Using Python 3.10.14 environment at .venv/bin/python3
DEBUG Acquired lock for `.venv`
DEBUG At least one requirement is not satisfied: git+https://github.com/BYVoid/OpenCC.git@ver.1.1.7
DEBUG Using request timeout of 30s
DEBUG Updating git source `Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("github.com")), port: None, path: "/BYVoid/OpenCC.git", query: None, fragment: None }`
DEBUG Attempting GitHub fast path for: https://api.github.com/repos/BYVoid/OpenCC/commits/ver.1.1.7
DEBUG Performing a Git fetch for: https://github.com/BYVoid/OpenCC.git
DEBUG failed to fetch refspec `+refs/heads/ver.1.1.7:refs/remotes/origin/ver.1.1.7`: process didn't exit successfully: `git fetch --force --update-head-ok 'https://github.com/BYVoid/OpenCC.git' '+refs/heads/ver.1.1.7:refs/remotes/origin/ver.1.1.7'` (exit status: 128)
--- stderr
fatal: couldn't find remote ref refs/heads/ver.1.1.7

DEBUG Fetching source distribution from Git: https://github.com/BYVoid/OpenCC.git
DEBUG Acquired lock for `https://github.com/byvoid/opencc`
DEBUG Using existing git source `Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("github.com")), port: None, path: "/BYVoid/OpenCC.git", query: None, fragment: None }`
DEBUG Acquired lock for `$HOME/.cache/uv/built-wheels-v3/git/cf21aed2da4d2e45/e5d6c5f1b78e28a5`
DEBUG Preparing metadata for: git+https://github.com/BYVoid/OpenCC.git@ver.1.1.7
DEBUG No static `PKG-INFO` available for: git+https://github.com/BYVoid/OpenCC.git@ver.1.1.7 (MissingPkgInfo)
DEBUG No static `pyproject.toml` available for: git+https://github.com/BYVoid/OpenCC.git@ver.1.1.7 (MissingPyprojectToml)
INFO Ignoring empty directory
DEBUG Solving with installed Python version: 3.10.14
DEBUG Adding direct dependency: setuptools>=40.8.0
DEBUG Found fresh response for: https://pypi.org/simple/setuptools/
DEBUG Searching for a compatible version of setuptools (>=40.8.0)
DEBUG Selecting: setuptools==70.2.0 (setuptools-70.2.0-py3-none-any.whl)
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/42/54/2a8ecfcc9a714a6fbf86559a4b0f50b126a4ac4269ea8134f2c75c3e73de/setuptools-70.2.0-py3-none-any.whl.metadata
DEBUG Tried 1 versions: setuptools 1
DEBUG Split  took 0.004s
DEBUG Installing in setuptools==70.2.0 in $HOME/.cache/uv/builds-v0/.tmprXAvQu
DEBUG Requirement already cached: setuptools==70.2.0
DEBUG Installing build requirement: setuptools==70.2.0
DEBUG Calling `setuptools.build_meta:__legacy__.get_requires_for_build_wheel()`
error: Failed to build: `git+https://github.com/BYVoid/OpenCC.git@ver.1.1.7`
  Caused by: Build backend failed to determine extra requires with `build_wheel()` with exit status: 1
--- stdout:

--- stderr:
Traceback (most recent call last):
  File "<string>", line 14, in <module>
  File "$HOME/.cache/uv/builds-v0/.tmprXAvQu/lib/python3.10/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
  File "$HOME/.cache/uv/builds-v0/.tmprXAvQu/lib/python3.10/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
    self.run_setup()
  File "$HOME/.cache/uv/builds-v0/.tmprXAvQu/lib/python3.10/site-packages/setuptools/build_meta.py", line 497, in run_setup
    super().run_setup(setup_script=setup_script)
  File "$HOME/.cache/uv/builds-v0/.tmprXAvQu/lib/python3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup
    exec(code, locals())
  File "<string>", line 9, in <module>
ModuleNotFoundError: No module named 'wheel'
---

Successfully installed using pip.

pip commnad

pip install git+https://github.com/BYVoid/OpenCC.git@ver.1.1.7

output:

Collecting git+https://github.com/BYVoid/OpenCC.git@ver.1.1.7
  Cloning https://github.com/BYVoid/OpenCC.git (to revision ver.1.1.7) to /tmp/pip-req-build-go6tdxfs
  Running command git clone -q https://github.com/BYVoid/OpenCC.git /tmp/pip-req-build-go6tdxfs
  Running command git checkout -q e5d6c5f1b78e28a5797e7ad3ede3513314e544b7
Building wheels for collected packages: OpenCC
  Building wheel for OpenCC (setup.py) ... done
  Created wheel for OpenCC: filename=OpenCC-1.1.7-cp38-cp38-manylinux1_x86_64.whl size=10021 sha256=d84f85a7321a8700db4bc4d527f8714fc7b5aa5589dc7931895674f936bbc5a5
  Stored in directory: /tmp/pip-ephem-wheel-cache-u21q9vub/wheels/42/db/0e/4cb4c29ba02dc9d8721df98294b35af619b7f74ef16a0ea6f3
Successfully built OpenCC
Installing collected packages: OpenCC
Successfully installed OpenCC-1.1.7
@FishAlchemist FishAlchemist changed the title uv pip install cannot find wheel module when installing openCC from git on uv 0.2.22. uv pip install cannot find wheel module when installing openCC from git on uv 0.2.22. Jul 8, 2024
@whittid4
Copy link

whittid4 commented Jul 8, 2024

Not sure if this is the same issue we are seeing, but uv 0.2.22 is not respecting pinned dependencies in the wheel. Pinning uv to an older version fixed it for us.

If unrelated I can create another issue.

@FishAlchemist
Copy link
Contributor Author

FishAlchemist commented Jul 8, 2024

Not sure if this is the same issue we are seeing, but uv 0.2.22 is not respecting pinned dependencies in the wheel. Pinning uv to an older version fixed it for us.

If unrelated I can create another issue.

How old is the version?
I get the error ModuleNotFoundError: No module named 'wheel' when I run the command with the following UV version on Windows 11 23H2 (x86_64).

  • uv 0.2.21
  • uv 0.2.20
  • uv 0.2.19
  • uv 0.2.18
  • uv 0.2.17
  • uv 0.2.16
  • uv 0.2.15
    I didn't test 0.2.11 ~ 0.2.14
  • uv 0.2.10
    I didn't test 0.2.1 ~ 0.2.9
  • uv 0.2.0
  • uv 0.1.45
    I have not tested versions older than 0.1.45.

@konstin
Copy link
Member

konstin commented Jul 8, 2024

I think this issue is an instance of #2252

@whittid4 Could you open a separate issue with more details for reproduction?

@whittid4
Copy link

whittid4 commented Jul 8, 2024

@konstin yeah, I will try and get a small example together this afternoon.

We got it working on 0.2.18 and below, version 0.2.19 and above is failing.

@charliermarsh
Copy link
Member

Yeah, this is a problem with the package:

❯ pip install --use-pep517 git+https://github.com/BYVoid/OpenCC.git@ver.1.1.7
Collecting git+https://github.com/BYVoid/OpenCC.git@ver.1.1.7
  Cloning https://github.com/BYVoid/OpenCC.git (to revision ver.1.1.7) to /private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-req-build-lz7b4_dp
  Running command git clone --filter=blob:none --quiet https://github.com/BYVoid/OpenCC.git /private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-req-build-lz7b4_dp
  Running command git checkout -q e5d6c5f1b78e28a5797e7ad3ede3513314e544b7
  Resolved https://github.com/BYVoid/OpenCC.git to commit e5d6c5f1b78e28a5797e7ad3ede3513314e544b7
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/crmarsh/.local/share/rtx/installs/python/3.12.3/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-mnle05bg/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-mnle05bg/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-mnle05bg/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-mnle05bg/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 9, in <module>
      ModuleNotFoundError: No module named 'wheel'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

@charliermarsh
Copy link
Member

You'll need to either fix the package to express wheel as a build dependency, or use --no-build-isolation when installing it.

@charliermarsh charliermarsh self-assigned this Jul 8, 2024
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

4 participants