我正在尝试在我的机器上安装flask。我使用了两个命令:
pip install flask
和
python3 -m pip install flask
我得到的是以下错误:
ERROR: Command errored out with exit status 1:
command: 'C:\Users\...\AppData\Local\Programs\Python\Python38-32\python3.exe'
-u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-x8pjl3ae\\MarkupSafe\\setup.py'"'"';
__file__='"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-x8pjl3ae\\MarkupSafe\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\...\AppData\Local\Temp\pip-record-qb6gobj5\install-record.txt'
--single-version-externally-managed --compile cwd: C:\Users\...\AppData\Local\Temp\pip-install-x8pjl3ae\MarkupSafe\
Complete output (23 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\markupsafe
copying src\markupsafe\_compat.py -> build\lib.win32-3.8\markupsafe
copying src\markupsafe\_constants.py -> build\lib.win32-3.8\markupsafe
copying src\markupsafe\_native.py -> build\lib.win32-3.8\markupsafe
copying src\markupsafe\__init__.py -> build\lib.win32-3.8\markupsafe
running egg_info
writing src\MarkupSafe.egg-info\PKG-INFO
writing dependency_links to src\MarkupSafe.egg-info\dependency_links.txt writing top-level names to src\MarkupSafe.egg-info\top_level.txt
reading manifest file 'src\MarkupSafe.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs\_build'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution writing manifest file 'src\MarkupSafe.egg-info\SOURCES.txt'
copying src\markupsafe\_speedups.c -> build\lib.win32-3.8\markupsafe
running build_ext
building 'markupsafe._speedups' extension
error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1\\lib'
---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\Users\...\AppData\Local\Programs\Python\Python38-32\python3.exe'
-u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-x8pjl3ae\\MarkupSafe\\setup.py'"'"';
__file__='"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-x8pjl3ae\\MarkupSafe\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\...\AppData\Local\Temp\pip-record-qb6gobj5\install-record.txt'
--single-version-externally-managed --compile Check the logs for full command output.
我尝试在我创建的默认文件夹中执行此操作。
按照安装说明尝试另一种方法(也许)时 here我无法按照他们的建议访问虚拟环境。
键入
venv\Scripts\activate
我得到:
The system cannot find the path specified.
当我检查Script文件夹时,没有激活文件。 我该怎么办?