web-dev-qa-db-fra.com

ModuleNotFoundError: Aucun module nommé 'wheel' lors de l'installation de pythonnet sur Python3.8

J'installe pythonnet en utilisant pip install pythonnet in python 3.8. Je rencontre ce ModuleNotFoundError: No module named 'wheel' Erreur. J'ai fait quelques recherches et je n'ai pas pu trouver de solution. Existe-t-il un moyen de résoudre ce problème? Voici l'erreur que je reçois.

Merci d'avance!

(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\user165>cd C://Python38

C:\Python38>pip install pythonnet
Collecting pythonnet
  Using cached https://files.pythonhosted.org/packages/4a/0a/5964a5a1fdf207fab8e718edd1f8d3578e0681577fe9abe0d9006f9718c2/pythonnet-2.4.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user165\\AppData\\Local\\Temp\\pip-install-b8so9ms2\\pythonnet\\setup.py'"'"'; __file__='"'"'C:\\Users\\user165\\AppData\\Local\\Temp\\pip-install-b8so9ms2\\pythonnet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' Egg_info --Egg-base pip-Egg-info
         cwd: C:\Users\user165\AppData\Local\Temp\pip-install-b8so9ms2\pythonnet\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\user165\AppData\Local\Temp\pip-install-b8so9ms2\pythonnet\setup.py", line 18, in <module>
        from wheel import bdist_wheel
    ModuleNotFoundError: No module named 'wheel'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py Egg_info Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Python38>
2
LearningEveryday

Soit travailler dans un environnement virtuel (venv), qui s'assurera que la roue est installée, ou l'installer explicitement vous-même, avec setuptools:

python -m pip install wheel setuptools
3
Wim Lavrijsen

Essayez d'installer toutes les dépendances en premier, par exemple via pip install -r requirements.txt. Ensuite, lancez une deuxième commande pip install pythonnet.

Cela l'a résolu dans mon cas (Centos7, Python 3.6.8, pythonnet 2.4.0)

0
langlauf.io