首页 > 解决方案 > SQLAlchemy 无法安装

问题描述

运行命令

pip install SQLAlchemy

返回以下错误:

Collecting SQLAlchemy
  Using cached SQLAlchemy-1.3.15.tar.gz (6.1 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\joão coelho\appdata\local\programs\python\python38-32\python.exe' 'c:\users\joão coelho\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\JOOCOE~1\AppData\Local\Temp\tmpsg3pneho'
         cwd: C:\Users\João Coelho\AppData\Local\Temp\pip-install-sjum2aoe\SQLAlchemy
    Complete output (15 lines):
    running dist_info
    creating C:\Users\João Coelho\AppData\Local\Temp\pip-modern-metadata-ojxrdbjo\SQLAlchemy.egg-info
    writing C:\Users\João Coelho\AppData\Local\Temp\pip-modern-metadata-ojxrdbjo\SQLAlchemy.egg-info\PKG-INFO
    writing dependency_links to C:\Users\João Coelho\AppData\Local\Temp\pip-modern-metadata-ojxrdbjo\SQLAlchemy.egg-info\dependency_links.txt
    writing requirements to C:\Users\João Coelho\AppData\Local\Temp\pip-modern-metadata-ojxrdbjo\SQLAlchemy.egg-info\requires.txt 
    writing top-level names to C:\Users\João Coelho\AppData\Local\Temp\pip-modern-metadata-ojxrdbjo\SQLAlchemy.egg-info\top_level.txt
    writing manifest file 'C:\Users\João Coelho\AppData\Local\Temp\pip-modern-metadata-ojxrdbjo\SQLAlchemy.egg-info\SOURCES.txt'  
    reading manifest file 'C:\Users\João Coelho\AppData\Local\Temp\pip-modern-metadata-ojxrdbjo\SQLAlchemy.egg-info\SOURCES.txt'  
    reading manifest template 'MANIFEST.in'
    Error in sitecustomize; set PYTHONVERBOSE for traceback:
    SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xe3 in position 0: unexpected end of data (sitecustomize.py, line 7)
    no previously-included directories found matching 'doc\build\output'
    writing manifest file 'C:\Users\João Coelho\AppData\Local\Temp\pip-modern-metadata-ojxrdbjo\SQLAlchemy.egg-info\SOURCES.txt'  
    creating 'C:\Users\João Coelho\AppData\Local\Temp\pip-modern-metadata-ojxrdbjo\SQLAlchemy.dist-info'
    error: invalid command 'bdist_wheel'
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\joão coelho\appdata\local\programs\python\python38-32\python.exe' 'c:\users\joão coelho\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\JOOCOE~1\AppData\Local\Temp\tmpsg3pneho' Check the logs for full command output.

这似乎是 UTF-8 不支持的字符?!任何人都知道如何解决这个问题?

标签: pythonpip

解决方案


作为一种解决方法,您可以尝试从此处下载“SQLAlchemy-1.3.15-cp38-cp38-win32.whl” ,然后运行:

pip install C:\your\path\to\SQLAlchemy-1.3.15-cp38-cp38-win32.whl

Github 信用


推荐阅读