pip: 15 items found.

First start ansible on macos

I installed the ansible via pip install, and there are several issues here:

where is the config

Here you should create a file ~/.ansible.cfg

[defaults]
inventory =~/.ansible/hosts
sudo_user=root
remote_port=22
host_key_checking=False
remote_user=root
log_path=~/.ansible/log/ansible.log
module_name=command
private_key_file=~/.ssh/id_rsa
More ~

ld: library not found for -lssl - Install mysqlclient for Django 2, macos

Background

mysql server was installed by brew install mysql

Issues like this:

ERROR: Failed building wheel for mysqlclient

ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1

Exception: Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?

More ~

Dockerfile指定pip安装源

Dockerfile使用的python3.7作为基础镜像 FROM python:3.7,但是执行
RUN pip install --no-cache-dir -r requirements.txt
是默认走了这个源,https://files.pythonhosted.org/packages,编译用时太久。

无赖修改成国内源来加快编译速度:
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -r requirements.txt

附国内其它源:
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

More ~

Could not fetch URL https://pypi.python.org/simple/pyecharts/

用virtual env后 pip安装一些个库可能会报这个

Could not fetch URL https://pypi.python.org/simple/*/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661) - skipping

原因在于pip版本过低了,我的python2.7 用env后就是8.0,可以用下面的方法更新再重试pip install

curl https://bootstrap.pypa.io/get-pip.py | python

More ~