2017-04-17 95 views
0

我正在虛擬環境中安裝軟件包。即使模塊已安裝,也會出現ImportError

(venv)pynanomsg]$ python 
    >>> import constants 
    Traceback (most recent call last): 
     File "<stdin>", line 1, in <module> 
    ImportError: No module named constants 

但如果我安裝它使用pip,它說:

$ pip install constants 
Requirement already satisfied: constants in  /usr/local/lib/python2.7/site-packages 

回答

0

我想你應該在你的虛擬環境中嘗試pip install constants

(venv)$ pip install constants 
相關問題