pyenv-win
Install using the ZIP in * Installation * on GitHbu.
Download the master branch ZIP and download the directory pointed to by the environment variable % USERPROFILE%
(often Expand to C: \ Users \ [username]
).
When unzipped, the files and directories below will be unzipped, so change the directory pyenv-win-master
to .pyenv
.
master.Zip file structure
pyenv-win-master
│ .gitignore
│ .python-version
│ .version
│ LICENSE
│ mirrors.txt
│ README.md
│ requirements.txt
│ setup.py
│ _config.yml
│
├─.github
│ └─ISSUE_TEMPLATE
│ bug_report.md
│ feature_request.md
│
├─pyenv-win
│ │ __init__.py
│ │
│ ├─bin
│ │ pyenv
│ │ pyenv.bat
│ │
│ └─libexec
│ pyenv---version.bat
│ pyenv-commands.bat
│ pyenv-duplicate.bat
│ pyenv-exec.bat
│ pyenv-export.bat
│ pyenv-global.bat
│ pyenv-help.bat
│ pyenv-install.vbs
│ pyenv-local.bat
│ pyenv-rehash.bat
│ pyenv-shell.bat
│ pyenv-shims.bat
│ pyenv-uninstall.vbs
│ pyenv-version.bat
│ pyenv-versions.bat
│ pyenv-whence.bat
│ pyenv-which.bat
│ pyenv.vbs
│
└─tests
test_install.bat
test_uninstall.bat
After making changes, use the dir command to locate the pyenv
command.
cmd> dir %USERPROFILE%\.pyenv\pyenv-win\bin\pyenv
There is no volume label for drive C.
Volume serial number is BA29-3C85
C:\Users\example-user\.pyenv\pyenv-win\bin directory
2020/02/09 22:07 55 pyenv
1 file 55 bytes
0 directories 790,862,061,568 bytes of free space
Add one environment variable and add two directories to PATH
.
--New environment variables
%USERPROFILE%\.pyenv\pyenv-win
--Added to the beginning of the environment variable PATH--First, check the installable version with pyenv install -l
.
--Next, install the required version. For 3.8.1, run pyenv install 3.8.1
.
--And specify the version to use. pyenv local 3.8.1
--Finally, run pyenv rehash
to update% USERPROFILE% \ .pyenv \ pyenv-win \ shims%
.
Run python --version
and pip --version
to make sure it is the version you specified.
cmd>python --version
Python 3.8.1
cmd>pip --version
pip 20.0.2 from c:\users\example-user\.pyenv\pyenv-win\versions\3.8.1\lib\site-packages\pip (python 3.8)
If you run python
and the Microsoft Store below is displayed, there are two possible causes.
% USERPROFILE% \ .pyenv \ pyenv-win \ shims
directory is empty. In this case, run pyenv rehash
to update the contents of the% USERPROFILE% \ .pyenv \ pyenv-win \ shims
directory.Path
is% USERPROFILE% \ AppData \ Local \ Microsoft \ WindowsApps
followed by % PYENV% \ shims
. In this case, % PYENV% \ shims
comes first.Run pyenv rehash
to update% PYENV% \ shims
.
pipenv
Install with pip
and do pyenv rehash
.
cmd> pip install pipenv
cmd> pyenv rehash
cmd> pipenv --version
pipenv, version 2018.11.26
Now that the installation is complete, use pipenv install
to install the required packages.
Recommended Posts