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

pip install fails for python 3.11 #7051

Closed
1 task done
Tracked by #4761
ramezanifar opened this issue Oct 27, 2022 · 16 comments
Closed
1 task done
Tracked by #4761

pip install fails for python 3.11 #7051

ramezanifar opened this issue Oct 27, 2022 · 16 comments
Labels

Comments

@ramezanifar
Copy link

Describe the bug

Python 3.11 is just out. I installed it and made a fresh virtual environment and first thing first tried to install aiohttp with:
pip install aiohttp
it failed.
I also have python 3.10.8 and it was installed with no problem.
Log is pasted in the Logs/tracebacks section below.

To Reproduce

install python 3.11
make a virtual environment and activate(optional)
pip install aiohttp

Expected behavior

To be installed successfully

Logs/tracebacks

Collecting aiohttp
  Using cached aiohttp-3.8.3-cp311-cp311-win_amd64.whl (317 kB)
Collecting attrs>=17.3.0
  Using cached attrs-22.1.0-py2.py3-none-any.whl (58 kB)
Collecting charset-normalizer<3.0,>=2.0
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting multidict<7.0,>=4.5
  Using cached multidict-6.0.2.tar.gz (50 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting async-timeout<5.0,>=4.0.0a3
  Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting yarl<2.0,>=1.0
  Using cached yarl-1.8.1.tar.gz (172 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting frozenlist>=1.1.1
  Using cached frozenlist-1.3.1.tar.gz (66 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting aiosignal>=1.1.2
  Using cached aiosignal-1.2.0-py3-none-any.whl (8.2 kB)
Collecting idna>=2.0
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Building wheels for collected packages: frozenlist, multidict, yarl
  Building wheel for frozenlist (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for frozenlist (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      *********************
      * Accelerated build *
      *********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\frozenlist
      copying frozenlist\__init__.py -> build\lib.win-amd64-cpython-311\frozenlist
      running egg_info
      writing frozenlist.egg-info\PKG-INFO
      writing dependency_links to frozenlist.egg-info\dependency_links.txt
      writing top-level names to frozenlist.egg-info\top_level.txt
      reading manifest file 'frozenlist.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.pyd' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      warning: no previously-included files matching '*.lib' found anywhere in distribution
      warning: no previously-included files matching '*.dll' found anywhere in distribution
      warning: no previously-included files matching '*.a' found anywhere in distribution
      warning: no previously-included files matching '*.obj' found anywhere in distribution
      warning: no previously-included files found matching 'frozenlist\*.html'
      no previously-included directories found matching 'docs\_build'
      adding license file 'LICENSE'
      writing manifest file 'frozenlist.egg-info\SOURCES.txt'
      copying frozenlist\__init__.pyi -> build\lib.win-amd64-cpython-311\frozenlist
      copying frozenlist\_frozenlist.pyx -> build\lib.win-amd64-cpython-311\frozenlist
      copying frozenlist\py.typed -> build\lib.win-amd64-cpython-311\frozenlist
      running build_ext
      building 'frozenlist._frozenlist' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for frozenlist
  Building wheel for multidict (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for multidict (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [59 lines of output]
      *********************
      * Accelerated build *
      *********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\multidict
      copying multidict\_abc.py -> build\lib.win-amd64-cpython-311\multidict
      copying multidict\_compat.py -> build\lib.win-amd64-cpython-311\multidict
      copying multidict\_multidict_base.py -> build\lib.win-amd64-cpython-311\multidict
      copying multidict\_multidict_py.py -> build\lib.win-amd64-cpython-311\multidict
      copying multidict\__init__.py -> build\lib.win-amd64-cpython-311\multidict
      running egg_info
      writing multidict.egg-info\PKG-INFO
      writing dependency_links to multidict.egg-info\dependency_links.txt
      writing top-level names to multidict.egg-info\top_level.txt
      reading manifest file 'multidict.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files found matching 'multidict\_multidict.html'
      warning: no previously-included files found matching 'multidict\*.so'
      warning: no previously-included files found matching 'multidict\*.pyd'
      warning: no previously-included files found matching 'multidict\*.pyd'
      no previously-included directories found matching 'docs\_build'
      adding license file 'LICENSE'
      writing manifest file 'multidict.egg-info\SOURCES.txt'
      C:\Users\amin.ramezanifar\AppData\Local\Temp\pip-build-env-8ge7rajw\overlay\Lib\site-packages\setuptools\command\build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'multidict._multilib' as data is deprecated, please list it in `packages`.
          !!


          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'multidict._multilib' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.

          'multidict._multilib' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).

          Please make sure that 'multidict._multilib' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" and "data files" on setuptools
          documentation page.


      !!

        check.warn(importable)
      copying multidict\__init__.pyi -> build\lib.win-amd64-cpython-311\multidict
      copying multidict\py.typed -> build\lib.win-amd64-cpython-311\multidict
      running build_ext
      building 'multidict._multidict' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for multidict
  Building wheel for yarl (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for yarl (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [37 lines of output]
      C:\Users\amin.ramezanifar\AppData\Local\Temp\pip-build-env-3fbg9xvq\overlay\Lib\site-packages\setuptools\config\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      **********************
      * Accelerated build *
      **********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting.py -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting_py.py -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_url.py -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\__init__.py -> build\lib.win-amd64-cpython-311\yarl
      running egg_info
      writing yarl.egg-info\PKG-INFO
      writing dependency_links to yarl.egg-info\dependency_links.txt
      writing requirements to yarl.egg-info\requires.txt
      writing top-level names to yarl.egg-info\top_level.txt
      reading manifest file 'yarl.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.cache' found anywhere in distribution
      warning: no previously-included files found matching 'yarl\*.html'
      warning: no previously-included files found matching 'yarl\*.so'
      warning: no previously-included files found matching 'yarl\*.pyd'
      no previously-included directories found matching 'docs\_build'
      adding license file 'LICENSE'
      writing manifest file 'yarl.egg-info\SOURCES.txt'
      copying yarl\__init__.pyi -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting_c.pyi -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting_c.pyx -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\py.typed -> build\lib.win-amd64-cpython-311\yarl
      running build_ext
      building 'yarl._quoting_c' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for yarl
Failed to build frozenlist multidict yarl
ERROR: Could not build wheels for frozenlist, multidict, yarl, which is required to install pyproject.toml-based projects


### Python Version

```console
$ python --version
3.11

aiohttp Version

$ python -m pip show aiohttp
not installed

multidict Version

$ python -m pip show multidict
not installed. It also fails to install.

yarl Version

$ python -m pip show yarl
not installed. It also fails to install.

OS

Windows 10

Related component

Server, Client

Additional context

NA

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@overcat
Copy link

overcat commented Oct 27, 2022

I think this is the root: aio-libs/frozenlist#342

@thatrandomperson5
Copy link

The problem is that some of the dependencies of aiohttp are not yet built for 3.11.

@thatrandomperson5
Copy link

If you really want to use it you can use third party wheels although they might not be secure. mine are here and I'm sure you could find others online

@kjyv
Copy link

kjyv commented Dec 16, 2022

Can this issue be closed? It seems 3.8.3 installs fine

@Eonasdan
Copy link

This is still an issue for my with python 3.12 on W11

ERROR: Could not build wheels for aiohttp, frozenlist, multidict, yarl, which is required to install pyproject.toml-based projects

@Dreamsorcerer
Copy link
Member

Still on issue with Python 3.12?

The issue is about 3.11. 3.12 obviously won't have wheels yet... Wheels don't get built when deploying until a Python version is atleast an rc release. i.e. Sometime after 2023-07-31: https://peps.python.org/pep-0693/

@Eonasdan
Copy link

Sorry don't know much about python. Rolling back to 3.11 works.

@Dreamsorcerer
Copy link
Member

Ha, well, if you want things to be working (especially a lot of 3rd party libraries), don't use an early alpha release of Python. :P
You'll notice this issue was only opened just after 3.11 was officially released.

@Eonasdan
Copy link

I was using winget to install python. It didn't offer details like that, so I picked the latest version. Python and this project were a requirement for a downstream tool.

@felipebarbosa4
Copy link

This is still an issue for my with python 3.12 on W11

ERROR: Could not build wheels for aiohttp, frozenlist, multidict, yarl, which is required to install pyproject.toml-based projects

Thankyou, spent 4hours trying to solve and this simple comment helped me.

@junoriosity
Copy link

@felipebarbosa4 How did this help you then? It would be great to hear as I am experiencing these issues during the switch from Python 3.11 to Python 3.12.

@ghost
Copy link

ghost commented Oct 26, 2023

Looks like they recently released a hotfix (#7675), same happened to me when moving to a new computer from 3.11 to 3.12 and I fixed by using: aiohttp==3.9.0b0

@PonteRP
Copy link

PonteRP commented Oct 26, 2023

I get this error with python versions 3.9 and above all the way to 3.12. Any idea of what could be the issue? Thanks!

@johanvanmol
Copy link

Looks like they recently released a hotfix (#7675), same happened to me when moving to a new computer from 3.11 to 3.12 and I fixed by using: aiohttp==3.9.0b0

Thank you, I just installed Python 3.12, and ran into the same problem. Your comment helped me.

hawkeye116477 added a commit to FiltersHeroes/ScriptsPlayground that referenced this issue Nov 6, 2023
@tjone270
Copy link

For anyone still having this issue on Windows with Python 3.12 - the solution for me was to download vs_BuildTools.exe from Microsoft, and then run the following against it:

.\vs_BuildTools.exe --add "Microsoft.VisualStudio.Component.VC.Tools.x86.x64" --add "Microsoft.VisualStudio.Workload.WDExpress" --includeRecommended --passive --norestart --force --installWhileDownloading

This satisfies the dependency on the build tools for Visual C++ and allows installation to continue. By default the specific components required for pip to be successfull aren't installed by vs_BuildTools.exe

wmfgerrit pushed a commit to wikimedia/machinelearning-liftwing-inference-services that referenced this issue Apr 5, 2024
The aiohttp 3.8.x versions seem to have an issue with Python 3.11,
namely aio-libs/aiohttp#7051

Versions 3.9.x solve the problem, upgrading python module's deps.

Change-Id: I5cb81d0718a31862127c3837a55e2e06824fed3d
@cxydezh
Copy link

cxydezh commented Jul 21, 2024

I have solved the problem with the tip of that download the vs_BuildTools.exe and installed the C++ 14 build tools。
my python version is 3.11。

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

No branches or pull requests