Questions tagged [virtual-environment]

358 questions
3
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
  • 1,457
  • 3
  • 14
  • 31
3
votes
1 answer

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
  • 123
  • 9
3
votes
4 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…
3
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
  • 133
  • 9
3
votes
0 answers

How to fix "PermissionError: [WinError 5] Access is denied" in virtual environment and Jupyter notebook caused by n_jobs = -1

I am working within a virtual environment that was setup following https://docs.python.org/3/tutorial/venv.html In addition I am using Jupyter Notebook. In my code I am using sklearn.model_selection.cross_val_score(...). It seems that the parameter…
3
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
  • 63
  • 1
  • 6
3
votes
0 answers

What makes in Python a virtual environment a virtual environment?

I want to find the Python virtual environments ("venvs" for short) in my file system, and for this I need to know what set of files constitutes a venv. Some tools - when they want to make sure a directory is a venv - check for the pyvenv.cfg file,…
halloleo
  • 6,554
  • 6
  • 46
  • 88
3
votes
1 answer

conan.io: call exe with virtual run environment

I have a hello tool which contains only exe files (without source). Hello tool structure: bin helloBin.exe helloRoot.exe conanfile.py conanfile.py content: class ToolHelloConan(ConanFile): name = "ToolHello" version = "0.1" settings =…
nicole
  • 111
  • 9
3
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
  • 117
  • 1
  • 3
  • 8
3
votes
2 answers

AWS Deep Learning AMI Virtual Environment Activation

I'm trying to set up a Jupyter Server using AWS EC2 starting with a Deep Learning AMI (Ubuntu) Version 7.0 AMI. It says that it comes with separate virtual environments: Comes with latest binaries of deep learning frameworks pre-installed in…
3
votes
1 answer

removing redundant ipython kernels

I have currently 3 environments: root(base), aind-dl, py2env So, for easy working, I've installed the conda extensions: nb_conda, nb_conda_kernels and when I run $: jupyter notebook the nb_conda_kernel detects 5 kernels which are redundant and in…
Y. Aakash
  • 31
  • 1
  • 4
3
votes
2 answers

How can I make venv install a python3.6 binary?

When I run python -m venv, the virtual environment directory that venv creates includes a binary named python and another named python3 which is just a link to python. (In my installation, python is Python 3.6 and python2 is Python 2.7.) My problem…
fonini
  • 1,599
  • 2
  • 21
  • 33
3
votes
4 answers

Do I use `pyvenv` or `virtualenv` for creating a virtual environment?

Some guides mention pyvenv (not pyenv) when talking about virtual environments such as the official Python tutorial. Others mention virtualenv such as in the Hitchhiker's Guide to Python. I've tried pyvenv and I think that it worked as you can…
Ammar Alyousfi
  • 3,486
  • 4
  • 27
  • 40
2
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.
2
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
  • 673
  • 1
  • 7
  • 25