Comments (12)
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.
ah~
you mean that
- i need to manually download tar from mirror site
- put tar into
~/.pyenv/cache
folder - run pyenv install
tar
is it right ?
from pyenv.
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.
$ export PYTHON_BUILD_MIRROR_URL="http://yoursite.example.com/pythons"
$ pyenv install 2.7.7
if above two lines are enough ?
from pyenv.
$ 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.
i put mirror site into environment variable, but still not work , pyenv still download interpreter from original site
from pyenv.
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.
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.
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.
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.
ah~ you mean that
- i need to manually download tar from mirror site
- put tar into
~/.pyenv/cache
folder- run pyenv install
tar
is it right ?
this works for me
from pyenv.
ah~ you mean that
- i need to manually download tar from mirror site
- put tar into
~/.pyenv/cache
folder- 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)
- Python-Build: Report envvar assignments and build command invocations
- pyenv version HOT 1
- pyenv-prefix is slow when many virtual environments exist.
- Can you add pyenv completions HOT 1
- brew upgrade pyenv *** FAIL for v2.4.5.tar.gz *** HOT 2
- Cannot install 3.13t-dev with --debug HOT 1
- Internal: rework pyenv-latest -q into -f/-b
- [Question] Are the builds/results of pyenv install portable? HOT 3
- Having two identical executables for free-threaded version is misleading HOT 6
- curl: (60) SSL certificate problem using pyenv install HOT 4
- pyenv uninstall fails with version that is listed by pyenv version HOT 6
- PyEnv should offer a "latest" tag HOT 3
- Stuck while installing Python 3.12.2 using pyenv on WSL2 HOT 3
- `pip install` behaves differently from `python -m pip install`
- Better quickstart guide/opening picture HOT 8
- pyenv macOS `No module named '_curses'` (bogus header files in `/usr/local/include` and MATLAB's `ldd` disrupting `setup.py`) HOT 4
- Add /usr/etc/pyenv.d as additional directory for hooks HOT 5
- I made a wrong blockchain transfer (Help me)
- Unable to include tkinter in python 3.12.5 (or 3.11.9) on MacOS Sonoma HOT 5
- Compilation error while installing Python: "ModuleNotFoundError: No module named '_curses', 'readline' and '_sqlite3'" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyenv.