Giter Site home page Giter Site logo

Comments (12)

native-api avatar native-api commented on September 25, 2024 1

Pyenv does support downloading from a mirror by setting the PYTHON_BUILD_MIRROR_URL envvar.

It however needs to be organized like our mirror at https://pyenv.github.io/pythons : the path to a package is $PYTHON_BUILD_MIRROR_URL/<checksum from URL in installation script (the text after the # in the URL argument to "install_*" )>.

from pyenv.

kirkzhangtech avatar kirkzhangtech commented on September 25, 2024 1

ah~
you mean that

  1. i need to manually download tar from mirror site
  2. put tar into ~/.pyenv/cache folder
  3. run pyenv install tar

is it right ?

from pyenv.

native-api avatar native-api commented on September 25, 2024 1

Should they have any questons, you can direct them here.
The current scheme was created by @yyuu , the creator of Pyenv. I think the rationale was to abstract away differences between official sites for different Python flavors and their occasional changes. And also possibly to accomodate private mirror owners who may not wish to replicate full directory structure of an official site.

E.g. if we were to simply replace a part of an official URL -- which part should we replace? How many levels has the mirror's owner replicated?

from pyenv.

kirkzhangtech avatar kirkzhangtech commented on September 25, 2024

$ export PYTHON_BUILD_MIRROR_URL="http://yoursite.example.com/pythons"
$ pyenv install 2.7.7

if above two lines are enough ?

from pyenv.

native-api avatar native-api commented on September 25, 2024

$ export PYTHON_BUILD_MIRROR_URL="http://yoursite.example.com/pythons" $ pyenv install 2.7.7

if above two lines are enough ?

Yes. Provided that you actually put the file to the mirror 🙂

from pyenv.

kirkzhangtech avatar kirkzhangtech commented on September 25, 2024

image

i put mirror site into environment variable, but still not work , pyenv still download interpreter from original site

from pyenv.

native-api avatar native-api commented on September 25, 2024

Did you put the file to the mirror under the correct name? See updated info above and see https://pyenv.github.io/pythons for URL examples.

from pyenv.

native-api avatar native-api commented on September 25, 2024

You need to put the Python package that you'll be downloading onto the mirror that you've specified.

In your case,the file https://www.python.org/ftp/python/3.7.17/Python-3.7.17.tar.xz needs to be available as https://mirrors.huaweicloud.com/python/7911051ed0422fd54b8f59ffc030f7cf2ae30e0f61bda191800bb040dce4f9d2 . "7911051ed0422fd54b8f59ffc030f7cf2ae30e0f61bda191800bb040dce4f9d2" should be the actual file name, and the URL needs to lead directly to the file.

I see that you've replicated the official site's structure. In this case, the easiest would probably be to create symlinks if the mirror allows that. E.g.:

https://mirrors.huaweicloud.com/python/ :

7911051ed0422fd54b8f59ffc030f7cf2ae30e0f61bda191800bb040dce4f9d2 -> 3.7.17/Python-3.7.17.tar.xz

from pyenv.

kirkzhangtech avatar kirkzhangtech commented on September 25, 2024

to be honestly , i could not do that https://mirrors.huaweicloud.com/python is public site which i do not own it .
how about https://pyenv.github.io/pythons/ link ?

from pyenv.

native-api avatar native-api commented on September 25, 2024

how about https://pyenv.github.io/pythons/ link ?

It's outside Mainland China, so I don't think that'll help you.

https://mirrors.huaweicloud.com/python is public site which i do not own it

You can ask them to add the symlinks. Pyenv is an industry standard so they might be willing to accomodate us.

from pyenv.

zzxCNCZ avatar zzxCNCZ commented on September 25, 2024

ah~ you mean that

  1. i need to manually download tar from mirror site
  2. put tar into ~/.pyenv/cache folder
  3. run pyenv install tar

is it right ?

this works for me

from pyenv.

zzxCNCZ avatar zzxCNCZ commented on September 25, 2024

ah~ you mean that

  1. i need to manually download tar from mirror site
  2. put tar into ~/.pyenv/cache folder
  3. run pyenv install tar

is it right ?

this works for me

step 3 : run pyenv install ${python version code} will be ok

from pyenv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.