0

I am trying to add --trusted-host to Pycharm (2018.2.5 community editions) package installer. However it does not work.

for exampl: python -m pip install scipy --trusted-host pypi.org

enter image description here

I even tried to add "--trusted-host pypi.org " in the option. Still doesn't work.

enter image description here

H'H
  • 1,638
  • 1
  • 15
  • 39
  • 1
    Does this answer your question? [How do I add the --trusted-host in pycharm package install?](https://stackoverflow.com/questions/38468224/how-do-i-add-the-trusted-host-in-pycharm-package-install) – gmauch Nov 29 '19 at 13:06
  • no that solution does not work. – H'H Nov 29 '19 at 13:11
  • 1
    This is a very different error to your original screenshot and, unfortunately, one I haven't managed to recreate despite downgrading pip, etc. to try to match your configuration. Perhaps [upgrade pip](https://stackoverflow.com/questions/49748063/pip-install-fails-for-every-package-could-not-find-a-version-that-satisfies) and try again? – David Buck Nov 29 '19 at 13:43
  • Thanks, I upgraded pip and now it is working – H'H Nov 29 '19 at 13:50

2 Answers2

1

In your output it shows that you are only supplying

--trusted-host

as the option and, the way PyCharm has built the command, it has tried to execute

pip install --trusted-host scipy

hence the error "You must give at least one requirement to install". This is the same error as if you had just tried to execute pip install with no arguments. It has interpreted scipy as part of the --trusted-host option, therefore you're not trying to install anything.

Adding

--trusted-host pypi.org

as the option works for me.

David Buck
  • 3,752
  • 35
  • 31
  • 35
  • Thanks for your answer, However I have already tried it. didn't work, I edited my question. – H'H Nov 29 '19 at 13:10
1

You can also add the other hostname: --trusted-host pypi.org --trusted-host files.pythonhosted.org

Bastet
  • 36
  • 3