anaconda3创建纯净python2.7环境

使用环境

ubuntu 16.04 默认python2.7

目标

创建纯净的python2.7环境,不依赖系统环境

方法

  1. 创建一个文件xx.txt, 只可以用.txt文件
@EXPLICIT
https://repo.anaconda.com/pkgs/free/linux-64/python-2.7.13-0.tar.bz2
https://repo.anaconda.com/pkgs/free/linux-64/pip-9.0.1-py27_1.tar.bz2

上面的链接都是Anaconda镜像列表上的源码包,

  1. conda create --name myenv --file xx.txt 创建纯净python环境(只有python和pip)

问题

  1. Q: 上述步骤可创建成功,但在更新pip版本时报错.
$ pip install --upgrade pip 
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pip/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not fetch URL https://mirrors.aliyun.com/pypi/simple/pip/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Requirement already up-to-date: pip in ./envs/pyrcc_py27/lib/python2.7/site-packages
You are using pip version 9.0.1, however version 22.0.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

A: 暂未解决,且重复上诉操作后无法再创建纯净环境

  1. Q:pip路径为系统路径?

你可能感兴趣的:(ubuntu,python)