我使用xubuntu 14.04.3,它的預設python版本是python 2.7.6和python 3.4.3。
./configure
make
sudo make -i install
make
顯示一些未找到的模組:
INFO: Can't locate Tcl/Tk libs and/or headers
Python build finished, but the necessary bits to build these modules were not found:
_bsddb _sqlite3 _ssl
_tkinter bsddb185 bz2
dbm gdbm readline
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
然後我運行sudo pip install pyftpdlib
安裝模組,然後我可以看到它安裝正常
pip show pyftpdlib
---
Metadata-Version: 2.0
Name: pyftpdlib
Version: 1.4.0
Summary: Very fast asynchronous FTP server library
Home-page: https://github.com/giampaolo/pyftpdlib/
Author: Giampaolo Rodola'
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires:
但是當我在python shell或.py中導入pyftpdlib時,python顯示錯誤ImportError: No module named pyftpdlib
如果我修改了PYTHONPATH,導入模組就可以了,我應該修改root和普通用戶,並且當使用sudo時,它仍然顯示找不到模組。如何解決這個問題呢?或返回預設狀態。