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

Trying to install just meets with failure from setup tools #849

Open
Nniol opened this issue Jul 29, 2024 · 4 comments
Open

Trying to install just meets with failure from setup tools #849

Nniol opened this issue Jul 29, 2024 · 4 comments

Comments

@Nniol
Copy link

Nniol commented Jul 29, 2024

Overview
Unable to install.
I have removed all python packages from my computer, created a new venv

Even if as shown I use an older version of setuptools I till get the same error

python -m venv fm_aiortc
.\fm_aiortc\Scripts\activate
pip install ibm_watson
(fm_aiortc) PS C:\Work\GitHubRepo\WatsonX\pilots\FM\orchestration-layer\airotc> pip list
Package    Version
---------- -------
pip        24.2
setuptools 71.0.0
wheel      0.43.0

Expected behavior
Install ibm_watson

Actual behavior

(fm_aiortc) PS C:\Work\GitHubRepo\WatsonX\pilots\FM\orchestration-layer\airotc> pip install ibm_watson
Collecting ibm_watson
  Using cached ibm_watson-8.1.0.tar.gz (400 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting requests<3.0,>=2.0 (from ibm_watson)
  Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting python-dateutil>=2.5.3 (from ibm_watson)
  Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting websocket-client>=1.1.0 (from ibm_watson)
  Using cached websocket_client-1.8.0-py3-none-any.whl.metadata (8.0 kB)
Collecting ibm-cloud-sdk-core==3.*,>=3.3.6 (from ibm_watson)
  Using cached ibm-cloud-sdk-core-3.20.3.tar.gz (62 kB)
  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
  ╰─> [21 lines of output]
      <string>:18: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      Traceback (most recent call last):
        File "C:\Work\GitHubRepo\WatsonX\pilots\FM\orchestration-layer\airotc\fm_aiortc\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Work\GitHubRepo\WatsonX\pilots\FM\orchestration-layer\airotc\fm_aiortc\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Work\GitHubRepo\WatsonX\pilots\FM\orchestration-layer\airotc\fm_aiortc\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\010488846\AppData\Local\Temp\pip-build-env-pqhwh9x4\overlay\Lib\site-packages\setuptools\build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\010488846\AppData\Local\Temp\pip-build-env-pqhwh9x4\overlay\Lib\site-packages\setuptools\build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "C:\Users\010488846\AppData\Local\Temp\pip-build-env-pqhwh9x4\overlay\Lib\site-packages\setuptools\build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\010488846\AppData\Local\Temp\pip-build-env-pqhwh9x4\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 20, in <module>
      ModuleNotFoundError: No module named 'setuptools.command.test'
      [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.
```
**How to reproduce**
_Help us to reproduce what you experienced. Include your code snippets (without credentials)_

**Screenshots**
_If applicable, add screenshots to help explain your problem._

**SDK Version**
8.1.0

**Additional information:**
- OS: Windows
- Which version of `Python` are you using? 3.11.4

**Additional context**
_Add any other details about the problem._
@Nniol
Copy link
Author

Nniol commented Jul 29, 2024

If I add a constraints.txt file with the following:

setuptools==71.0.0

and run this command:
(fm_aiortc) PS C:\Work\GitHubRepo\WatsonX\pilots\FM\orchestration-layer\airotc> pip install --constraint .\constraints.txt ibm_watson

I get the same failure as above

I see that setuptools released a new version a few hours ago, and it appears it is being downloaded no matter what the constraints file says

@Nniol
Copy link
Author

Nniol commented Jul 29, 2024

Issue also discussed here

astral-sh/uv#5551

@Nniol
Copy link
Author

Nniol commented Jul 29, 2024

pip install --no-build-isolation --constraint .\constraints.txt ibm_watson

is a work around

@benji2512
Copy link

pip install --no-build-isolation ibm_watson worked for us in both console context and jupyter notebook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants