Questions tagged [virtual-environment]

544 questions
10
votes
1 answer

What are my options for installing Python alpha & beta releases with or alongside conda on Windows?

Closely related to Can I conda install an alpha or beta version of Python? but that question is about a specific version in conda-forge. If a Python release (e.g. 3.10.0b1) is available for download via https://www.python.org/download/pre-releases/…
Greedo
  • 4,967
  • 2
  • 30
  • 78
9
votes
2 answers

How to update a requirements file automatically when new packages are installed?

Keeping track of a virtual environment's requirements via pip freeze is simple. pip freeze > requirements.txt Currently, however, whenever a new package is added to the venv, it needs to be added to the requirements file manually. To do so, I…
AnagramDatagram
  • 329
  • 1
  • 2
  • 14
9
votes
3 answers

How to activate virtual environment in Vscode when running scripts are disabled in system?

I created a virtual environment in vscode in a folder called server by typing: python -m venv env And I opened the server folder, select interpreter Python 3.8.1 64-bit('env':venv) then I got following error: I can't find any solution to this and…
bdemirka
  • 817
  • 2
  • 9
  • 24
9
votes
1 answer

Use Python Virtual Environment in Jupyter Notebook

I quite often find that this would be useful but I'm not sure there's any way to do this. I'm often working on a python project where I start the project with a virtual environment for the project and a Jupyter notebook. I start adding libraries to…
soundofsilence
  • 330
  • 2
  • 12
9
votes
2 answers

how to use pipenv to run file in current folder

Using pipenv to create a virtual environment in a folder. However, the environment seems to be in the path: /Users/....../.local/share/virtualenvs/...... And when I run the command pipenv run python train.py, I get the error: can't open file…
S.cll
  • 123
  • 1
  • 1
  • 6
8
votes
1 answer

Does python 3.8.2 have ensurepip? Do I need to install ensurepip to use it?

I'm using python 3.8.2 on ubuntu on windows 10. I'm reading an OOP pdf and I'm at the third-party libraries section. It says that pip doesn't come with python, but python 3.4 contains a useful tool called ensurepip, which will install it: python -m…
user13998224
7
votes
2 answers

Activating venv and conda environment at the same time

I am a beginner and was "playing around" with environments a bit. I came across a situation where it seemed that I had two environments activated: I create a directory, create an environment with venv, activate it and then also conda activate a…
7
votes
1 answer

Environments inherit packages from default environment

Note: This question refers to Julia v1.5. Of course, at any time the answers should ideally also answer the question for the most recent version. A Julia installation provides a default environment (called, e.g., @v1.5). When running Julia in a…
Adomas Baliuka
  • 1,384
  • 2
  • 14
  • 29
7
votes
2 answers

windows cmd not showing python virtualenvwrapper in front of the command

I'm try to use "virtualenvwrapper-win" to build django project on my windows 10 pc. I think i setup it correctly, and it seems work fine. but I can't see what virtual environment am i using right now. it doesn't show in front of the command line.…
7
votes
4 answers

How can I change the Python interpreter in virtual environment (Ubuntu 18.04LTS)?

I always used Anaconda on Windows so far and could set up an environment while choosing which exact Python to use. E.g. conda create -n myEnvName python=3.7 Now, I want to familiarize with Ubuntu 18.04 LTS and use basic Python environments. So I…
rbewoor
  • 305
  • 1
  • 3
  • 14
7
votes
1 answer

Activating an virtual environment from python in nodejs

I have following project on a raspberry pi 4: I created a face recognition script in python which needs an virtual enviroment to run. The script prints out the person which has been detected. In NodeJS I want to receive the answer by running the…
J. Doe
  • 303
  • 3
  • 11
7
votes
4 answers

pipenv `ModuleNotFoundError: No module named 'pip.basecommand`

I'm trying to create a virtual environment using pipenv. When I give the command pipenv install, I get the following error I am using pipenv==2018.6.25 Traceback (most recent call last): File…
chidimo
  • 2,684
  • 3
  • 32
  • 47
7
votes
1 answer

You might be loading two sets of Qt binaries into the same process

I am trying to run python code in virtual environment of conda. The thing is I have installed opencv using brew and using python from anaconda environment. There is library called qt which is in both (brew and conda). Now when I try to run my code…
Karan Kumar
  • 113
  • 2
  • 7
7
votes
2 answers

Activating a Conda environment in Ansible playbook

I am trying to run a list of tasks (here running airflow but it could be anything really) that require to be executed in a existing Conda environment. I would like to do these tasks: - name: activate conda environment # does not work, just for the…
jeff73
  • 71
  • 1
  • 2
6
votes
6 answers

ModuleNotFoundError: No module named 'requests' using venv in vscode

I have 1 file, i get as far as line 1 import requests, nothing more yet and I receive the following error ModuleNotFoundError: No module named 'requests'. Using Visual Studio Code, installed today with standalone Python x64 3.7.4 Python Extension…
1 2
3
36 37