我知道很多問題談論這個問題,但我嘗試了很多,並沒有任何鰭解決我的「非常經典」的問題:Python的導入失敗altough安裝的軟件包:Python的導入失敗Openpyxl
MacBook-Pro-de-Stephanie:scripts user$ sudo -H pip install openpyxl
Collecting openpyxl
Requirement already satisfied (use --upgrade to upgrade): jdcal in /usr/local/lib/python2.7/site-packages (from openpyxl)
Requirement already satisfied (use --upgrade to upgrade): et-xmlfile in /usr/local/lib/python2.7/site-packages (from openpyxl)
Installing collected packages: openpyxl
Successfully installed openpyxl-2.3.5
包安裝正確嗎?
MacBook-Pro-de-Stephanie:scripts user$ python interactionsXLSX2CSV.py
Traceback (most recent call last):
File "interactionsXLSX2CSV.py", line 5, in <module>
from openpyxl import load_workbook
ImportError: No module named openpyxl
對不對?
MacBook-Pro-de-Stephanie:scripts user$ echo $PYTHONPATH
/usr/local/lib/python2.7/:
路徑似乎沒問題,不是嗎?
我設置的權限:
sudo chmod -R ugo+rX ./lib/python2.7/site-packages/
可我嘗試什麼? 非常感謝你
在Mac OS ElCapitan! – Max