Questions tagged [virtualenv]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
10 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 ...
user avatar
  • 11
0 votes
1 answer
19 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 |...
user avatar
0 votes
2 answers
96 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 -> ...
user avatar
  • 13
0 votes
0 answers
5 views

Is there a way to run virtualenv's binaries without activating the virtualenv, but still having the environment "active"?

Hope this is not too hacky... I have a virtualenv which I edited a bit. I appended the following lines to activate: # Adding xxx packages paths to PYTHONPATH to fix imports # Keep old PYTHONPATH ...
user avatar
0 votes
0 answers
23 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 ...
user avatar
0 votes
0 answers
79 views

RC-local and python virtual environments

I'm advising someone on how to get a series of Bash scripts to execute at startup. The option that we've gone with is placing them in /etc/rc.local. Each Bash script activates a virtual env and then ...
user avatar
0 votes
0 answers
347 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/...
user avatar
  • 2,288
0 votes
0 answers
18 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 ...
user avatar
0 votes
0 answers
38 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 ...
user avatar
0 votes
0 answers
39 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 ...
user avatar
0 votes
1 answer
176 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 ...
user avatar
1 vote
0 answers
151 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 ...
user avatar
1 vote
1 answer
607 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 ...
user avatar
  • 111
1 vote
0 answers
74 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?&...
user avatar
  • 111
0 votes
0 answers
525 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 ...
user avatar
2 votes
2 answers
527 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....
user avatar
0 votes
0 answers
1k views

gcloud command not working with python virtual environment

I am having a Linux server with Centos7 as operating system. I have installed gcloud and it's working fine. [xyz@innolx20122 ~]$ gcloud version Google Cloud SDK 308.0.0 alpha 2020.08.28 beta 2020.08....
user avatar
-1 votes
1 answer
199 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 ...
user avatar
3 votes
2 answers
3k 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 ...
user avatar
  • 2,478
1 vote
1 answer
407 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 ...
user avatar
  • 3,357
3 votes
1 answer
451 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 ...
user avatar
0 votes
1 answer
82 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
  • 135
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 ...
user avatar
  • 187
6 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 ...
user avatar
  • 161
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; ...
user avatar
  • 163
0 votes
3 answers
203 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 ...
user avatar
  • 5,560
3 votes
0 answers
82 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 ...
user avatar
2 votes
1 answer
627 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, ...
user avatar
  • 1,762
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.
user avatar
0 votes
1 answer
497 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 ...
user avatar
  • 115
30 votes
2 answers
33k 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 ...
user avatar
  • 455
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....
user avatar
2 votes
0 answers
346 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 ...
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
  • 287
1 vote
0 answers
205 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 ...
user avatar
2 votes
0 answers
198 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:...
user avatar
1 vote
1 answer
61 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 '...
user avatar
  • 365
13 votes
1 answer
35k 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, ...
user avatar
  • 325
2 votes
0 answers
373 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 ...
user avatar
  • 161
-1 votes
2 answers
2k 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
1k 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/...
user avatar
  • 247
5 votes
3 answers
19k 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 ...
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 ...
user avatar
0 votes
2 answers
259 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 ...
user avatar
1 vote
0 answers
89 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`; ...
user avatar
  • 111
1 vote
1 answer
6k 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 ...
user avatar
  • 1,431
0 votes
1 answer
634 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)...
user avatar
  • 103
0 votes
2 answers
1k views

Is it possible to redirect a local port to a LAN port?

I'm using a Flask application with virtual environment. When I start the server, I can access it locally via the IP 127.0.0.1:5000, but I'd like to make it accessible on my WLAN (pointing at 10.0.0.1:...
user avatar
1 vote
0 answers
328 views

Run mkvirtualenv command as another user

I want to run the "mkvirtual sth" but I have to run the script as superuser. sudo ./install.sh install.sh looks like this: # ... mkvirtualenv sth # su - geeret -c "mkvirtualenv sth" # (tried this) ...
user avatar
  • 111
3 votes
1 answer
973 views

Ubuntu: Process vfs-worker taking all CPU resources

My Cloud9 (Ubuntu-based cloud IDE) began to be unresponsive after I tried to save some files (they didn't save to my cloud workspace). It shows 100% CPU utilization and a process that takes all CPU ...
user avatar
  • 1,182