Ticoincoin
Ticoincoin

Reputation: 209

Can't create env with pipenv on Windows

I'm working locally on a project and I want to set a new environment with pipenv (and I need to get a Pipfile)

> $ python -m pipenv install dash
> Creating a virtualenv for this project…
> Pipfile: C:\Users\xxx\Documents\_Dev\CT-Maps\Pipfile
> Using C:/Users/xxx/Anaconda3/python.exe (3.7.6) to create virtualenv…
> [ ===] Creating virtual environment...FileNotFoundError: [Errno 2] No such file or directory:
> 'C:\\Users\\xxx\\Anaconda3\\Lib\\venv\\scripts\\nt\\python.exe'
>     
> Failed creating virtual environment
>     
> [pipenv.exceptions.VirtualenvCreationException]:
> Failed to create virtual environment.

I'm working on Windows 10, using Terminal in VS Code.

I think the issue comes from the "Using C:/Users/xxx/Anaconda3/python.exe (3.7.6)" but I'm not sure and I don't know how to change it to use correct python path (which is correctly set in VSCode !)

enter image description here

Since I don't have the admin rights, I can't even uninstall Anaconda or install stuff globally.

Thanks for your help!

Upvotes: 0

Views: 787

Answers (1)

Jack Walton
Jack Walton

Reputation: 181

You can specify the path to the python interpreter that you want to use using the --python flag.

python -m pipenv install dash --python "C:\Program Files (x86)\Python38-32\python.exe"

Upvotes: 2

Related Questions