python开发问题
1. pip3
'''
pip3 install --upgrade pip
sudo apt-get install python3-setuptools
pip3 install --upgrade pip
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in
from pip import main
ImportError: cannot import name 'main'
sudo vim pip3
import sys
from pip import main
if name == 'main':
sys.exit(main())
Change to:
import sys
from pip import main
if name == 'main':
sys.exit(main._main())
'''
2.ModuleNotFoundError: No module named '_sqlite3'
>>>sudo apt-get install libsqlite3-dev
重新编译和安装Python:
先进入Python源文件目录下,例如我的是Python-3.6.2
>>>cd Python-3.7.2
>>>./configure
>>>make
>>>sudo make install
3.Collecting Twisted>=13.1.0 (from scrapy)
Could not find a version that satisfies the requirement Twisted>=13.1.0 (from scrapy) (from versions: )
No matching distribution found for Twisted>=13.1.0 (from scrapy)
sudo apt-get install bzip2 libbz2-dev
>>>cd Python-3.7.2
>>>./configure
>>>make
>>>sudo make install