Python/pip/docker-compose
1. apt install python-pip
2.yum -y install python-pip
3. get-pip.py
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
root@Debian:~# python2 get-pip.py
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting pip
Downloading pip-20.0.2-py2.py3-none-any.whl (1.4 MB)
|################################| 1.4 MB 45 kB/s
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 1.5.6
Uninstalling pip-1.5.6:
Successfully uninstalled pip-1.5.6
Successfully installed pip-20.0.2 *********** Latest version of pip !!!!!!!!
### Update
pip install --upgrade pip -vvv
pip install --upgrade setuptools
### Dev lib for docker
-
compose
apt install python-dev libffi-dev libssl-dev
PyPI使用国内源
通过几次 pip 的使用,对于默认的 pip 源的速度实在无法忍受,从国外下载很慢,于是便搜集了一些国内的pip源,如下:
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
使用方式:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ docker
-
compose
root@Debian:~# which docker-compose
/usr/local/bin/docker-compose
root@Debian:~#
root@Debian:~# /usr/local/bin/docker-compose --version
/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py:163: CryptographyDeprecationWarning: OpenSSL version 1.0.1 is no longer supported by the OpenSSL project, please upgrade. The next version of cryptography will drop support for it.
utils.CryptographyDeprecationWarning
docker-compose version 1.25.4, build unknown