1.如果你遇到这个Command "/home/python/.virtualenvs/Vueshp/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-5rxrp9rh/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-3pvu5281-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/python/.virtualenvs/Vueshp/include/site/python3.5/pillow" failed with error code 1 in /tmp/pip-build-5rxrp9rh/pillow
并且下面有提示你的pip不是最新版的,请先更新pip最新版再尝试,版本不一样居然也会报错
更新pip3(先确保安装pip3)
pip3 install --upgrade pip
更细pip
python -m pip install --upgrade pip
2.sudo pip install MySQL-python报错:
pip install MySQL-python
You are using pip version 7.1.0, howeverversion 8.1.1 is available.
You should consider upgrading via the 'pipinstall --upgrade pip' command.
Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-BIzI3N/MySQL-python/setup.py", line 17,in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
解决方法:
yum install python-devel
yum install mysql-devel
yum install gcc