简体   繁体   中英

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

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM