Questions tagged [virtual-environment]

544 questions
138
votes
4 answers

How to change Python version of existing conda virtual environment?

I created a conda environment with Python version 3.8, but it doesn't support matplotlib... So I am looking for something like this to change the Python version: conda env my_env update to python=3.6. Is this possible or do I need to recreate the…
elixirtrip
  • 1,483
  • 2
  • 6
  • 5
83
votes
8 answers

Deactivate a pipenv environment

How can I deactivate my pipenv environment? With other tools I've been able to do something like source deactivate, but that has no affect here. Create an environment: pipenv --three Activate the environment: source $(pipenv…
tim_xyz
  • 11,573
  • 17
  • 52
  • 97
77
votes
7 answers

jupyter notebook running kernel in different env

I've gotten myself into some kind of horrible virtualenv mess. Help?! I manage environments with conda. Until recently, I only had a python2 jupyter notebook kernel, but I decided to drag myself kicking and screaming into the 21st century and…
Paul Gowder
  • 2,409
  • 1
  • 21
  • 36
73
votes
8 answers

How to freeze packages installed only in the virtual environment?

How to freeze packages installed only in the virtual environment, that is, without the global ones?
67
votes
9 answers

ResolvePackageNotFound: Create env using conda and yml file on MacOS

I want to create a virtual environment using conda and yml file. Command: conda env create -n ex3 -f env.yml Type ENTER it gives following message: ResolvePackageNotFound: - gst-plugins-base==1.8.0=0 - dbus==1.10.20=0 -…
waschbaerYOYO
  • 801
  • 1
  • 7
  • 8
47
votes
5 answers

How to use virtualenv with python3.6 on ubuntu 16.04?

I'm using Ubuntu 16.04, which comes with Python 2.7 and Python 3.5. I've installed Python 3.6 on it and symlink python3 to python3.6 through alias python3=python3.6. Then, I've installed virtualenv using sudo -H pip3 install virtualenv. When I…
wgetDJ
  • 1,209
  • 1
  • 10
  • 11
41
votes
2 answers

Conda takes 20+ minutes to solve environment when package is already installed

When I type try to run conda update -n base conda, conda hung for around 20-minutes on 'Solving environment' and then returned a package plan that did not include an updated version of conda. The package plan that was returned is provided…
Jeremy Matt
  • 647
  • 1
  • 7
  • 10
41
votes
2 answers

What is the difference between PyCharm Virtual Environment and Anaconda Environment?

When I create a new project in PyCharm, it creates a new Virtual Environment. I have read that when I execute Python scripts, they are executed using the interpreter in this environment instead of System Environment. So, if I need to install some…
Nagabhushan S N
  • 6,407
  • 8
  • 44
  • 87
37
votes
2 answers

Installing Anaconda into a Virtual Environment

I've currently got a working installation of the Enthought Python Distribution on my machine that I don't want to necessarily disrupt, but I'd like to look at moving over to Anaconda from Continuum. I can easily install Anaconda into the virtualenv…
Fomite
  • 2,213
  • 7
  • 30
  • 46
33
votes
1 answer

How to list all python virtual environments in Linux?

I have more than one Python environment configured in my Debian OS. Is there a way to list all configured environments in Linux? This is different from the possible duplicate as indicated in the comment below. I mean virtual environments created…
AhmedWas
  • 1,205
  • 3
  • 23
  • 38
29
votes
7 answers

There is no activate when I am trying to run my virtual env

1) I installed virtualenv using pip. 2) I ran the command virtualenv venv 3) Then I ran source venv/bin/activate but it says that there is no such file or directory. When I cd into venv/bin I find 3 things - python, python 2.7, and python 3.5. …
Aaron Cheung
  • 311
  • 1
  • 4
  • 6
25
votes
16 answers

Visual Studio Code does not detect Virtual Environments

Visual Studio Code does not detect virtual environments. I run vscode in the folder where the venv folder is located, when I try to select the kernel in vscode I can see the main environment and one located elsewhere on the disk. Jupyter running in…
24
votes
4 answers

poetry returns 'dyld: Library not loaded ... image not found' following brew install while inside virtual environment

I ran brew install postgresql while inside a poetry environment. Since then, I can't interact with poetry. λ ~/ poetry dyld: Library not loaded: /usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/Python Referenced from:…
24
votes
13 answers

How to activate virtual environment from Windows 10 command prompt

I'm trying to create and activate a virtual environment, using Windows 10 command prompt. I know that virtualenv is installed correctly, as the command virtualenv venv Works. I've navigated to my virtualenv download, Downloads\venv\Scripts, and am…
24
votes
3 answers

How can I activate a pyvenv virtualenv from within python? (activate_this.py was removed?)

I'm using Python 3.4, and having created a pyvenv, I'm looking to activate it from within a python process. With virtualenv, I used to use activate_this.py, but that appears to be gone in pyvenv. Is there now an easy way to effectively change the…
Chris Cooper
  • 17,276
  • 9
  • 52
  • 70
1
2 3
36 37