Questions tagged [virtual-environment]
544 questions
6
votes
2 answers
Visual studio: Python virtual environments in source control
I've managed to succesfully setup a Visual Studio Python project. I now want to share this project with other developers through source control (the company I work at uses SVN).
As I want to avoid each of my colleagues having to manually setup the…

Stanislas
- 1,893
- 1
- 11
- 26
5
votes
3 answers
Jupyter extension on VSCode brings wrong interpreter
In the first two lines, I printed the current executable path, but it didn't load the correct path C:\pyvenv\ai\Scripts\python.exe.

A-H4NU
- 71
- 4
5
votes
1 answer
What's the point of the prefix line in conda environment file when creating a new environment?
To save a conda environment and re-create it, I use:
# Save the environment
conda env export > my_conda_env.yml
# Re-create the environment
conda env create --file my_conda_env.yml
# Reactivate the environment
conda activate pytorch
I notice…

Franck Dernoncourt
- 77,520
- 72
- 342
- 501
5
votes
1 answer
New conda environment is created without python
The conda documentation says that when you use
conda create --name myenv
The new environment
uses the same version of Python that you are currently using because
you did not specify a version.
However, that's not the case for me. I have Windows…

robertspierre
- 3,218
- 2
- 31
- 46
5
votes
0 answers
Conda meta packages m2w64-toolchain needed to be installed in base environment and not virtual
I need to use the pymc3 module which relies on theano. However, I witnessed some weird behavior for which I could not find a solution in the documentation and from general web-search.
When using pymc3, I got several problems with missing compilers.…

RVA92
- 666
- 4
- 17
5
votes
1 answer
Why do I have to specify the python version when creating a new conda environment?
I do conda create --name env then conda activate env.
My prompt now has (env) at the beginning of it. Then I try running python at the prompt and it returns
'python' is not recognized as an internal or external command, operable program or batch…

fiziks
- 247
- 2
- 5
5
votes
2 answers
Python3.7 venv does not Create Virtual Environment Directory
I'm trying to create a virtual environment in windows using:
python3 -m venv
When I check the contents of the current directory in cmd after running the above command, I don't see the venv directory show up. The command doesn't throw any…

user2437443
- 2,067
- 4
- 23
- 38
5
votes
3 answers
Using `pipenv shell` after `pipenv install` yields "Shell for UNKNOWN_VIRTUAL_ENVIRONMENT already activated."
When I first install packages to a virtual environment with pipenv install package and secondly try to open a subshell to operate in that environment with pipenv shell i receive the following:
"Shell for UNKNOWN_VIRTUAL_ENVIRONMENT already…

Olmo
- 325
- 4
- 13
5
votes
2 answers
bash script to deactivate conda environment
After a user suggestion, I'm revising the question to more narrowly focus on the question "why can't I run conda commands from a shell script".
My default conda environment is named "py37". Shell starts, I am able to deactivate:
(py37)…

pauljohn32
- 2,079
- 21
- 28
5
votes
1 answer
How to separate packages with multiple channels in yaml using conda to create customized env
I need to create an environment mock up the one using virtualenv, the packages belong to various channels in anaconda. Though I specified channels, I received error for some packages.
my_env.yml:
name: my_env
channels:
- anaconda
-…

mdivk
- 3,545
- 8
- 53
- 91
5
votes
2 answers
How to move installed packages to a newly created virtual environment ?
I've downloaded a lots of packages into global environment (lets say so). Now, I want to create a new virtual environment and move some of the packages to that environment. How would I do that ?

Akchurin Alnur
- 61
- 1
- 3
5
votes
2 answers
Can you activate multiple Python virtual environments at once?
I want to use tensorflow through a virtual environment. However, the Python script I want to run requires me to use a separate virtual environment that does not include tensorflow.
Is it possible to activate these simultaneously? If not, can I merge…

1arnav1
- 187
- 2
- 3
- 9
5
votes
3 answers
How to activate a virtualenv using a makefile?
At the top of my makefile I have this line:
SHELL := /bin/sh
which is needed for most of the commands. However, I would like to also have a make command to activate my virtual env, which is on a different path.
Here is the code that I wrote for…

J. Hesters
- 13,117
- 31
- 133
- 249
5
votes
1 answer
NEAT-Python not finding Visualize.py
So recently I have found about a NEAT algorithm and wanted to give it a try using NEAT-Python(not sure if this is even the correct source :| ). So I created my virtual environment activated it and installed the neat-python using pip in the VE. When…

J.Paravicini
- 882
- 12
- 39
4
votes
1 answer
Can I create a virtual environment of julia 1.4.2 with conda and How
I'm working with julia now, but some old version of code is deployed on julia 1.4.2, now I want to recheck the code but I don't want to switch between julia 1.6.3 (often used version) and 1.4.2. So I want to create a virtual env with conda, but now…

Betristor
- 51
- 3