如何在pycharm软件包安装中添加--trusted-host? [英] How do I add the --trusted-host in pycharm package install?

查看:1087
本文介绍了如何在pycharm软件包安装中添加--trusted-host?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7机器上安装了Pycharm社区版2016.1.4,并尝试更新一些我打算从事的项目使用的软件包.更新失败是因为本地存储库"不可信或安全主机"(根据 pip ),因此要在命令行中更新程序包,我需要运行:

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>

是否可以在PyCharm中指定-trusted-host 选项,还是Pycharm如此担心我的安全性而不允许我这样做?

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.

转到

文件-> 设置->项目:名称_项目_em -> 项目解释器

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

选择(双击)您要更新的软件包,然后弹出可用软件包.窗口左下方有一个复选框 Options .检查并输入

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

-受信任的主机主机名

选项,然后点击安装软件包按钮.

这样,我就可以从不安全的主机上更新软件包,从而解决了我的问题.

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

这篇关于如何在pycharm软件包安装中添加--trusted-host?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆