Questions tagged [virtualenv]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Text Display Problems in Parrot OS

I have a dual-booted Parrot OS with Windows 11. Whenever I run a virtual environment in Parrot, like a Virtual Machine, Instance or Terminal on a browser like Firefox or Tor, I get distorted coloured ...
Qui Gonn Jinn's user avatar
0 votes
1 answer
171 views

How to activate python venv in a non-bash shell?

I see most tutorials/online sources advice using either source or . (a bash built-in) to activate a python venv. For example, this page suggests to do the following in Linux: cd ~/<proj_name> . ...
tinlyx's user avatar
  • 556
0 votes
1 answer
190 views

Where can I find the Python executable that PyCharm uses in its venv?

I'm using PyCharm 2022.3.2 (Community Edition) under Linux Mint 20.3. I created a new project and selected "New environment using Virtualenv" as an option. PyCharm shows "Python 3.10&...
Bianfable's user avatar
  • 101
0 votes
0 answers
38 views

ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.9/dist-packages/itsdangerous/__init__.py)

I am using kali-linux. Installed pgadmin4 with python: $ sudo mkdir /var/lib/pgadmin $ sudo mkdir /var/log/pgadmin $ sudo chown $USER /var/lib/pgadmin $ sudo chown $USER /var/log/pgadmin $ python3 -m ...
Yilmaz's user avatar
  • 289
2 votes
2 answers
806 views

Set alias to run python venv setup based on current directory name

Can't seem to figure out what the issue is. This is on a Fedora 37 with default setup (bash, gnome, etc...). What I want to achieve is to create an alias that creates a python virtual environment, ...
calexandru's user avatar
0 votes
1 answer
499 views

Help! I blew up python, pip, and dnf! What should I do!

I bought a book about cyber security in Python, and the author uses python version 3.9. I'll get to dnf in a minute. I use Fedora Linux 37 and the default linux is linux 3.11. I set up a virtual ...
Bryan Zimmer's user avatar
1 vote
0 answers
53 views

Bash File Completion Creates Python Virtual Environment

Sometimes when I use tab file completion in a bash shell it pauses for one or two seconds before showing tab completion, and creates a Python virtual environment in my current directory. For example ...
kuirolo's user avatar
  • 11
2 votes
1 answer
476 views

Cannot source file using find, fzf, and xargs

I am trying to use fzf to select and activate different virtual environments. However, I am receiving the follow error: xargs: source: No such file or directory My command comprises three parts: find |...
user2514157's user avatar
0 votes
2 answers
743 views

Install Yum/Dnf in a Virtualenv

I've created a Virtualenv (with python3.6) and want to install yum/dnf package in that environment. Is there any way to do that? As import dnf or import yum giving me error in that environment -> ...
Rebecca's user avatar
  • 13
2 votes
0 answers
125 views

Installing packages in a virtual environment (not Python) using in-built package manager

I want to install packages in Linux via in-built package managers like portage for Gentoo or pacman for Arch. This is not regarding Python packages. I want to set up a virtual environment where all ...
Suzuna Minami's user avatar
0 votes
0 answers
1k views

Unable to connect to Jupyter notebook server (Error 404) from Pyenv virtual environment

OS: 5.14.14-arch1-1 GNU/Linux x86_64 Pkgs: jupyter4.6.3, jupyter-notebook6.4.4, pyenv2.2.0 ] My setup consists in launching jupyter from a pyenv virtual environment in directory /path/to/...
Cbhihe's user avatar
  • 2,559
0 votes
0 answers
79 views

python virtualenv How to manage lib***.so with virtualenv

recently I needed to work on a project that needed python3.4 on the Raspberry pi. I Know the easy answer is just to make an SD card with raspbian jessie(deb8) that comes pre bundled with python3.4 but ...
Prophacy's user avatar
0 votes
0 answers
94 views

python3 --version returns python 2.7 after messing up with environments

I was trying to create a new python virtual environment and I run sudo virtualenv xxx and I might try other similar comments too. After that, my python3 is messed up. You can see the output of the ...
user8523661's user avatar
0 votes
0 answers
57 views

Getting segmentation fault after ubuntu upgrade from 14.04 to 16.04

Our remote server has been recently upgraded, I used to use anaconda3 for the envs, now whatever command I type that has path anaconda bin folder gives a segmentation fault. $ conda list Segmentation ...
salmon7ish's user avatar
0 votes
1 answer
723 views

systemd start a script that activate virtual env not take effect

I was trying to systemd a flask app. I tried to write a script like this: #!/bin/bash cd /path/to/app source venv/bin/activate python start.py and just ExecStart this script in the .service file. But ...
TurtleTread's user avatar
2 votes
0 answers
339 views

How to properly use virtual environment python on an nfs server?

Is it a good practice to directly invoke python binary from the virtual environment on an nfs mounted disk? Obviously this avoids installing the virtual environment on every client machine, especially ...
John Jiang's user avatar
1 vote
1 answer
1k views

How to install pip without root access in Ubuntu > 18.04 without distutils package installed

I would like to install pip within any of my virtual environments created with venv, but the get-pip.py script requires the distutils package, which is not installed in the server I am using, and I ...
cserpell's user avatar
  • 111
1 vote
0 answers
137 views

how can I create a virtualenv variable inside a makefile

I am trying to create a makefile to compile a full project. I want to start by creating a virtualenv variable inside it using mkvirtualenv wrapper like: train: create_env echo "create env?&...
Minions's user avatar
  • 111
0 votes
0 answers
1k views

Can't activate python virtual environment on Ubuntu 20.04 LTS

I have created virtual environment from my MacBook with python3.9. Then I've tried to activate that environment from Ubuntu 20.04 LTS subsystem on Windows 10 but could not succeed. There initially ...
Emre Öztaş's user avatar
2 votes
2 answers
853 views

Bash in Ubuntu WSL requires restart to initialize pyenv

I have a small but very strange issue with pyenv in Ubuntu 20.04 on WSL. When I start a shell then try to activate a virtual environment, I get the same issue as described here: https://stackoverflow....
heniatha's user avatar
0 votes
1 answer
416 views

How can I create virtual environment for non-python stuffs?

Python Virtual environment has helped me in dealing with multiple versions of same python softwares without messing up my system(I use python tool labelme in a virtualenv which i couldnot install due ...
Abinash Dash's user avatar
3 votes
2 answers
4k views

Install virtualenv for python2.7 on debian 10

I want to use python2.7 with virtualenv. I recently upgraded from debian 8 to debian 10. I originally had python2.7 and pip installed on debian 8, but maybe something happened during the installation ...
mulllhausen's user avatar
  • 2,648
2 votes
1 answer
833 views

Python venv module cannot add virtual environment name to PS1, when using PROMPT_COMMAND?

I use the official Git Bash prompt support for displaying the current branch as part of the prompt. My problem is that activating a Python virtual environment (python -m venv <dir>) using ...
Shuzheng's user avatar
  • 4,073
3 votes
1 answer
648 views

Can I run the command in specific terminal?

OS: Linux mint 19.2 Cinnamon SHELL: Zsh TERMINAL: Tilix I want to create a shell script. which have 2 steps. Open the new terminal. Run source bin/activate at terminal that I opened. How do I run ...
pastelkona's user avatar
0 votes
1 answer
137 views

What is the correct way of installing virtualenv for Python?

What is the correct way of installing virtualenv for Python? Should I do sudo apt-get install python3-virtualenv or pip3 install virtualenv? I'm using Ubuntu 19.04.
user avatar
6 votes
3 answers
2k views

Equivalent to "source" in OpenBSD?

Trying to open a python3 virtual environment I have created with python3 -m venv myVenv by doing source myVenv/bin/activate as I do in Linux, but I get ksh: source: not found which mean it is ...
Salviati's user avatar
  • 189
7 votes
3 answers
4k views

Command '' not found + virtualenvwrapper error on ssh login (Ubuntu 18.04 x64)

when logging into my VPS with ssh keys, I get this: Command '' not found, but can be installed with: sudo apt install libpam-mount ... sudo apt install nmh ...
W. Reyna's user avatar
  • 171
4 votes
1 answer
3k views

debian 8 (jessie) - virtualenv with python3.6

so i have a fresh debian install. I installed pythons 3.5,3.6,3.7: root@m2:~# apt-get install python3.{5,6,7}-dev and try to set up some virtualenvs: for i in 5 6 7 ; do dir=venv3.$i; echo $dir; ...
murison's user avatar
  • 163
0 votes
3 answers
269 views

Patching a bash function

I have a shell function (ok, it's the deactivate() function defined by a Python virtualenv), and I would like to patch it by inserting some statements before or after it's executed. My goal is to have ...
alexis's user avatar
  • 5,719
3 votes
0 answers
91 views

Safely managing system/local/project Python packages?

The context I'm currently running a Gentoo desktop and want to move towards doing proper Python development on my system. I have tried to install some packages, namely docker-compose, through the ...
Matt Mazzanti's user avatar
2 votes
1 answer
838 views

Is it possible to save binaries that pip compiles while installing a package?

I'm working on a project for a Raspberry Pi 3. One of the things my project requires is cython. Running pip install cython on a Raspberry Pi inside of a virtualenv takes about 40 minutes to complete, ...
Tal's user avatar
  • 1,982
1 vote
1 answer
4k views

How to install python3 on a remote server without root access - linux

I have inbuilt python 2.7 and pip. I am wondering if there is anyway I can install python3 and then make a virtualenv using python3.
nikithashr's user avatar
0 votes
1 answer
885 views

Activating virtual environment doesn't import environment variables

I am trying to write a bash script which runs a couple of python management commands overnight. I read from other posts that you need to source the virtualenv to be able to import the environment ...
DDiran's user avatar
  • 115
32 votes
2 answers
41k views

How to run a command inside a virtualenv using systemd

I believe this should be simple but I can't get it to work properly. These are the commands I can run on command line: cd /home/debian/ap # Start a virtualenv source venv-ap/bin/activate # This ...
sscirrus's user avatar
  • 475
3 votes
0 answers
6k views

(Errno 30: Read-only file system) when creating python virtualenv in shared folder

I am running Ubuntu 17.10 trying to create a python virtual enviroment (named "my_virtualenv") inside my VBOX shared folder with the idea to use this python interpreter in pycharm from my Windows host....
Trantidon's user avatar
2 votes
0 answers
387 views

systemd uwsgi service fails to run automatically but runs when started from interactive session

I enabled the uWSGI service in systemd but it fails to run at startup, the log shows the following: Wed Nov 22 12:36:10 2017 - your processes number limit is 47903 Wed Nov 22 12:36:10 2017 - your ...
Luis E's user avatar
  • 21
4 votes
0 answers
1k views

Where to install Miniconda on Linux system?

I'd like to install miniconda so I can manage my Django projects with order, but I don't appreciate its suggestion to install on my home folder. I've installed many times in /opt but I need to alter ...
user avatar
1 vote
0 answers
212 views

setup mysql with django

I am trying to setup mysql server with my django application but I am having trouble installing it correctly. I used brew install mysql to install mysql server Then I used pip install mysqlclient ...
Ninja Turtle's user avatar
2 votes
0 answers
229 views

Arch Linux / Virtualenv: Python 3.5 failed after system upgrade

I updated my arch linux system just now. It upgraded my Python 3.5 to 3.6. When using python in the main environment, it works fine: [yuanyin@YuanYin ~]$ python Python 3.6.0 (default, Jan 16 2017, 12:...
joe wong's user avatar
1 vote
1 answer
67 views

Bash: `test` finds file but `source` wont

I use virtualenvwrapper to manage my Python environments. My global postactivate file — a Bash script that gets sourced, after a virtual environment is activated — contains the following: if [ -f '...
Brutus's user avatar
  • 365
13 votes
1 answer
40k views

How can install specific version of ansible?

How can I install a specific version of Ansible, using Yum or another method? When I try to install version 2.0 it says No package 2.0 available. I checked the epel repo. There are only two rpms, ...
salauddin's user avatar
  • 325
2 votes
0 answers
387 views

Error creating virtual environment using venv

I am trying to set up a Python development environment on Centos7 , I am relatively new to both Linux and Python. I am following this guide to setup the environment but I am getting an error when I ...
Fenomatik's user avatar
  • 171
-2 votes
2 answers
3k views

Bash: pyvenv: command not found

I have Debian 8.5. with a python version 3.4.2 as default. I want to create a virtualenv using the python3 venv module. But running pyvenv in terminal is unable to find the pyvenv: bash: pyvenv: ...
user avatar
2 votes
1 answer
2k views

Python virtualenvwrapper and ZSH prompt

I am using archlinux with zsh and python simha@gauranga ~ % echo $SHELL /usr/bin/zsh simha@gauranga ~ % python3 --version Python 3.5.1 my .zshrc is export WORKON_HOME=~/.virtualenvs source /usr/...
Santhosh's user avatar
  • 359
5 votes
3 answers
24k views

Running a Python script in Conda virtual environment as service

I recently wrote a Python program that is designed to communicate via SMPP SMS server. The issue I'm facing is that I don't know how to run a Python script as a service on my Cent OS server using ...
David Swan's user avatar
0 votes
2 answers
1k views

How Troubleshoot Failed Installation of pywfdb from pip?

Condition: unable to troubleshoot failed installation of the library/module pywfdb from pip Differential conditions: failed dependenciens of pywfdb Exclude: upstart/systemd design bugs with runit in ...
Léo Léopold Hertz 준영's user avatar
0 votes
2 answers
337 views

python virtual environment

I have to install python package locally/globally on a machine using pip, so for I do not want to install pip on local machine. I can successfully create a new virtual environment using easy_install ...
Nitesh S's user avatar
1 vote
0 answers
90 views

Issue in activating environment on UAT server

I was working on a script that logs in to UAT server, reroute to necessary folder and activates the virtual environment. Following is the script: function gotouat(){ branch=`getBranchName`; ...
Rajesh's user avatar
  • 111
1 vote
1 answer
8k views

How do I use GNOME Keyring with Python Keyring in virtual environment?

I have written a Python script that I would like to run in the background on my Raspberry Pi. The script makes use of the Python module Keyring (link), which is used to access a keyring backend to ...
P A N's user avatar
  • 1,691
0 votes
1 answer
786 views

No paths getting set on login - bash not loading correctly?

I don't know if this is because of virtualenv, but I ran the virtualenv command to set up a tensorflow environment. Now no paths get loaded at all. Nothing works. To do even basic commands (such as ls)...
Sefu's user avatar
  • 103