2

我想尝试 python vcs 包,但是..

我的电脑上有 Win7 x86,d:\pyth27 文件夹中有 python 2.7。

我下载并安装了(使用命令“python.exe my_instfolder\setup.py install”)vcs 的所有依赖项。我现在有:

d:\pyth27>python inst\vcs\setup.py install
running install
running bdist_egg
running egg_info
writing requirements to vcs.egg-info\requires.txt
writing vcs.egg-info\PKG-INFO
writing top-level names to vcs.egg-info\top_level.txt
writing dependency_links to vcs.egg-info\dependency_links.txt
writing entry points to vcs.egg-info\entry_points.txt
warning: manifest_maker: standard file 'setup.py' not found

reading manifest file 'vcs.egg-info\SOURCES.txt'
writing manifest file 'vcs.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
warning: install_lib: 'build\lib' does not exist -- no Python modules to install

creating build\bdist.win32\egg
creating build\bdist.win32\egg\EGG-INFO
copying vcs.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying vcs.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying vcs.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO
copying vcs.egg-info\entry_points.txt -> build\bdist.win32\egg\EGG-INFO
copying vcs.egg-info\not-zip-safe -> build\bdist.win32\egg\EGG-INFO
copying vcs.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying vcs.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
creating 'dist\vcs-0.2.2-py2.7.egg' and adding 'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing vcs-0.2.2-py2.7.egg
removing 'd:\pyth27\lib\site-packages\vcs-0.2.2-py2.7.egg' (and everything under it)
creating d:\pyth27\lib\site-packages\vcs-0.2.2-py2.7.egg
Extracting vcs-0.2.2-py2.7.egg to d:\pyth27\lib\site-packages
vcs 0.2.2 is already the active version in easy-install.pth
Installing vcs-script.py script to d:\pyth27\Scripts
Installing vcs.exe script to d:\pyth27\Scripts
Installing vcs.exe.manifest script to d:\pyth27\Scripts

Installed d:\pyth27\lib\site-packages\vcs-0.2.2-py2.7.egg
Processing dependencies for vcs==0.2.2
Searching for mock==1.0.1
Best match: mock 1.0.1
Processing mock-1.0.1-py2.7.egg
mock 1.0.1 is already the active version in easy-install.pth

Using d:\pyth27\lib\site-packages\mock-1.0.1-py2.7.egg
Searching for pygments==1.5
Best match: pygments 1.5
Processing pygments-1.5-py2.7.egg
pygments 1.5 is already the active version in easy-install.pth
Installing pygmentize-script.py script to d:\pyth27\Scripts
Installing pygmentize.exe script to d:\pyth27\Scripts
Installing pygmentize.exe.manifest script to d:\pyth27\Scripts

Using d:\pyth27\lib\site-packages\pygments-1.5-py2.7.egg
Finished processing dependencies for vcs==0.2.2

但是当我尝试导入它时,我得到:

d:\pyth27>python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import vcs
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named vcs

python的PS自动安装程序不起作用,因为我在使用ntlm-authorization的公司代理下

4

1 回答 1

2

好像出了点问题:

warning: install_lib: 'build\lib' does not exist -- no Python modules to install

必须setup.py从源分发目录运行:

cd inst\vcs
d:\pyth27\inst\vcs>python setup.py install

包含的setup.py脚本期望能够在当前工作目录中找到文件,并且从目录外部运行脚本会失败这些期望。

于 2012-12-04T07:35:00.690 回答