Python环境(基于Pycharm和官方python包)搭建顺序
1.下載安裝包
python官網下載3.7.2
Pycharm 社區版下載安裝
2.直接使用Pycharm自帶virtualEnv
File - Settings - Project - Project Interpreter - (右側的齒輪)Add - Virtualenv enviroment - New Virtualenv
說說不用Anoconda原因。
主要是Anoconda到python環境導入到Pycharm時再新增包時,提示SSL連接無法建立。
(
Collecting opencv-python==3.4.2.17
Could not fetch URL https://pypi.org/simple/opencv-python/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/opencv-python/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
)
(原因沒有SSL模塊支持,Ubuntu下apt-get install openssl解決,但python官網的安裝包默認就有ssl)
所以,Pycharm導入python官網環境后,再新增包時,輕松pip install了。
所以如果在Pycharm下管理python環境,就可以用上述的第2點方法
轉載于:https://blog.51cto.com/cfy10/2343997
總結
以上是生活随笔為你收集整理的Python环境(基于Pycharm和官方python包)搭建顺序的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 时间复杂度
- 下一篇: 更改一字段的全部字节的大小写