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
0answers
25 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 ...
0
votes
1answer
27 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 ...
0
votes
0answers
43 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 ...
0
votes
1answer
81 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 ...
0
votes
0answers
15 views

virtualenv with fish and tillix deactivation error

I just found out about fish and powerline for ubuntu and I set the up, but I keep hitting errors when using python virtualenvs and unfortunately I didn't manage to find solution online. I'm having my ...
0
votes
0answers
214 views

SSL issue for local Python installation

I am on a system for which I do not have sudo privileges. I am trying to install Python 3.7 locally. $ mkdir -p lib/python $ cd lib/python $ wget https://www.python.org/ftp/python/3.7.10/Python-3.7.10....
0
votes
1answer
127 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....
1
vote
1answer
2k 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 ...
0
votes
0answers
128 views

How do I fix these errors in $ source ~/.bashrc?

I have executed the $ source ~/.bashrc command. However, the following messages are appearing. thenn: command not found thenn: command not found pyenvinit: command not found I ran the following ...
0
votes
1answer
39 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 ...
0
votes
0answers
2k 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 ...
0
votes
1answer
666 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 ...
1
vote
0answers
467 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 : ...
0
votes
1answer
55 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 ...
0
votes
3answers
960 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 ...
8
votes
3answers
6k 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 ...
0
votes
1answer
334 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 ...
0
votes
0answers
88 views

How to remove python from virtual environment in Ubuntu

I have installed ubuntu on Windows using Windows Sub Linux feature. And now i'm using virtual environment with Python 3.8.2. So, I have to remove my Virtual Environment and Python both from Ubuntu. ...
0
votes
1answer
639 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 ...
0
votes
1answer
697 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, ...
0
votes
2answers
867 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 ...
0
votes
1answer
550 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> ...
2
votes
1answer
2k 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 ...
0
votes
2answers
1k 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 ...
4
votes
2answers
13k 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 ...
1
vote
0answers
366 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 --...
1
vote
1answer
4k 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 ...
0
votes
1answer
422 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....
0
votes
0answers
124 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 ...
1
vote
1answer
384 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 ...
3
votes
1answer
152 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 ...
3
votes
1answer
3k 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 ...
1
vote
0answers
214 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 \ -...
1
vote
1answer
72 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 ...
0
votes
2answers
1k 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 ...
7
votes
1answer
13k 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 --...
0
votes
2answers
539 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 ...
0
votes
2answers
365 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 ...
0
votes
2answers
1k views

Virtualenv Python version

I have Python3.5.2 by default on my Ubuntu System. I recently installed Python3.5.4. When I run python3 --version it outputs 3.5.2 and when I run python3.5 it shows 3.5.4. I want my project to use ...
1
vote
0answers
3k views

UnsatisfiableError: The following specifications were found to be incompatible with each other

How to Install opencv using conda with python3.7 on ubuntu 18.04? I am following this link and others, but getting the following error: UnsatisfiableError: The following specifications were found ...
1
vote
1answer
3k views

installing Anaconda in virtual environment!

I know anaconda is itself being used to set environment for different python versions, but i am trying to install the anaconda in virtual environment, so that my normal python setup, along with other ...
0
votes
0answers
293 views

Problem with running venv

Attempting to create a new environment using venv, installed Ubuntu for WSL, updated, and installed venv without issue. My problem is when I try to run venv, to create the new environment I used: $ ...
1
vote
0answers
369 views

turbodbc installation error in Ubuntu 18.04 [duplicate]

I tried to install turbodbc with pip install turbodbc inside a Python virtual environment in Ubuntu 18.04, but it's showing this error. DEPRECATION: Python 2.7 will reach the end of its life on ...
2
votes
1answer
2k views

How do I execute a python script through crontab with the virtual environment of the project?

I have seen that a couple of replies in different posts are close to my problem, but the considered solutions don't really work for me - lacking some final link. I want to use the venv of a specific ...
0
votes
1answer
127 views

Synaptic Package manager not showing installed package virtualenv

This is sort of confusing. I have synaptic package manager version 0.84.3(latest). It is showing virtualenv as 'not installed' although it has been installed. When i do the following in CLI virtualenv ...
1
vote
2answers
2k views

Pip broken after upgrading to 19.04

What is going on with pip: $ pip Traceback (most recent call last): File "/usr/local/bin/pip", line 7, in <module> from pip import main ImportError: cannot import name 'main' from 'pip' (/...
1
vote
1answer
422 views

Specific modules not Importing after cloning Git repository

So recently I cloned a repository SymPy by doing the following steps: Created Python3 virtual environment Activated it (from Terminal) Then ran git clone _sample_URL_ After that I ran the following ...
4
votes
1answer
4k views

Make virtualenv and activate it with shell script

I want to make shell script that makes virtualenv, activates it, install some libraries and run python script with it. But I have problem that I can't activate virtualenv in shell script unless i do "...
2
votes
1answer
3k views

Editting Bash Profile Ubuntu 18.04 LTS [duplicate]

I've been trying to work out how to edit the bash profile for the login shell in Ubuntu 18.04. Being new to linux and the forum being my friend, i found that it is located in .profile as oppose to ...
0
votes
1answer
3k views

Can't run pip from virtualenv - Segmentation fault (core dumped)

I'm trying to use pip to install various requirements in my virtualenv, but I can't get around the error Segementation fault (core dumped). That error seems to indicate memory access problems, but I ...