Python setuptools with company signed SSL certificate

*爱你&永不变心* 提交于 2020-01-30 05:05:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!