我正在VS2017中制作一个python项目,该项目需要flask和pyodbc。起初,我运行的是Python 3.8,用pip安装这两个版本没有问题,但在VS中,我收到了一个错误,即"Python 2.5及更早版本不支持调试"。人们告诉我,解决这个问题的方法是安装早期版本的Python。许多人推荐3.5版本。所以我卸载了3.8,安装了3.5(路径相同(。问题是,现在我不能再安装pyodbc和烧瓶了。当我为两者运行pip安装时,我得到了这个长错误:
ERROR: Command errored out with exit status 1:
command: 'c:python35python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Marc8\AppData\Local\Temp\pip-install-hr1u7o04\pyodbc\setup.py'"'"'; __file__='"'"'C:\Users\Marc8\AppData\Local\Temp\pip-install-hr1u7o04\pyodbc\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersMarc8AppDataLocalTemppip-record-i6_lvn4pinstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:python35Includepyodbc'
cwd: C:UsersMarc8AppDataLocalTemppip-install-hr1u7o04pyodbc
Complete output (7 lines):
c:python35libdistutilsdist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_ext
building 'pyodbc' extension
error: [WinError 2]
我该如何解决此问题?
用户警告:未知分发选项:'longdescription_content_type'
您的setuptools
太旧了。升级:
pip install -U setuptools
也许您还需要升级pip
:
pip install -U pip setuptools