Questions tagged [virtualenv]

virtualenv is a tool that creates a sandboxed and isolated environment where Python packages can be installed without interfering with other packages on the same machine.

Filter by
Sorted by
Tagged with
1 vote
1 answer
270 views

Using /usr/bin/env python3 to point to virtual environment in 22.04

I have a script that begins with #!/usr/bin/env python3 Should it use the "python3" virtual environment with it having to be explicitly activated? I'm pretty sure this used to work on ...
crmpicco's user avatar
  • 213
0 votes
0 answers
155 views

A new virtual environment created with virtualenvwrapper is not empty when the ROS path is sourced

Problem creation: Install virtualenvwrapper. Install ROS 2. In a shell, source the ROS2 path by source /opt/ros/humble/setup.bash. In the same shell, create a virtual environment with mkvirtualenv ...
MrBojangles's user avatar
0 votes
1 answer
705 views

Failing to create a virtualenv using python3.7 in Ubuntu 20.04

I have a system running Ubuntu 20.04.5 LTS which comes with python3.8 by default. For some work purposes, I need to use a virtual environment in python 3.7. So, I installed python3.7 which has been ...
Luce's user avatar
  • 135
0 votes
1 answer
42 views

How to fix broken installation of virtualwrapper in Ubuntu?

On Ubuntu 20.04.4 and python 3.8.10 my virtualenvwrapper installation is broken. When I try mkvirtualenv test I get an error ERROR: virtualenvwrapper could not find virtualenv in your path for some ...
Alex's user avatar
  • 907
0 votes
1 answer
409 views

How to completely reinstall virtualenv on Ubuntu?

I have a broken installation of virtualenv on Ubuntu 20.04.4, and I want to reinstall it completely new. I tried to remove the current installation with sudo apt remove virtualenv sudo apt-get remove -...
Alex's user avatar
  • 907
1 vote
1 answer
4k views

virtualenv not found

I just switched from Window 10 to Ubuntu 22.4 LTS I have installed the virtual env in Ubuntu 22.4 LTS with: pip3 install virtualenv After running that command, I got: *WARNING: The script virtualenv ...
harshit's user avatar
  • 11
0 votes
0 answers
487 views

Headless Chrome Doesn`t Work In Virtual Environment On Ubuntu Server Under Ther Root User

Help me please to solve this issue. I have Ubuntu server running. I had installed chrome from .deb package by user1 in order to use it in headless mode in Selenium web driver (via Python) and within ...
dyedfox's user avatar
  • 321
2 votes
1 answer
1k views

Segmentation fault (core dumped) when install a package inside a python virtualenv using pip

a few days back my ubuntu 20.04 stopped working. even after reinstalling everything with GPU drivers, after restart my screen freezes on the motherboard company logo, maybe an update with a bug ...
shubham rajvanshi's user avatar
9 votes
3 answers
4k views

Virtualenv installs envs into local/bin instead of bin

Problem: The bin directory of my virtual environment produced with virtualenvwrapper (which uses virtualenv under the hood) is located in the subfolderlocal instead which leads to breakage across the ...
icezyclon's user avatar
  • 436
2 votes
1 answer
4k views

Segmentation fault (core dumped) error when installing pachages with pip3 on virtualenv

I am working with Ubuntu 21.10 and I just installed python3.6 using this tutorial: https://stackoverflow.com/questions/70395169/how-to-install-python-3-6-on-ubuntu-21-10 After that I created a virtual ...
Ernesto Ruiz's user avatar
1 vote
0 answers
2k views

How to upgrade python3-venv to 3.9 version in ubuntu 18.04?

I need to install tensorflow which requires python version > 3.7 because of which I had to upgrade the python version in ubuntu 18.04 from 3.6 to 3.9. I upgraded to python 3.9 using: sudo add-apt-...
user27665's user avatar
  • 133
2 votes
1 answer
985 views

Create a shortcut to a virtual enviroment

I have installed Spyder Python IDE in a virtual environment. For this purpose I used the following command: python3 -m venv spyder-env source spyder-env/bin/activate I have to switch to the virtual ...
freak11's user avatar
  • 121
4 votes
2 answers
4k views

Why psycopg2 is not able to install in a virtual environment?

Just installed ubuntu20.04. Installed python3.10 by sudo apt install python3.10 Then created virtualenv pip install virtualenv virtualenv -p python3.10 venv Now I'm trying to install requirement for ...
peter ignatiev's user avatar
1 vote
0 answers
464 views

python virtual environment with different python version than system python and installing packages

I created a python 3.9.7 virtual environment using virtualenv. This is a different python version than my system python. When I try install jupyter via pip install jupyter I get the following error: ...
kdbaseball8's user avatar
2 votes
1 answer
8k views

Pycharm -> Failed to create virtual environment

I wanted to run my first python file on ubuntu when suddenly this message with no further instructions appeared: As a consequence I have researched what the meaning of the error was. According to the ...
Markus Reiter's user avatar
1 vote
1 answer
175 views

pipenv as isolated place for running a program

I'm new to Linux operating system and currently learning using Ubuntu. I came to the part where you build virtual environment. I read that I should use pipenv instead of venv. My ideal goal of using a ...
Luandre Ezra's user avatar
5 votes
2 answers
10k views

ModuleNotFoundError: No module named 'pip._vendor.six'

I'm new to Ubuntu (20.04.2.0 LTS) and trying to get Python3.9.6 and Pip to work with Virtualenv. I hope some of you experienced Ubuntu users can help me :) I have no problem using default Python (3.8....
Usagi-Dev's user avatar
0 votes
0 answers
45 views

Putty Connect Issues

I am trying to ssh into a virtual machine using putty. The VM has my public key and I am able to connect to the VM when I am using one internet connection but when I go to another location the ...
New Ubuntu User's user avatar
0 votes
2 answers
1k views

Unable to uninstall virtualenv on Ubuntu 20.04.2 LTS

$ sudo pip uninstall virtualenv WARNING: Skipping virtualenv as it is not installed. $ sudo pip3 uninstall virtualenv WARNING: Skipping virtualenv as it is not installed. $ sudo apt-get purge ...
Manu Gupta's user avatar
2 votes
0 answers
987 views

Python virtualenv problem after Ubuntu 20.04 upgrade

I updated my system to Ubuntu 20.04 I already had Python 3.6.7 running with virtualenv and virtualenvwrapper for my python virtual environment. After the update I am able to check get the list of ...
Santhosh Dhaipule Chandrakanth's user avatar
1 vote
1 answer
1k views

Share virtual environment

I have a setup python virtual environment (virtualenv). I know that with virtualenv a new directory is created, where all dependencies and libraries for my python version are stored. Is it possible to ...
AdemxKartal's user avatar
1 vote
0 answers
690 views

Python virtual environment not working any more after change to Ubuntu 18.04

Up to now I used on my computer mainly Ubuntu 16.04 LTS, a few weeks ago I installed Ubuntu 18.04 LTS on a free partition. Now I transferred my /home/juergen directory from the 16.04 partition to the ...
Jürgen Böhm's user avatar
0 votes
1 answer
353 views

Should I install Node.js globally or on a virtual environment?

Right now I doing a course for this Node.js is one of the requirements. So should I install it globally or in a virtual environment. I have no previous knowledge of using Node.js. My operating system ...
Rubel's user avatar
  • 119
0 votes
0 answers
2k views

"source" not working in bash shell while "." is on Ubuntu 20.04

I have a virtualenv called env on Ubuntu 20.04, it was made using the system python installation (python3 -m virtualenv env). I used source env/bin/activate and got a prompt prepended with (env) but ...
orangecaterpillar's user avatar
3 votes
1 answer
12k views

How to activate a virtual environment in Ubuntu?

I installed virtualenv and I created a virtual environment inside my directory. Everything is OK, but I can't activate it. When I run: source /bin/activate it says: already: command not found ...
Md. Mursalatul Islam Pallob's user avatar
0 votes
1 answer
590 views

Ubutu 18.04 mkvirtualenv distutils.sysconfig problem

I have a problem with mkvirtualenv. When I try mkvirtualenv py39 --python=/usr/bin/python3.9 I get File "/usr/lib/python3/dist-packages/virtualenv.py", line 25, in import distutils....
Tony Holdroyd's user avatar
4 votes
2 answers
15k views

How to create python2.7 virtualenv on Ubuntu 20.04

I want to run an application that uses python2.7 version, but by default python2.7 is not installed. When I tried to use: $ virtualenv -p python2 flaskold It returned: RuntimeError: failed to find ...
Gryu's user avatar
  • 7,162
0 votes
1 answer
664 views

Auto mounted disk not allowing to create virtualenv

I have a auto mounted rive which is allowed to access by two users. These are the rules in my /etc/fstab #user1 UUID=123FSDF345233 /media/user1/Disk ntfs uid=1000,gid=1000,umask=000,sync,auto,rw 0 0 ...
Eka's user avatar
  • 2,897
1 vote
0 answers
6k views

How can I solve the problem “Ubuntu 20.04 pyenv command not found”?

I am installing pyenv using this command: git clone pyenv/pyenv-virtualenv ~/.pyenv/plugins/pyenv-virtualenv Then echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc When I give ...
LearningLogic's user avatar
1 vote
1 answer
2k views

virtualenv is activated but pip freeze return all system packages

I installed virtualenv using: python -m pip install virtualenv When I create a new env using this command: virtualenv env Then activate it: source env/bin/activate When I type pip freeze, it ...
Malcom Swarez's user avatar
1 vote
0 answers
1k views

Python venv works explicitly with python3.6, but not with python3.8

#2 Edit - Solution: so I found something that fixed it : https://stackoverflow.com/a/63207387/12291295 if you are getting afterwards a ModuleNotFoundError: No module named 'zlib' error, try this : ...
ImSo3K's user avatar
  • 115
0 votes
1 answer
526 views

why pip is not installed but after creating new venv and activating it, pip does work?

I'm confused by venv in linux. I have a fresh ubuntu 20.04 installed. when I entered python in terminal it says command python is not found and the same for pip, but python3 works (still not for pip ...
masoud's user avatar
  • 101
1 vote
4 answers
4k views

Unable to use virtualenv and virtuenvwrapper on Ubuntu 20

I am using Python3.7 and following the virtualenv and virtualenvwrapper installation as mentioned on this FreeCodeCamp article. The changes to my .bashrc file look as follows: # ~/.bashrc: executed by ...
Pe Dro's user avatar
  • 147
55 votes
8 answers
72k views

Error: Command '['/path/to/env/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

I just installed python3.7 on my 18.04LTS via the deadsnakes ppa: sudo add-apt-repository ppa:deadsnakes/ppa sudo apt install python3.7 -y Now I want to create a virtual environment with python3.7 -m ...
user2740's user avatar
  • 967
1 vote
1 answer
2k views

How do you get 'sudo' privilege for a program in a conda virtual environment?

As with the title, how can I run a program installed within a conda environment with sudo privileges? This thread(sudo: conda: command not found) mentioned that conda commands cannot be granted super ...
Ang Jit Wei Aaron's user avatar
0 votes
1 answer
2k views

Using 'sudo' with `virtualenv`

I am working on a virtual environment: sk, which I made this way: $ mkvirtualenv sk -p python3 I use workon sk to activate this environment and work in it. When I try to run some functionality of ...
Pe Dro's user avatar
  • 147
0 votes
1 answer
2k views

Cannot start venv with python3

When trying to start a virtual environment I get: ~$ python3 -m venv homeassistant The virtual environment was not created successfully because ensurepip is not available. On Debian/Ubuntu systems, ...
Gal's user avatar
  • 175
0 votes
2 answers
1k views

How to keep python virtualenvs while updating ubuntu?

A friend of mine told me that every python virtualenv he had in its ubuntu 18 OS became useless when he upgraded to ubuntu 20, and I think it's because of the new python version (3.8). If anyone could ...
ego2509's user avatar
0 votes
1 answer
823 views

Ubuntu 20.04 "virtualenv -p python3 ." command not working

After upgrading to ubuntu 20.04 virtualenv -p python3 . not working. I shows error Traceback (most recent call last): File "/home/mahmud/.local/bin/virtualenv", line 6, in <module> ...
MH Sagar's user avatar
  • 397
4 votes
1 answer
10k views

Python3.8 venv without activate script

When I try to create a virtual environment, the created folder does not have the venv/bin/activate script. I tried to install and reinstall venv using sudo apt install python3-venv, but it always ...
Gabriel Maia Gondim's user avatar
0 votes
2 answers
3k views

pip3 install virtualenv failed

I’m using Ubuntu Mate: Operating System: Ubuntu 16.04.6 LTS Kernel: Linux 3.4.39-BPI-M3-Kernel Architecture: arm I have installed Python 2.7 & 3.5.2 as well as 3.7.7 Wnen I'm trying to ...
zawier's user avatar
  • 3
5 votes
2 answers
21k views

Install Python 3.7 packages in Ubuntu 20.04

I recently upgraded to 20.04 from 19.10. Now i face issues since i need to use a virtual environment with Python 3.7 and cant seem to install the packages: - Python3.7-venv - Python 3.7-dev Seems ...
Raalph's user avatar
  • 55
1 vote
1 answer
757 views

conda activate newenv returns "powerline-shell: command not found"

I installed Conda using Anaconda3-2019.10-Linux-x86_64.sh. It works fine until today. I was able to run create new virtual env and activate it and then deactivate it as expected. Basically, conda --...
redpanda's user avatar
6 votes
1 answer
11k views

Run python script in virtual environment on startup

I would like to start a python script from a virtual environment on startup. I have searched the whole forum and other sources but have not been able to make it work. The script should run at the ...
stekla79's user avatar
0 votes
1 answer
734 views

Ubuntu 18.04 - how to set up a Python virtual environment for Python 3.7.x or 3.8.x?

Can somebody please provided recommended commands for Ubuntu 18.04 to configure a Python virtual environment that has Python 3.7.x or 3.8.x? Of course I'm aware that upgrading the general Ubuntu 18....
cdahms's user avatar
  • 1,593
0 votes
0 answers
322 views

How to install different package with different version in two different virtual env ubuntu18.04?

I need to install two versions of a package in two different virtual env. Here is what i did. Virtual env1 Create a virtual env for env1 python3 -m venv ./env1 source ./env1/bin/activate pip3 ...
KbiR's user avatar
  • 111
1 vote
1 answer
1k views

pip package installation and virtualenv

Good morning! Quick summary: I'm having a problem with pip and virtualenv. Whether or not my virtualenv is activated my pip installs packages into the site-packages of the venv but when outside my ...
O. Carlsson's user avatar
3 votes
1 answer
172 views

For every Framework new Python Env?

I'm very new to Linux so it could be that I think more in a Windows way. I want to develop something in Python, especially Django and Discord Bot. I have a folder PythonEnvironment where I set up a ...
黒성배's user avatar
3 votes
1 answer
4k views

How do I create a Python virtual environment in the Ubuntu on Windows App using 'venv' rather than 'virtualenv'?

I am using the Ubuntu on Windows App running on Windows Subsystem for Linux. So an initial question is if Python virtual environments is supported. Given my as yet limited understanding of Python ...
DavidG's user avatar
  • 31
1 vote
0 answers
329 views

Open terminal in XFCE from script and activate python virtualenv

I try to open a new terminal window in XFCE and activate python3 virtualenv in there using the following line in a bash script: xfce4-terminal --working-directory=$HOME/path/to/project --maximize \ -...
Nurjan's user avatar
  • 143