How can I install a python .egg file

自古美人都是妖i 提交于 2020-01-11 05:19:09

问题


I am trying to install twisted on python 2.6 and it seems that the Zop interface is missing. Also it seems that it is a .egg file. I downloaded this .egg file, now how can I install it?


回答1:


Install virtualenv, which includes pip. Then you can simply run:

pip install twisted

pip will handle installing the zope.interface.

Instructions for installing virtualenv and pip on OS X

This is how I installed virtualenv and pip on OS X:

curl -O http://peak.telecommunity.com/dist/ez_setup.py
sudo python ez_setup.py
sudo easy_install pip
sudo pip install virtualenv

I also like to use virtualenvwrapper with virtualenv, so I installed it using:

sudo pip install virtualenvwrapper

Instructions for installing Twisted in a virtualenv

Now to create a new virtual environment and install Twisted, I simply issue:

mkvirtualenv twisted-env
pip install twisted



回答2:


Get the egg you need from here:

http://pypi.python.org/pypi/zope.interface

Click the most recent version and scroll down to see the download links to the eggs.

Unzip with 7zip en place the contents here:

C:\Python27\Lib\site-packages

(or wherever your Python installation is located)



来源:https://stackoverflow.com/questions/4314376/how-can-i-install-a-python-egg-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!