--When I try to install pipenv in the repository with wsl, I get an error for some reason. .. .. --It seems that it refers to python on the windows side --By specifying python with the full path, the countermeasure is completed for the time being
When I try to install pipenv on a project with WSL for the first time since python3.8, I get an unfamiliar error. .. .. : frowning2:
user@***:~/prj$ pipenv --python 3.8
# ~~Omission~~
'TypeError: write() takes exactly one argument (3 given)\n']
When I read the log properly, it seems that I am reading python on the windows side
OSError: [Errno 8] Exec format error: '/mnt/c/Users/user/AppData/Local/Microsoft/WindowsApps/python.exe'
I tried reverting python to 3.7.4, but it didn't change. .. .. The cause seems to be this # 3488 This issue, state is close, but it seems that it has not been fundamentally resolved. For the time being, there are some emergency measures, so let's do that this time.
The method is very simple. Specify the python to install directly with the full path instead of specifying the version
#[Method 1] When the version can be specified(Example:3.7.4)
#Please specify the path as a full path(~/.pyenv...Is not possible)
pipenv install --python=/home/username/.pyenv/versions/3.7.4/bin/python
#[Method 2] When inserting global python(Should I stop it? ??)
pipenv install --python=$(which python)
I was a little worried that the global python file /home/username/.pyenv/shims/python
seems to change when switching global, so pipenv sees the python file in method 2. It seems that it will change and it will be troublesome.
If you do it, it's method 1 (It's troublesome to specify the path ...: rolling_eyes :)
Recommended Posts