问题
I am new to setuptools on python.
I added a package 'numpy' and 'tensorflow' to install_requires list and running python setup.py install. It does not install due to SSL issue. We use self signed SSL for https based urls.
In case of pip for individual packages I can use --cert option. As I know setuptools use pip indirectly. If so, is there anyway to force it to use --cert option when setup.py is ran?
回答1:
It turns out that we have actually two problems here.
The problem about tensorflow is related some difference between egg and wheel packages.
To solve the problem about numpy and other packages it is enough to add the following line into ~/.pip/pip.conf
file:
[global]
cert=/path/to/cert.crt
If necessarry you may add any other option values (including proxy) with same format.
来源:https://stackoverflow.com/questions/48517353/python-setuptools-with-company-signed-ssl-certificate