Pandas
Pandas

Reputation: 75

Virtual ENV Specify Python Instance Used

I have a Python installation in C:\ProgramData\Anaconda2 and C:\ProgramData\Anaconda3. I would like to create a virtual environment using base Python (not anaconda) in C:\ProgramData. My question is two fold.

  1. Can I use a python instance as the base for the new env that has not been installed? I.e. A clean version of base Python without Anaconda? Or, do I have to download and install that first in a third directory and then use that?
  2. Can I specify which instance of python to use as the base when setting up the env? I.e from directory C:\ProgramData\ >> $ virtualenv my_project --C:\ProgramData\Python27? So in this example the new virtual environment would be created in C:\ProgramData\My_Project and use the clean base version of python instead of the Anaconda 2 or 3 distribution?

Thank you in advance.

Upvotes: 1

Views: 93

Answers (2)

azrdev
azrdev

Reputation: 235

Can I specify which instance of python to use as the base when setting up the env?

Of course, just run virtualenv -p P:\ath\to\python.exe

As for your other question -- the python install which you want to use has to exist locally, afaik. So you'd have to install python first, if you don't want to use the version provided by anaconda.

Upvotes: 1

Stack
Stack

Reputation: 4526

You can do virtualenv -p "path to python executable(whichever you want)"

Upvotes: 1

Related Questions