我有一個運行Python 3.5的虛擬環境。我跑我的源命令和PIP跑到安裝口技:虛擬環境「no module named」error
(venv) Daniels-Air:bin danieldow$ pip list
beatbox (32.1)
pip (8.1.2)
requests (2.11.0)
setuptools (25.1.6)
six (1.10.0)
slack (0.0.2)
slackclient (1.0.1)
websocket-client (0.37.0)
wheel (0.29.0)
然而,當我試圖導入我得到:
(venv) Daniels-Air:bin danieldow$ python3
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import beatbox
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/danieldow/venv-python3/venv/lib/python3.5/site-packages/beatbox/__init__.py", line 1, in <module>
from _beatbox import _tPartnerNS, _tSObjectNS, _tSoapNS, SoapFaultError, SessionTimeoutError
ImportError: No module named '_beatbox'
在用於現場表演口技目錄打包-beatbox模塊是存在的:
(venv) Daniels-Air:site-packages danieldow$ pwd
/Users/danieldow/venv-python3/venv/lib/python3.5/site-packages
(venv) Daniels-Air:site-packages danieldow$ cd beatbox
(venv) Daniels-Air:beatbox danieldow$ ls
__init__.py _beatbox.py python_client.py
__pycache__ marshall.py xmltramp.py
有人可以告訴mw我做錯了什麼,或者我可以嘗試嗎?
謝謝!
丹
* PS在Pycharm,在翻譯,它確實表明了包作爲正在安裝。