【解决】Python38安装mssql时出错

文章目录

  • 1. 按
  • 2. whl下载地址
  • 3. 安装

1. 按

直接用pip安装的pyaudio不支持3.8,所以在安装或import的时候会报错。因此需要我们手动下载whl文件安装。
对于64位操作系统,Python 3.8下载pymssql-2.1.4-cp38-cp38-win_amd64.whl
笔者在安装时提示以下错误:

C:\WINDOWS\system32>pip install pymssql
Collecting pymssql
Using cached pymssql-2.1.4.tar.gz (691 kB)
ERROR: Command errored out with exit status 1:
command: ‘c:\program files\python\38\python.exe’ -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘D:\s\ut\pip-install-zqaumew5\pymssql\setup.py’"’"’; file=’"’"‘D:\s\ut\pip-install-zqaumew5\pymssql\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 ‘D:\s\ut\pip-install-zqaumew5\pymssql\pip-egg-info’
cwd: D:\s\ut\pip-install-zqaumew5\pymssql
Complete output (7 lines):
c:\program files\python\38\lib\site-packages\setuptools\dist.py:45: DistDeprecationWarning: Do not call this function
warnings.warn(“Do not call this function”, DistDeprecationWarning)
Traceback (most recent call last):
File “”, line 1, in
File “D:\s\ut\pip-install-zqaumew5\pymssql\setup.py”, line 88, in
from Cython.Distutils import build_ext as _build_ext
ModuleNotFoundError: No module named ‘Cython’
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

2. whl下载地址

  • 城通网盘
  • https://www.lfd.uci.edu/~gohlke/pythonlibs/#pymssql

3. 安装

参考:python3.8和3.7安装pyaudio

你可能感兴趣的:(Python,资源分享)