【发布时间】:2018-05-25 08:24:43
【问题描述】:
你好美丽的互联网人!
我在尝试以下操作时遇到问题:
pip intall --upgrade cloudstorage
在我的本地环境下,使用安装了谷歌云 SDK 的基本 windows CMD。
我使用的是带有 python 2.7.12 的 Win10,我的 gcloud SDK 是最新的,并且安装了所需的 Visual C++ 库(不过是最新版本)。尝试安装模块时仍然会引发此错误:
[...]
creating build\temp.win-amd64-2.7\Release\build\temp.win-amd64-2.7\Release
C:\Users\user_name\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tcbuild\temp.win-amd64-2.7\Release\_lib.c /Fobuild\temp.win-amd64-2.7\Release\build\temp.win-amd64-2.7\Release\_lib.obj
_lib.c
build\temp.win-amd64-2.7\Release\_lib.c(504) : fatal error C1083: Cannot open include file: 'sys/xattr.h': No such file or directory
error: command 'C:\\Users\\user_name\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user_name\\appdata\\local\\temp\\pip-install-ekfv8g\\xattr\\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\user_name\appdata\local\temp\pip-record-_ejcqu\install-record.txt --single-version-externally-managed --compile --home=c:\users\user_name\appdata\local\temp\pip-target-ndt9sh" failed with error code 1 in c:\users\user_name\appdata\local\temp\pip-install-ekfv8g\xattr\
我也尝试在 Debian WSL 下运行安装,但没有成功... 'setuptools' 也是最新的。
任何线索,任何一个?
编辑: 用this answer 更正。出现新错误:
[...]
MSVCRT.lib(MSVCR90.dll) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
error: command 'C:\\Users\\user_name\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\link.exe' failed with exit status 1112
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user_name\\appdata\\local\\temp\\pip-install-8hhqj3\\netifaces\\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\user_name\appdata\local\temp\pip-record-nmoe3e\install-record.txt --single-version-externally-managed --compile --home=c:\users\user_name\appdata\local\temp\pip-target-gb8zwx" failed with error code 1 in c:\users\user_name\appdata\local\temp\pip-install-8hhqj3\netifaces\
【问题讨论】:
标签: python-2.7 sdk pip windows-10 google-cloud-storage