Vou*_*kan 2 python linux django ubuntu python-2.7
我目前正在尝试在ubuntu上安装mysqlclient-python以与Django一起使用并遇到问题.
我正在关注此页面:https://github.com/PyMySQL/mysqlclient-python
但是,当我运行'pip install mysqlclient'时,我收到以下错误:
running install_lib
copying build/lib.linux-x86_64-2.7/_mysql_exceptions.py -> /usr/local/lib/python2.7/dist-packages
error: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/_mysql_exceptions.py'
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_robofish/mysqlclient/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ynYYW0-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_robofish/mysqlclient
Storing debug log for failure in /home/robofish/.pip/pip.log
Run Code Online (Sandbox Code Playgroud)
我检查了/usr/local/lib/python2.7/目录,它似乎是空的.这可能是问题吗?
您似乎正在尝试在全局Python环境中安装mysqlclient.我强烈建议使用virtualenv来创建一个孤立的Python环境.
如果您仍想使用全局环境,请使用sudo pip install mysqlclient.
| 归档时间: |
|
| 查看次数: |
1334 次 |
| 最近记录: |