Not long ago, I was using pipenv on WSL (ubuntu18.04LTS), Although python on WSL was called and there was no problem at all, when I noticed that I had not used WSL for a while, it was in the situation of the title.
I didn't know what was the cause because I was doing some updates on the windows side.
Turn off python in Apps & Features> App Run Alias
I was confused about whether to insert pipenv or pyenv, so I erased everything once and settled down below. [^ 1]
pyenv install
$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(pyenv init -)"' >> ~/.bashrc
$ source ~/.bashrc
$ pyenv install 3.8.1
$ python -V
Python 3.8.1
pipenv install
$ pip list
Package Version
---------- -------
pip 19.2.3
setuptools 41.2.0
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$ pip install --upgrade pip
$ pip install pipenv
$ pip list
Package Version
---------------- ----------
certifi 2019.11.28
pip 19.3.1
pipenv 2018.11.26
setuptools 41.2.0
virtualenv 16.7.9
virtualenv-clone 0.5.3
If you specify the version you want with pipenv install
in the project directory
If you haven't already installed it with pyenv, you will be asked if you want to install it.
$ cd your_project
$ pipenv install --python 3.7
Warning: Python 3.7 was not found on your system…
Would you like us to install CPython 3.7.6 with pyenv? [Y/n]:y
Pipfile and Pipfile.lock have been generated.
$ pipenv shell
(your_project) $ python -V
Python 3.7.6
(your_project) $ pyenv versions
system
3.7.6
* 3.8.1 (set by PYENV_VERSION environment variable)
It seems to be safe.
https://qiita.com/mashita1023/items/10239f5621ef2fc8acb9 https://qiita.com/foewhoew32f320/items/bfa90ae1003e45cefe33 https://github.com/pypa/pipenv/issues/3488 https://github.com/pyenv/pyenv/tree/4e0ba2f47d97acd1284439cff57af059ce376b9d#installation
[^ 1]: I don't know if it's gone properly
Recommended Posts