Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pipenv error "No Python at 'C:\Python39\python.exe' "

Tags:

python

pip

pipenv

I installed and added Python3.9 and Pip to the PATH through the installer.

python --version
# Python 3.9.7
pip --version
# pip 21.2.4 from C:\Users\{MyUserName}\AppData\Local\Programs\Python\Python39\lib\site-packages\pip (python 3.9)

I installed pipenv with pip install pipenv and pipenv --version outputs pipenv, version 2021.5.29. Although, if I try to install any package with pipenv, or just enter the pipenv shell and then run python --version, I always get No Python at 'C:\Python39\python.exe'.

Python sys path is C:\Users\{MyUserName}\AppData\Local\Programs\Python\Python39, so why does pipenv look into another folder? And how can I fix this?

I'm running all these commands in git bash.

like image 685
akai Avatar asked May 07 '26 05:05

akai


1 Answers

For anyone running into this error, run the following to delete the virtual environment (built with the previous/future version of Python):

    cd $project_folder
    pipenv --rm

Then rerun this to build your pipenv virtual environment with your new version of Python:

pipenv install
like image 70
Rishi Latchmepersad Avatar answered May 09 '26 17:05

Rishi Latchmepersad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!