Questions tagged [virtualenv]
The virtualenv tag has no usage guidance.
56
questions
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 ...
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>
. ...
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&...
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 ...
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, ...
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 ...
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 ...
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 |...
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 -> ...
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 ...
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/...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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?&...
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 ...
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....
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 ...
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 ...
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 ...
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 ...
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.
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 ...
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
...
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; ...
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 ...
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 ...
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, ...
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.
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 ...
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 ...
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....
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 ...
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 ...
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 ...
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:...
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 '...
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, ...
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 ...
-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: ...
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/...
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 ...
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 ...
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 ...
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`;
...
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 ...
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)...