我sudo fab deps_local
在 Ubuntu 的终端中执行并得到以下输出:
[localhost] local: sudo easy_install pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Reading http://www.pip-installer.org
Reading http://pip.openplans.org
Best match: pip 1.3.1
Downloading http://pypi.python.org/packages/source/p/pip/pip- 1.3.1.tar.gz#md5=cbb27a191cebc58997c4da8513863153
Processing pip-1.3.1.tar.gz
Writing /tmp/easy_install-u4gcui/pip-1.3.1/setup.cfg
Running pip-1.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-u4gcui/pip- 1.3.1/egg-dist-tmp-_xmcut
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Adding pip 1.3.1 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip-2.7 script to /usr/local/bin
Installed /usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
[localhost] local: sudo pip install virtualenv
Downloading/unpacking virtualenv
Downloading virtualenv-1.9.1.tar.gz (2.0MB): 45kB downloaded
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/basecommand.py", line 139, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1- py2.7.egg/pip/commands/install.py", line 266, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1033, in prepare_files
self.unpack_url(url, location, self.is_download)
File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1161, in unpack_url
retval = unpack_http_url(link, location, self.download_cache, self.download_dir)
File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/download.py", line 554, in unpack_http_url
download_hash = _download_url(resp, link, temp_location)
File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/download.py", line 458, in _download_url
chunk = resp.read(4096)
File "/usr/lib/python2.7/socket.py", line 380, in read
data = self._sock.recv(left)
File "/usr/lib/python2.7/httplib.py", line 561, in read
s = self.fp.read(amt)
File "/usr/lib/python2.7/socket.py", line 380, in read
data = self._sock.recv(left)
File "/usr/lib/python2.7/ssl.py", line 241, in recv
return self.read(buflen)
File "/usr/lib/python2.7/ssl.py", line 160, in read
return self._sslobj.read(len)
SSLError: The read operation timed out
Storing complete log in /home/asus/.pip/pip.log
Fatal error: local() encountered an error (return code 2) while executing 'sudo pip install virtualenv'
Aborting.
asus@ubuntu:~/ADL_LRS$
代码似乎sudo fab deps_local
运行得不太好。我说得对吗?如果是这样,我该怎么办?
答案1
您只是遇到了连接问题。
我不知道fab deps_local
是什么,但我猜你提供的输出可能是这个的结果。我看到的只是
sudo pip install virtualenv
导致
Downloading virtualenv-1.9.1.tar.gz (2.0MB): 45kB downloaded
[...]
SSLError: The read operation timed out
因此请检查您的网络连接,否则目标网站可能因维护而关闭。