windows 环境pycharm python 多环境开发设置
在python项目开发中,很多情况每个项目采用不同的python 环境,一般常见的系统默认python 版本为 python 2.7但如果又不想破坏系统原来的python 环境,则可以安装virualenv 依赖解决多版本的问题 virtualen 采用pip install 安装,不管是采用python3版本的pip,还是 python2版本的pip都可以安 装这个依赖,pycharm 具体设置如下:
在python项目开发中,很多情况每个项目采用不同的python 环境,一般常见的系统默认python 版本为 python 2.7但如果又不想破坏系统原来的python 环境,则可以安装virualenv 依赖解决多版本的问题 virtualen 采用pip install 安装,不管是采用python3版本的pip,还是 python2版本的pip都可以安 装这个依赖,pycharm 具体设置如下:
因为python版本2.7太低,涉及ssl不兼容,需要升级到最新版本的python2.7
具体错误代码如下:
SNIMissingWarning d:\python27\lib\site-packages\pip_vendor\urllib3\util\ssl_.py:160: InsecurePlatformWarning: A true SSLContext object is not available. This pre vents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPo ol(host=‘pypi.org’, port=443): Read timed out. (read timeout=15)”,)’: /simple/ndg-httpsclient/ d:\python27\lib\site-packages\pip_vendor\urllib3\util\ssl_.py:160: InsecurePlatformWarning: A true SSLContext object is not available. This pre vents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPo ol(host=‘pypi.org’, port=443): Read timed out. (read timeout=15)”,)’: /simple/ndg-httpsclient/ d:\python27\lib\site-packages\pip_vendor\urllib3\util\ssl_.py:160: InsecurePlatformWarning: A true SSLContext object is not available. This pre vents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPo ol(host=‘pypi.org’, port=443): Read timed out. (read timeout=15)”,)’: /simple/ndg-httpsclient/ d:\python27\lib\site-packages\pip_vendor\urllib3\util\ssl_.py:160: InsecurePlatformWarning: A true SSLContext object is not available. This pre vents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPo ol(host=‘pypi.org’, port=443): Read timed out. (read timeout=15)”,)’: /simple/ndg-httpsclient/ d:\python27\lib\site-packages\pip_vendor\urllib3\util\ssl_.py:160: InsecurePlatformWarning: A true SSLContext object is not available. This pre vents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPo ol(host=‘pypi.org’, port=443): Read timed out. (read timeout=15)”,)’: /simple/ndg-httpsclient/ d:\python27\lib\site-packages\pip_vendor\urllib3\util\ssl_.py:160: InsecurePlatformWarning: A true SSLContext object is not available. This pre vents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning Could not find a version that satisfies the requirement ndg-httpsclient (from versions: ) No matching distribution found for ndg-httpsclient d:\python27\lib\site-packages\pip_vendor\urllib3\util\ssl_.py:160: InsecurePlatformWarning: A true SSLContext object is not available. This pre vents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning