簡體   English   中英

PyCharm 無法安裝 kiwisolver

[英]PyCharm can't install kiwisolver

我正在嘗試安裝 kiwisolver 以便稍后導入到 python 文件中。 每當我嘗試安裝它時,它都不起作用。 這是來自終端的摘錄,其中包含整個錯誤消息:

pip install kiwisolver

使用緩存的 kiwisolver-1.2.0.tar.gz (52 kB) 收集 kiwisolver

    ERROR: Command errored out with exit status 1:
     command: 'c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\scripts\python.exe' -c 'import sys, setuptools
, tokenize; sys.argv[0] = '"'"'C:\\Users\\krzys\\AppData\\Local\\Temp\\pip-install-7g7nerff\\kiwisolver\\setup.py'"'
"'; __file__='"'"'C:\\Users\\krzys\\AppData\\Local\\Temp\\pip-install-7g7nerff\\kiwisolver\\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 'C:\Users\krzys\AppData\Local\Temp\pip-pip-egg-info-lzzrvcrw'

         cwd: C:\Users\krzys\AppData\Local\Temp\pip-install-7g7nerff\kiwisolver\
    Complete output (44 lines):
    WARNING: The wheel package is not available.
      ERROR: Command errored out with exit status 1:
       command: 'c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\scripts\python.exe' -u -c 'import sys, setup
tools, tokenize; sys.argv[0] = '"'"'C:\\Users\\krzys\\AppData\\Local\\Temp\\pip-wheel-68n7nybw\\cppy\\setup.py'"'"';
 __file__='"'"'C:\\Users\\krzys\\AppData\\Local\\Temp\\pip-wheel-68n7nybw\\cppy\\setup.py'"'"';f=getattr(tokenize, '
"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __fi
le__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\krzys\AppData\Local\Temp\pip-wheel-wh_c02y4'
           cwd: C:\Users\krzys\AppData\Local\Temp\pip-wheel-68n7nybw\cppy\
      Complete output (6 lines):
      usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: setup.py --help [cmd1 cmd2 ...]
         or: setup.py --help-commands
         or: setup.py cmd --help
    
      error: invalid command 'bdist_wheel'
      ----------------------------------------
      ERROR: Failed building wheel for cppy
    ERROR: Failed to build one or more wheels
    Traceback (most recent call last):
      File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\setuptools\installer.py", line
126, in fetch_build_egg
        subprocess.check_call(cmd)
      File "C:\Users\krzys\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['c:\\users\\krzys\\pycharmprojects\\possiblyworkingcv2\\venv\\scripts\\
python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\krzys\\AppData\\Loc
al\\Temp\\tmp95axqdwj', '--quiet', 'cppy>=1.1.0']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\krzys\AppData\Local\Temp\pip-install-7g7nerff\kiwisolver\setup.py", line 59, in <module>
        setup(
      File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\setuptools\__init__.py", line 1
52, in setup
        _install_setup_requires(attrs)
      File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\setuptools\__init__.py", line 1
47, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\setuptools\dist.py", line 673,
in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\pkg_resources\__init__.py", lin
e 764, in resolve
        dist = best[req.key] = env.best_match(
      File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\pkg_resources\__init__.py", lin
e 1049, in best_match
        return self.obtain(req, installer)
      File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\pkg_resources\__init__.py", lin
e 1061, in obtain
        return installer(requirement)
      File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\setuptools\dist.py", line 732,
in fetch_build_egg
        return fetch_build_egg(self, req)
      File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\setuptools\installer.py", line
128, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['c:\\users\\krzys\\pycharmprojects\\possiblyworkingcv2\\venv\\scripts
\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\krzys\\AppData\\L
ocal\\Temp\\tmp95axqdwj', '--quiet', 'cppy>=1.1.0']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我需要做什么來安裝 kiwisolver?

我正在使用帶有 Python 3.9(venv) 解釋器的 PyCharm 社區版 2020.2.3。

不確定 Python 3.9 中是否有適用於 kiwisolver 的輪子,請檢查此處並下載並安裝正確的輪子(如果有)。 如果沒有下載 3.8 Python 版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM