我試圖爲arcpy安裝pip(在Windows 7上爲arcgis 10.2)。運行get-pip.py會導致以下錯誤消息:爲arcpy安裝pip
X:\python>python get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 20061, in <module>
main()
File "get-pip.py", line 194, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip
File "c:\temp\tmpou5fje\pip.zip\pip\__init__.py", line 26, in <module>
File "c:\temp\tmpou5fje\pip.zip\pip\utils\__init__.py", line 27, in <module>
File "c:\temp\tmpou5fje\pip.zip\pip\_vendor\pkg_resources\__init__.py", line 73, in <module>
File "c:\temp\tmpou5fje\pip.zip\pip\_vendor\packaging\specifiers.py", line 275, in <module>
File "c:\temp\tmpou5fje\pip.zip\pip\_vendor\packaging\specifiers.py", line 373, in Specifier
File "C:\Python27\ArcGIS10.2\Lib\re.py", line 190, in compile
return _compile(pattern, flags)
File "C:\Python27\ArcGIS10.2\Lib\re.py", line 242, in _compile
raise error, v # invalid expression
sre_constants.error: nothing to repeat
使用管理員命令提示符不起作用。我真正的目標是讓win32com在arcpy下工作。我通常只需將相應的目錄從c:\ python27 \ lib \ site-packages複製到c:\ python27 \ arcgis10.2 \ lib \ site-packages以在arcpy下安裝一個軟件包(爲什麼arcpy沒有帶pip? )但這不適用於win32com,大概是對一個缺少的DLL或其他特定於Windows的文件做的。