Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pipenv search python in old directory do not exist

I would to create new Python project which include pipenv for manage my packages.

But when I try to install package with it, it throw me I exception :

ValueError: Not a valid python path: 'C:/dev/Anaconda3/Scripts/python.exe'

I try pipenv command with 2 differents emulation terminal (Cmder and Terminus) which produce same result.

In old time a try Anaconda solutions for work with Python. But now I don't want use this and I uninstall Anaconda in my OS.

It seems that my OS keep old reference to this python executable into Anaconda in your PATH... But I display my 2 PATH variables OS (PATH system OS and PATH user) and nothing has this location path into your string.

The directory c:\dev\Anaconda3 doesn't exist !

I try to search uninstall Anaconda program in my tool application manager Windows but Anaconda is not diplayed in that listing. It seems to be good uninstalled.

I install correctly pipenv executable : pipenv --version

pipenv, version 2020.6.2

I install correctly python executable : python --version

Python 3.8.3

I added 3 differents PATH python for my OS PATH (system PATH and user PATH) :

  • C:\dev\python\Python38
  • C:\dev\python\Python38\Scripts\
  • C:\dev\python\Python38\Scripts\bin

Why I keep old reference to Anaconda program ?

Why many program search python in same old deleted path and PATH variable do not included this ?

How pipenv created his PATH environment variable ?

like image 884
darkomen Avatar asked May 18 '26 08:05

darkomen


1 Answers

I had a Python2.7 instance giving me the same problem. I copy/pasted its python.exe into the Scripts folder. So it now found a real python.exe there. Once I did this it continued on happily. And now I was able to use the Python3.9 version i wanted it to use anyways.

It seems like the python searcher should be a little more tolerant and just ignore poorly formed python releases. There is an open ticket for this: https://github.com/pypa/pipenv/issues/4334

like image 91
DevNull Avatar answered May 20 '26 21:05

DevNull



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!