0
我需要使用一個名爲pem的python模塊。它可以在這裏找到: https://pypi.python.org/pypi/pem/15.0.0#downloads如何在python 2.7中安裝pem模塊?
我是一個Windows 7 64位用戶。我使用Python 2.7。
我從網頁下載了文件。我把文件放在C:directoy中。然後我打開命令行提示符和類型:
C:\Python27\Scripts>pip install --egg pem
我得到這個消息:
Requirement already satisfied (use --upgrade to upgrade): pem in c:\users\xx\appd
ata\roaming\python\python27\site-packages
請幫助我如何安裝此PEM模塊。由於其他模塊的其他限制,我無法升級到python 3。根據模塊的網頁,pem支持Python 2.7。
編輯: 當我試圖導入pem。我得到:
>>> import pem
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\xx\AppData\Roaming\Python\Python27\site-packages\pem\__init__.py
", line 3, in <module>
from . import twisted
File "C:\Users\xx\AppData\Roaming\Python\Python27\site-packages\pem\twisted.py"
, line 12, in <module>
from twisted.internet import ssl
ImportError: No module named twisted.internet
它告訴你你*已經安裝了'pem',那麼真正的問題是什麼? – jonrsharpe
@ jonrsharpe後編輯。 – user2192774
所以看起來問題是'pem' *依賴*,而不是模塊本身。你是否嘗試過安裝'twisted'?該項目的['setup.py'](https://github.com/hynek/pem/blob/master/setup.py#L86)聲稱它不需要任何外部軟件包(並且PyPI頁面顯示它*沒有依賴關係「*),但也許嘗試從['dev-requirements.txt'](https://github.com/hynek/pem/blob/master/dev-requirements.txt)進行安裝,其中包括'twisted' 。您也可以考慮在項目的GitHub頁面上提出問題。 – jonrsharpe