我有一个由以下模块组成的requirements.txt文件:
Running setup.py clean for SQLAlchemy
Running setup.py bdist_wheel for markupsafe ... error
Complete output from command c:\test_oauth\venv\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\SEANBA~1\\AppData\\Local\\Temp\\pip-build-pvc5zlcc\\markupsafe\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\
r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\SEANBA~1\AppData\Local\Temp\tmpkf78v48_pip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.5
creating build\lib.win32-3.5\markupsafe
copying markupsafe\tests.py -> build\lib.win32-3.5\markupsafe
copying markupsafe\_compat.py -> build\lib.win32-3.5\markupsafe
copying markupsafe\_constants.py -> build\lib.win32-3.5\markupsafe
copying markupsafe\_native.py -> build\lib.win32-3.5\markupsafe
copying markupsafe\__init__.py -> build\lib.win32-3.5\markupsafe
running egg_info
writing dependency_links to MarkupSafe.egg-info\dependency_links.txt
writing MarkupSafe.egg-info\PKG-INFO
writing top-level names to MarkupSafe.egg-info\top_level.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'MarkupSafe.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MarkupSafe.egg-info\SOURCES.txt'
copying markupsafe\_speedups.c -> build\lib.win32-3.5\markupsafe
running build_ext
building 'markupsafe._speedups' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\markupsafe\setup.py", line 120, in <module>
try_building_extension()
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\markupsafe\setup.py", line 99, in try_building_extension
run_setup(True)
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\markupsafe\setup.py", line 93, in run_setup
ext_modules=ext_modules,
File "C:\Python35-32\Lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python35-32\Lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\test_oauth\venv\lib\site-packages\wheel\bdist_wheel.py", line 179, in run
self.run_command('build')
File "C:\Python35-32\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python35-32\Lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Python35-32\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\markupsafe\setup.py", line 41, in run
build_ext.run(self)
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 338, in run
self.build_extensions()
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 447, in build_extensions
self._build_extensions_serial()
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 472, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\markupsafe\setup.py", line 47, in build_extension
build_ext.build_extension(self, ext)
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 532, in build_extension
depends=ext.depends)
File "C:\Python35-32\Lib\distutils\_msvccompiler.py", line 306, in compile
self.initialize()
File "C:\Python35-32\Lib\distutils\_msvccompiler.py", line 199, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\test_oauth\venv\lib\site-packages\setuptools\msvc.py", line 206, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_ver_min=14.0).return_env()
TypeError: __init__() got an unexpected keyword argument 'vc_ver_min'
----------------------------------------
Failed building wheel for markupsafe
当我激活我的virtualenv来安装这些模块时 running build_ext
building 'sqlalchemy.cprocessors' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\SQLAlchemy\setup.py", line 170, in <module>
run_setup(True)
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\SQLAlchemy\setup.py", line 150, in run_setup
**kwargs
File "C:\Python35-32\Lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python35-32\Lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\test_oauth\venv\lib\site-packages\wheel\bdist_wheel.py", line 179, in run
self.run_command('build')
File "C:\Python35-32\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python35-32\Lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Python35-32\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python35-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\SQLAlchemy\setup.py", line 67, in run
build_ext.run(self)
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 338, in run
self.build_extensions()
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 447, in build_extensions
self._build_extensions_serial()
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 472, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\SEANBA~1\AppData\Local\Temp\pip-build-pvc5zlcc\SQLAlchemy\setup.py", line 73, in build_extension
build_ext.build_extension(self, ext)
File "C:\Python35-32\Lib\distutils\command\build_ext.py", line 532, in build_extension
depends=ext.depends)
File "C:\Python35-32\Lib\distutils\_msvccompiler.py", line 306, in compile
self.initialize()
File "C:\Python35-32\Lib\distutils\_msvccompiler.py", line 199, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\test_oauth\venv\lib\site-packages\setuptools\msvc.py", line 206, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_ver_min=14.0).return_env()
TypeError: __init__() got an unexpected keyword argument 'vc_ver_min'
----------------------------------------
Failed building wheel for SQLAlchemy
SQLAlchemy失败并且MarkupSafe失败。如果我停用我的virtualenv,只需let NamImjVar = UIImage(named: "NamImjFyl")
let ImjDtaVar = UIImageJPEGRepresentation(NamImjVar!, 1)
let ImjSrgVar = ImjDtaVar!.base64EncodedStringWithOptions(NSDataBase64EncodingOptions(rawValue:0))
或<?php
$NamImjSrgVar = $_REQUEST["ImjKey"];
header('Content-Type: image/jpeg');
$NamImjDtaVar = str_replace(' ', '+', $NamImjSrgVar);
$NamImjHexVar = base64_decode($NamImjDtaVar);
file_put_contents("NamFyl.jpg", $NamImjHexVar)
?>
- 他们就会成功安装。
我不知道为什么会这样。我试过卸载/重新安装virtualenv&amp; python - 并且与一位对Python非常了解的朋友(他认为这是Windows环境特有的东西)进行了交谈,不幸的是我不知道接下来会尝试什么。
我怀疑这可能与我删除名为&#39; Python&#39;的文件夹有关。在user \ AppData ..下面,我尝试卸载Python并从一个干净的平板开始...
以下是与MarkupSafe相关的相关输出(或至少,我认为是输出的相关部分):
{{1}}
以下是与SQLAlchemy失败相关的相关输出(或者至少,我认为是输出的相关部分):
{{1}}
答案 0 :(得分:0)
我找到了问题的答案。
python的环境变量配置错误(它已经成为自己的系统变量,而不是简单地添加到'path'系统变量中)。
一旦改变,问题就消失了。