Pycharm pip install wont work behind a proxy

北城以北 提交于 2019-11-30 14:03:23

There might be a couple of reasons for your issue. The first that come to mind are:

  • did you try to go to Python3 executable path and try the same command from CMD ?

    pip3.exe install --proxy=https://username:password@proxy:port packageName
    
  • you can also try the same command as above, but a bit changed:

    pip3.exe install packageName --proxy=https://username:password@proxy:port
    
  • are you sure the credentials are ok ? (apparently the connection was successfull, I just saw the first image)

  • is the proxy up ? (apparently the connection was successfull, I just saw the first image)

I'm using the latter command and it works fine with Python 3.5.x on Windows.

wolf72

In PyCharm you can specify the proxy in the options field in the Available Packages Dialog:

This dialog is reachable from the Project Interpreter page by clicking the + button

This is best solution :

pip install requests

If that command is not work in Pycharm, reason is proxy or web filtering and something like this.

For fixing this problem you could do these steps :

1. Go to pypi.org

2. Then find your package ( requests )

3. Then in Download section copy .targz link address

4. In Pycharm terminal type : pip install (your link address that you copied)

5. Now press enter, If you will know your package would need some dependencies so

repeat these steps for dependencies.

  • Note: Be careful on version of package dependencies that you need to install before install your main package.

Or you will be able use Proxy with this command :

pip install --proxy=https://username:password@proxy:port YourPackageName

Senthil Ramaswamy

Create a System Environment Variable HTTPS_PROXY or HTTP_PROXY in windows with required authentication (https://user:password@proxy:port) in windows and restart Pycharm.

Then, without specifying proxy configuration inside Pycharm, install the package.

**

Fix the pycharm proxy issue in Macbook pro to install libraries behind the corporate proxy:

**

go to System settings --> HTTP Proxy

Select Manual proxy configuration --> HTTP Proxy

  • Host Name : your company hostname --Example.com--

  • port number : specify your corporate proxy --port number--

Check Proxy Authentication : Give your system login credentials --> Login and password --> Check Reminder box

Check the connection: e.g: http://www.google.com

Now you should be able to download libraries inside the proxy from pycharm.

If you want to install packages from terminal :

pip install --proxy http://username:password@proxy.com:port package-name

e.g: pip install --proxy http://manojnirale:password%40@proxy.com:8080 spacy

Username:corporate id Password having special characters use Unicode Unicode for @ will be %40 . Please find the below link for Unicode conversion https://r12a.github.io/app-conversion/

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