How do I add the --trusted-host in pycharm package install?

*爱你&永不变心* 提交于 2019-12-22 05:18:10

问题


I installed Pycharm community Edition 2016.1.4 on a Windows 7 machine and tried to update some packages used by the project I intend to work on. The update failed because the local repository "is not trusted or a secure host" (according to pip), so to update packages in the command-line I need to run:

pip install <package> --trusted-host <insecure-host>

Is it possible to specify in PyCharm that --trusted-host option or is Pycharm so concerned about my security that it won't allow me to do so?


回答1:


After some digging I found the answer. Registering it here in case someone is interested.

Go to

File --> Settings --> Project: name_of_the_project --> Project Interpreter

Choose (double click) the package you want to update and the Available Packages will pop-up. There is a checkbox Options on the lower-left part of the window. Check that and enter

--trusted-host hostname

Option and hit the Install Package button.

That way I was able to update the package from the insecure host, thus solving my problem.



来源:https://stackoverflow.com/questions/38468224/how-do-i-add-the-trusted-host-in-pycharm-package-install

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