pip install mysql
报错:
cryptography requires setuptools 18.5 or newer, please upgrade to a new version
sudo pip install --upgrade pip
其实需要更新的是setuptools:
sudo pip install -t /usr/local/lib/python3.6/site-packages/ setuptools
针对多python版本的情况:
安装到python2.7:
sudo pip install pymysql
安装到python3.4:
sudo pip install -t /usr/local/lib/python3.4/site-packages/ pymysql
安装到python3.6:
sudo pip install -t /usr/local/lib/python3.6/site-packages/ pymysql
安装到虚拟环境中:
sudo pip install -t ~/Pycharm/py36env/lib/python3.6/site-packages pymysql
报错:
Could not fetch URL https://pypi.python.org/simple/requests/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
解决方式:
sudo pip --trusted-host pypi.python.org install -t ~/PycharmProjects/py36env/lib/python3.6/site-packages/ mysql
问题解决。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:mmqy2019@163.com进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。
长按识别二维码并关注微信
更方便到期提醒、手机管理