[英]How to install Memcached in a virtualenv
我正在尝试在virualenv中安装memcached python绑定:
(env1)ubuntu@ip-172-31-28-196:~$ pip uninstall python-memcached
Cannot uninstall requirement python-memcached, not installed
(env1)ubuntu@ip-172-31-28-196:~$ pip install python-memcached
Collecting python-memcached
Using cached python-memcached-1.53.tar.gz
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-x1yj76g5/python-memcached/setup.py", line 4, in <module>
import memcache
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-x1yj76g5/python-memcached/setup.py", line 4, in <module>
import memcache
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-x1yj76g5/python-me
mcached
我该如何工作
编辑:
Not searching http://www.tummy.com/Community/software/python-memcached/ (from https://pypi.python.
org/simple/python-memcached/) for files because external urls are disallowed.
Not searching http://www.tummy.com/Community/software/python-memcached/ (from https://pypi.python.
org/simple/python-memcached/) for files because external urls are disallowed.
Using version 1.53 (newest of versions: 1.53, 1.52, 1.51, 1.48, 1.47, 1.31)
Using cached python-memcached-1.53.tar.gz
Downloading from URL https://pypi.python.org/packages/source/p/python-memcached/python-memcached-1
.53.tar.gz#md5=89570d26e7e7b15caa668a6b2678bd3c (from https://pypi.python.org/simple/python-memcache
d/)
Running setup.py (path:/tmp/pip-build-j_435lge/python-memcached/setup.py) egg_info for package pyt
hon-memcached
Running command python setup.py egg_info
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-j_435lge/python-memcached/setup.py", line 4, in <module>
import memcache
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-j_435lge/python-memcached/setup.py", line 4, in <module>
import memcache
----------------------------------------
Cleaning up...
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-j_435lge/python-me
mcached
Exception information:
Traceback (most recent call last):
File "/home/ubuntu/.virtualenvs/env1/lib/python3.4/site-packages/pip/basecommand.py", line 232
, in main
status = self.run(options, args)
File "/home/ubuntu/.virtualenvs/env1/lib/python3.4/site-packages/pip/commands/install.py", lin
e 339, in run
requirement_set.prepare_files(finder)
File "/home/ubuntu/.virtualenvs/env1/lib/python3.4/site-packages/pip/req/req_set.py", line 385
, in prepare_files
req_to_install.run_egg_info()
File "/home/ubuntu/.virtualenvs/env1/lib/python3.4/site-packages/pip/req/req_install.py", line
358, in run_egg_info
command_desc='python setup.py egg_info')
File "/home/ubuntu/.virtualenvs/env1/lib/python3.4/site-packages/pip/utils/__init__.py", line
749, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-build-j_435lge/python-memcached
(env1)ubuntu@ip-172-31-28-196:~$
编辑2:
(env1)ubuntu@ip-172-31-28-196:~$ sudo apt-get install memcached
Reading package lists... Done
Building dependency tree
Reading state information... Done
memcached is already the newest version.
The following packages were automatically installed and are no longer required:
python-colorama python-distlib python-html5lib
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 70 not upgraded.
(env1)ubuntu@ip-172-31-28-196:~$ pip install python-memcached
Collecting python-memcached
Using cached python-memcached-1.53.tar.gz
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-k_28hio4/python-memcached/setup.py", line 4, in <module>
import memcache
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-k_28hio4/python-memcached/setup.py", line 4, in <module>
import memcache
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-k_28hio4/python-me
mcached
也许您需要先安装memcached? 像sudo apt-get install memcached
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.