Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python RuntimeError: failed to find interpreter for Builtin discover of python_spec='ackages.venvs/lpthw'

I was following "A Project Skeleton" from "learn python 3 the hard way" and this error occurred. I still don't know what are these actually, just following the steps. So why this problem and how to solve this?

C:\>pip install virtualenv
Collecting virtualenv
  Downloading virtualenv-20.0.35-py2.py3-none-any.whl (4.9 MB)
     |████████████████████████████████| 4.9 MB 504 kB/s
Collecting distlib<1,>=0.3.1
  Downloading distlib-0.3.1-py2.py3-none-any.whl (335 kB)
     |████████████████████████████████| 335 kB 6.4 MB/s
Collecting filelock<4,>=3.0.0
  Downloading filelock-3.0.12-py3-none-any.whl (7.6 kB)
Collecting appdirs<2,>=1.4.3
  Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting six<2,>=1.9.0
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: distlib, filelock, appdirs, six, virtualenv
Successfully installed appdirs-1.4.4 distlib-0.3.1 filelock-3.0.12 six-1.15.0 virtualenv-20.0.35

C:\>mkdir . venvs
Access is denied.
Error occurred while processing: ..

C:\>mkdir.venvs

C:\>mkdir.venvs
A subdirectory or file .venvs already exists.

C:\>virtualenv -system-site -packages.venvs/lpthw
RuntimeError: failed to find interpreter for Builtin discover of python_spec='ackages.venvs/lpthw'

C:\>virtualenv-system-site-packages.venvs/lpthw
'virtualenv-system-site-packages.venvs' is not recognized as an internal or external command,
operable program or batch file.

C:\>mkdir.venvs
A subdirectory or file .venvs already exists.

C:\>virtualenv -system-site -packages.venvs/lpthw
RuntimeError: failed to find interpreter for Builtin discover of python_spec='ackages.venvs/lpthw'

C:\>mkdir.venvs
A subdirectory or file .venvs already exists.

C:\>mkdir.venvs
A subdirectory or file .venvs already exists.

C:\>mkdir.venvs

C:\>virtualenv -system-site -packages.venvs/lpthw
RuntimeError: failed to find interpreter for Builtin discover of python_spec='ackages.venvs/lpthw'

C:\>
like image 850
yo only Avatar asked Nov 16 '22 04:11

yo only


1 Answers

virtualenv interpreted -packages as -p which is short for the --python flag. There are 3 typos in your guide, it should have been :

virtualenv --system-site-packages .venvs/lpthw

So only one flag with proper -- notation and .venvs/lpthw is a path, not part of the flag.

like image 136
sinekonata Avatar answered Feb 16 '23 22:02

sinekonata