1

As described in the title, the following config, doesn't enable the proxy.

export http_proxy="socks5://127.0.0.1:1080"
export http_proxys="socks5://127.0.0.1:1080"

pyenv install 3.5.2

is there other methods?

3 Answers 3

6

After try lots of methods, it can only work in this way:

https_proxy=socks5://127.0.0.1:1080 pyenv install -v 3.5.2
5

Add proxy for pyenv not work

here:

export HTTP_PROXY=http://127.0.0.1:58591; export HTTPS_PROXY=http://127.0.0.1:58591; export ALL_PROXY=socks5://127.0.0.1:51837

pyenv install -v 3.10.6

and

https_proxy=socks5://127.0.0.1:51837 pyenv install -v 3.10.6

not work

Workaround: manually download and move to pyenv cache

except use proxy, if you just want to speed up pyenv, another way is:

manually download python zip file, put into pyenv cache

steps:

  1. download https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
    • which show when pyenv install 3.7.3
    • eg
      • wget: wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
      • wget use https proxy: wget -e "https_proxy=https://127.0.0.1:58591" https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
  2. move downloaded Python-3.7.3.tar.xz into ~/.pyenv/cache
    • create folder mkdir ~/.pyenv/cache if not existed
0
4

no inline version of the answer from @Leon:

export https_proxy=socks5://127.0.0.1:1080
# do something
unset https_proxy
2
  • 1
    I noticed that you have a typo in your question. It should be https_proxy instead of http_proxys. I guess pyenv is working through HTTPS protocol so none of your 'export' gonna work in that case.
    – Kyan
    Jan 13, 2017 at 7:38
  • woo, that's it. Tnx
    – Leon
    Jan 14, 2017 at 6:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.