Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
0 votes
0 answers
80 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 ...
user avatar
0 votes
0 answers
27 views

Unable to uninstall pip virtual so that I can use pipenv

when I run sudo pip virtual I get this error message: Found existing installation: virtualenv 20.0.17 Not uninstalling virtualenv at /usr/lib/python3/dist-packages, outside environment /usr Can't ...
user avatar
  • 1
1 vote
1 answer
129 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 ...
user avatar
  • 156
1 vote
0 answers
454 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 ...
user avatar
1 vote
0 answers
581 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-...
user avatar
  • 123
1 vote
1 answer
309 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 ...
user avatar
  • 111
1 vote
2 answers
772 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 ...
user avatar
0 votes
0 answers
166 views

How to restore python virtual environment after OS reinstallation

I had a python virtual environment and many libraries installed in it. As my OS got corrupted, I had to reinstall ubuntu 18.04. However my virtual env was in another drive and it is safe. But after re ...
user avatar
1 vote
0 answers
121 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: ...
user avatar
2 votes
1 answer
4k 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 ...
user avatar
1 vote
1 answer
102 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 ...
user avatar
4 votes
2 answers
6k 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....
user avatar
0 votes
0 answers
36 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 ...
user avatar
0 votes
1 answer
575 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 ...
user avatar
2 votes
0 answers
504 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 ...
user avatar
1 vote
1 answer
595 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 ...
user avatar
1 vote
0 answers
359 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 ...
user avatar
0 votes
1 answer
240 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 ...
user avatar
  • 119
0 votes
0 answers
888 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 ...
user avatar
1 vote
1 answer
4k 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 ...
user avatar
0 votes
1 answer
383 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....
user avatar
2 votes
1 answer
8k 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 ...
user avatar
  • 6,467
0 votes
1 answer
387 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 ...
user avatar
  • 2,747
1 vote
0 answers
5k 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 ...
user avatar
1 vote
1 answer
1k 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 ...
user avatar
1 vote
0 answers
747 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 : ...
user avatar
  • 115
0 votes
1 answer
124 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 ...
user avatar
  • 1
0 votes
3 answers
3k 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 ...
user avatar
  • 117
33 votes
6 answers
33k 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 ...
user avatar
  • 697
1 vote
1 answer
887 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 ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
  • 117
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, ...
user avatar
  • 125
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 ...
user avatar
0 votes
1 answer
700 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> ...
user avatar
  • 347
2 votes
1 answer
6k 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 ...
user avatar
0 votes
2 answers
2k 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 ...
user avatar
  • 1
5 votes
2 answers
19k 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 ...
user avatar
  • 55
1 vote
0 answers
556 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 --...
user avatar
5 votes
1 answer
8k 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 ...
user avatar
0 votes
1 answer
524 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....
user avatar
  • 1,221
0 votes
0 answers
236 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 ...
user avatar
  • 111
1 vote
1 answer
849 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 ...
user avatar
3 votes
1 answer
165 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 ...
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 ...
user avatar
  • 31
1 vote
0 answers
290 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 \ -...
user avatar
  • 143
1 vote
1 answer
102 views

What exactly is virtualenv.py?

I know of virtualenv and virtualenvwrapper and .py stands for python. When I run virtualenv in PyCharm IDE this comes up: Usage: virtualenv.py I just recently came across this and tried search for ...
user avatar
0 votes
2 answers
2k views

Always use a python virtual environment everywhere

I am new to Ubuntu and Python virtualenv. Since I realized the importance of virtualenv, I'd like to use it by default whenever I run python(from installing packages) so that I don't need to run ...
user avatar
7 votes
1 answer
29k views

Configure error: could not find the zlib library

I am trying to install lalsuite on ubuntu according to the instructions here: https://pycbc.org/pycbc/latest/html/install_lalsuite.html Everything went smoothly until I ran ./00boot ./configure --...
user avatar
  • 113
0 votes
2 answers
687 views

File ignored PyCharm Pro IDE and this the correct sys.path for PYTHONPATH?

My PyCharm IDE doesn't automatically create a venv directory so I have to manually create my own. My venv directory comes up as ignored. This is normal. A possible solution is found the comment ...
user avatar
0 votes
2 answers
417 views

Disco Dingo PyCharm 'Running virtualenv with interpreter /usr/bin/python2' while everything else runs Python 3

I uninstalled Virtualenv 16.6.0. I'm using PyCharm with virtualenv version 15.1.0. Update: Tried the creating /venv in create projects but the message is this there and now the venv directory is ...
user avatar