- 1 year ago
pyenv install the specific zip file (python-3.9.12-embed-amd64.zip) instead of default exe file (python-3.9.12-amd64.exe)
By default, pyenv
installs Python versions from source or precompiled binaries in the form of executable (exe
) files. However, if you have a specific zip file, such as python-3.9.12-embed-amd64.zip
, that you want to use for installation, you can follow these steps:
Place the Zip File in the Right Location:
Move thepython-3.9.12-embed-amd64.zip
file to the appropriate directory wherepyenv
expects to find Python versions. This location can vary depending on your operating system. For example, on Unix-like systems, you can typically place it in the~/.pyenv/cache
directory.Modify the Python Version Definition:
Edit the Python version definition inpyenv
to use the zip file instead of the defaultexe
file. Run the following command in your terminal:csspyenv install --list
This command will list the available Python versions. Locate the entry for
3.9.12
and note the identifier associated with it, which is typically in the form of3.9.12/env
. Use this identifier in the following command:csspyenv install <identifier> --from-path <path-to-zip-file>
Replace
<identifier>
with the appropriate identifier for3.9.12
, and<path-to-zip-file>
with the full path to thepython-3.9.12-embed-amd64.zip
file.For example:
javascriptpyenv install 3.9.12/env --from-path ~/.pyenv/cache/python-3.9.12-embed-amd64.zip
This command tells
pyenv
to install Python 3.9.12 from the specified zip file.Verify the Installation:
After the installation is complete, you can verify that the specific zip file is used by runningpyenv versions
. You should see the installed version,3.9.12
, listed.pyenv versions
By following these steps, you should be able to install Python 3.9.12 using the specific zip file python-3.9.12-embed-amd64.zip
with pyenv
.