So this error happened after I uninstalled Python 3.7.4 for the newer Python 3.8.3. I try to use pipenv install and this is what it outputs:
PS C:\Users\enoch\Documents\spectral_curve_calculator> pipenv install
Traceback (most recent call last):
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 618, in parse_executable
result_version = get_python_version(path)
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\pythonfinder\utils.py", line 105, in get_python_version
c = subprocess.Popen(version_cmd, **subprocess_kwargs)
File "c:\users\enoch\appdata\local\programs\python\python38\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "c:\users\enoch\appdata\local\programs\python\python38\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\enoch\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\enoch\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Scripts\pipenv.exe\__main__.py", line 7, in <module>
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\click\decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\click\decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\enoch\appdata\local\programs\python\python38\lib\site-packages\pipenv\cli\command.py", line 232, in install
retcode = do_install(
File "c:\users\enoch\appdata\local\programs\python\python38\lib\site-packages\pipenv\core.py", line 1921, in do_install
ensure_project(
File "c:\users\enoch\appdata\local\programs\python\python38\lib\site-packages\pipenv\core.py", line 576, in ensure_project
ensure_virtualenv(
File "c:\users\enoch\appdata\local\programs\python\python38\lib\site-packages\pipenv\core.py", line 498, in ensure_virtualenv
python = ensure_python(three=three, python=python)
File "c:\users\enoch\appdata\local\programs\python\python38\lib\site-packages\pipenv\core.py", line 388, in ensure_python
path_to_python = find_a_system_python(python)
File "c:\users\enoch\appdata\local\programs\python\python38\lib\site-packages\pipenv\core.py", line 350, in find_a_system_python
return next(iter(finder.find_all_python_versions()), None)
File "c:\users\enoch\appdata\local\programs\python\python38\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 312, in find_all_python_versions
python_version_dict = getattr(self.system_path, "python_version_dict", {})
File "c:\users\enoch\appdata\local\programs\python\python38\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 120, in system_path
self._system_path = self.create_system_path()
File "c:\users\enoch\appdata\local\programs\python\python38\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 82, in create_system_path
return pyfinder_path.SystemPath.create(
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 682, in create
instance = instance._run_setup()
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 233, in _run_setup
new_instance = new_instance._setup_windows()
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 411, in _setup_windows
windows_finder = WindowsFinder.create()
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 146, in create
return cls()
File "<attrs generated init pythonfinder.models.windows.WindowsFinder>", line 13, in __init__
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 113, in get_versions
versions[py_version.version_tuple[:5]] = base_dir
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 365, in __getattribute__
result = super(PythonVersion, self).__getattribute__(key)
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 430, in version_tuple
self.patch,
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 375, in __getattribute__
instance_dict = self.parse_executable(executable)
File "C:\Users\enoch\AppData\Local\Programs\Python\Python38\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 620, in parse_executable
raise ValueError("Not a valid python path: %r" % path)
ValueError: Not a valid python path: 'C:/Users/enoch/Downloads/WPy64-3741/python-3.7.4.amd64/Scripts/python.exe'
So it seems that the issue happens since it is still trying to reference my old python location even though I already uninstalled it: ValueError: Not a valid python path: 'C:/Users/enoch/Downloads/WPy64-3741/python-3.7.4.amd64/Scripts/python.exe' I checked my environment variables and paths through control panel; they all point to my new Python 3.8.3 installation. Printing sys.path, it also never mentions the path of my previous installation. Does anyone have any idea of what's going on? Thank you!

