Questions tagged [virtualenv]
The virtualenv tag has no usage guidance.
66
questions
1
vote
2
answers
891
views
Cleaning Jenkins workspace but keep Python .venv intact
This question pertains to working with a Python + Poetry project within a Jenkins pipeline and how to retain the .venv/
SCENARIO:
I have a Jenkins Pipeline job that triggers a Python project. The ...
0
votes
2
answers
1k
views
Cron Tab as specific user and python virtual env
Wanting to run an hourly cron job as a specific user (xfeautomation) and python virtual environment. Running as a specific user, will I have to add the script location into PATH?
My current cron job ...
0
votes
1
answer
1k
views
Why is my virtualenv not activated by uwsgi?
On a fresh install of Debian Bullseye I am unable to use the uwsgi command. It fails to load the requested virtualenv.
This is the command that fails:
uwsgi --plugins http,python3 --wsgi-file wsgi.py -...
2
votes
1
answer
1k
views
uwsgi vassal does not use virtualenv
I am running a python application started by an uwsgi emperor. The application is supposed to run in a specific venv, but I cannot get that to work.
The ini file for the application specifies a venv ...
4
votes
1
answer
163
views
Python 3.6.3 virtual environment issue in CentOS7 - "Error: Could not connect to Docker (is it running?)"
I have a virtualenv issue in my CentOS7 VM:
Checking for virtualenv...
Activating virtual environment /home/crimson/venv/python3
/home/crimson/venv/python3/myvra.json matches /home/crimson/venv/myvra....
1
vote
3
answers
1k
views
Red Hat + pip + virtualenv + proxy = Error
i've an issue: my corporate proxy kill every pip-installation.
export http_proxy= doesn't works:
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken ...
0
votes
0
answers
343
views
How to remove python-virtualenv RPM using commands that are run from an installing RPM?
I need to install virtualenv from an RPM.
I do this from the RPM's post-install script, with the following:
pip2 install pip --upgrade
pip2 install virtualenv --upgrade
However, the pip2 install ...
1
vote
2
answers
2k
views
Let's Encrypt error with Amazon Linux with virtualenv
I download certbot-auto and ran
./certbot-auto certonly --standalone -d domain.com -m [email protected] --agree-tos -n --debug
I get below error that it is looking for virtualenv==15.1.0 but ...
0
votes
0
answers
1k
views
Why doesn't gcc compile for Python packages inside virtualenv?
I am trying to compile a Python script into an executable that relies upon packages only installed inside a virtualenv:
sudo su
source /home/me/venv/bin/activate # Activates virtualenv
cython --...
3
votes
2
answers
1k
views
How to get virtualenv for compiled python (missing pip/easy_install)?
To update an old system I had to compile python 2.7.14 with custom openssl version. The compiled system has no virtualenv binary and also neither pip nor easy_install for extension. How can I get ...
3
votes
1
answer
5k
views
Per-job environments in Jenkins with virtualenv
I'm trying to use virtualenv to programmatically manage Python environments for each job on a Jenkins server, implemented via a Shared Library extension to activate environments on a per job basis. E....
0
votes
1
answer
397
views
Django CMS using nginx and gunicorn in virtualenv renders html from version 3.4.4 after upgrade to 3.4.5 - where is the caching?
I set up a django-cms installation version 3.4.4 with nginx and gunicorn. Then I removed the installation and installed the new 3.4.5 version.
Pip confirms this worked:
(myenv) user@s23:~/myenv$ ...
1
vote
1
answer
3k
views
Can any virtual environment start systemd gunicorn.service for all virtuenenv?
If you are not working inside an environment, Gunicorn will be installed globally (i.e. available systemwide). This is not recommended. Always opt for using virtualenv. But if you have multiple ...
1
vote
0
answers
106
views
Linux "which virtualenv-2.7" shows a repeating path
I think I messed up some components when trying to install ruby, and not virtualenv-2.7 seems to be broken.
I am not even sure if I am describing the problem correctly, as I can't figure out the ...
11
votes
1
answer
34k
views
Systemd : Run a Python Script At Startup (virtualenv)
I have a python script that I normally run it with this command:
(environment) python run.py
I want to run this script at start. (I'm using ubuntu) Here is my service:
[Unit]
Description=My Script ...
2
votes
1
answer
677
views
Where to store the Python virtualenv of a system-wide installed application
You're deploying a Python application that uses its own virtualenv with libraries different from the system installed libraries, and you need to install those libraries the best way possible.
I ask ...
0
votes
1
answer
39
views
PyPi Django installation incomplete
I've encountered an interesting issue, and haven't yet managed to solve it with Google.
I'm using virtualenv+python3.5. After a number of ImportErrors, I came to a conclusion that my Django ...
0
votes
0
answers
441
views
Apache maximum memory size per child
Running apache 2.0 on ubuntu 14.04 (MPM prefork), I'm seeing multiple child workers with variable "RES" megabyte values (as expected). While I have plenty of RAM to handle all of these processes (i.e. ...
0
votes
1
answer
2k
views
Pip + virtualenv + Redhat SCL + proxy = not working
I am setting up a virtualenv based on Python 2.7 in Redhat Enterprise 6 (which ships with 2.6.x by default).
I installed the SCL 2.7 version of Python and then created the virtualenv:
$ scl enable ...
1
vote
1
answer
417
views
Switching library paths in python virtualenv dynamically
There are two versions of Python that can be installed on RHEL 6.7, as many obviously know. Yum needs 2.6, and other programs for example Graphite need 2.7
After digging into it, I see that even when ...
0
votes
0
answers
2k
views
Gunicorn Flask Deployment with Supervisord doesn't find command on boot
I am deploying a Flask application with Gunicorn, Nginx and Supervisord.
Here is my config file for the application:
[program:apwd-flask]
command = /home/aaron/dev/apwd-flask/venv/bin/gunicorn --...
3
votes
1
answer
1k
views
How should virtualenv be set up in a production Web server (user, location, etc.)
I'm switching my production sever to use virtualenv, and I want to understand the best practices for setting up virtualenv in a production environment. The following questions are ones I've run into ...
0
votes
1
answer
2k
views
sudo (-E) doesn't preserve path, even when configured appropriately
I have circus installed in a python virtualenv using virtualenvwrapper, and I want to run it with sudo. Sounds simple, right? Unfortunately even after reading man sudo and man sudoers, I don't ...
3
votes
3
answers
17k
views
Python3 virtualenv: ImportError: no module named 'ConfigParser'
I'm working on OSX and I'm trying to create a virtualenv with Python3, but I'm getting an error:
$ virtualenv --python python3 env
Running virtualenv with interpreter /Library/Frameworks/Python....
6
votes
1
answer
3k
views
How to start a tmux within bash right after reboot
I have created a script to run upon reboot of an Ubuntu instance.
crontab -e
Then added this to the script:
@reboot /home/ubuntu/startup.sh
This is how the script looks like:
#!/bin/bash
tmux new-...
0
votes
1
answer
1k
views
Installing scipy in virtualenv on Elastic Beanstalk
I'm using Amazon's Elastic Beanstalk to deploy an example Flask app. I can get a simple "Hello World" app deployed perfectly, but now I'm trying to deploy the app with scipy as a requirement.
I've ...
0
votes
1
answer
1k
views
How to debug 403 error on Cent OS?
I'm trying to install phpMyAdmin and I'm getting a 403.
/etc/httpd/conf/httpd.conf
<Directory /usr/share/phpMyAdmin/>
Order Deny,Allow
Allow from all
</Directory>
/etc/...
2
votes
1
answer
5k
views
virtualenv Failed to map segment from shared object: Permission denied
When SELinx is in permissive the Django webapp runs fine with no alerts. The below error appears in the Apache error log, once SELinux is set to enforcing, but no alerts are logged to audit.log.
[...
0
votes
2
answers
4k
views
Packaging a virtualenv
I'd like to package a Python virtualenv with fpm, so that I can deploy it to my servers. I want to setup the virtualenv somewhere in my home directory without having to use root permissions, but ...
12
votes
3
answers
16k
views
Different Python versions under the same uwsgi Emperor?
I'm running an uwsgi Emperor with various Vassals that each serve a specific Python app from a different virtualenv. Since uwsgi was compiled with it's own Python 2.7 interpreter, trying to use a ...
8
votes
1
answer
28k
views
psycopg2 not found by django after installing in virtualenv
I want to use postgresql with django so did the following:
sudo apt-get install libpq-dev python-dev
sudo apt-get update
workon myenv
sudo pip install psycopg2
And after configuring my settings.py ...
8
votes
3
answers
23k
views
uWSGI and python virtual env
I'm trying to use uWSGI with a virtual env in order to use the Trac bug tracker on it.
I've installed system-wide uwsgi via pip.
Next, I've installed trac in a virtualenv
$ virtualenv venv
$ . venv/...
0
votes
1
answer
51
views
Python code location on debian [closed]
Simple question, which of these is a better directory setup for locating my project and why, as I have seen both recommended on different tutorial sites:
Option 1:
/var/www/<projectname>/...
2
votes
1
answer
2k
views
Why does httpd seem to use a different version of python with the same executable?
I am running Apache httpd 2.4.4 on a RedHat 5 machine. I am using Django and running through mod_wsgi. I have Python 2.4.3 installed in /usr/bin and Python 2.7.6 installed in /usr/local/bin and I want ...
0
votes
4
answers
826
views
Trying to use virtualenv Django 1.4.1
I have Django 1.2.1 on the server.
I need to use virtually Python to install Django 1.4.1 and an adapter to PostgreSQL which I want.
I am trying to set up this software on my server.
So I run
...
0
votes
1
answer
196
views
Trouble with $PATH on debian
I think I have a problem with $PATH. I am running a shell script and it is complaining that it doesnt recognize the command even though when I run it manually it does.
Shell Script:
#!/bin/bash
# ...
0
votes
1
answer
637
views
Is it practical to use Google App Engine for a Django app?
I'm currently building a Django app that uses a MySQL backend. Traditionally I've worked with a VirtualEnv where I can install python packages, set folder permissions, etc.
From some pages I've found ...
4
votes
1
answer
2k
views
Trying to run gunicorn from supervisor gives error - error: class uri 'simple' invalid or not found
I am already running successfully 2 django projects (in same virtualenv with python 2.7) with Django + gunicorn + virtualenv + Supervisord environment. But now i am trying to run another project in ...
1
vote
1
answer
127
views
Debian virtualenv location
I have a question that I would appreciate some help with. I want to run a number of sites from my debian server, each with their own virtualenv.
Should I be creating my virtualenv in the www-data or /...
1
vote
0
answers
64
views
Automatically create virtualenvs for new user accounts
In Linux, how can I go about automatically creating virtualenvs for each newly created user account? Can it easily be done?
1
vote
1
answer
5k
views
Import error on boto - Module not found
I have a ubuntu LTS server. On boot I run a script which does the following:
#!/bin/bash
apt-get -y install build-essential python-dev libxml2-dev libxslt1-dev
apt-get -y install python-pip python-...
41
votes
1
answer
101k
views
Unable to execute gcc: No such file or directory
I am running Ubuntu LTS and I'm getting errors when trying to do some of my pip install stuff, like scrapy for example. This is the error I get:
Unable to execute gcc: No such file or directory
Error:...
13
votes
8
answers
50k
views
PIP not installing to virtualenv directory
I am attempting to install django to a virtualenv that already exists.
Following the instructions listed on the pip-install website here, I ran the following from SSH.
name@server:~$ . myenv.env/bin/...
0
votes
1
answer
110
views
How do I setup nginx and uwsgi when using virtualenv?
I am going to start using virtualenv for the first time. If I am going to have multiple environments with a django project in each, do I have 1 nginx instance running and have each domain point to the ...
6
votes
1
answer
21k
views
Ubuntu - Supervisord and virtualenv
I'm attempting to run a series of Python apps from supervisor. It works fine on Mac OSX, but when I attempt to run the same app on Ubuntu, supervisor doesn't seem to be activating the virtualenv so my ...
2
votes
1
answer
2k
views
Deploying Flask application with nginx, uWSGI and virtualenv
I'm having a lot of trouble to deploy a Flask application on a CentOS 6 server. I know a few other questions have been asked concerning this problem, but I haven't succeeded yet.
Description
...
3
votes
1
answer
175
views
Workaround for pip install -E option
I am running a Fabric script that sets up a virtualenv on a remote server (running Ubuntu 12.04) and installs various packages into it. The script uses the -E option for pip to install the packages ...
1
vote
3
answers
8k
views
"Connection in use" running Gunicorn using VirtualEnv
I am trying to set up a development environment using Gunicorn and NGINX.
While following this tutorial: http://ijcdigital.com/blog/django-gunicorn-and-nginx-setup/
I get the following error:
(...
1
vote
1
answer
1k
views
SSH session closing whilst virtualenv session stays open (I think)
I've been developing some sites using Flask recently (running on debian within a virtualenv), and when I am testing I can run it on a port, let's say post 5000.
So I run the script like so:
. env/...
1
vote
3
answers
2k
views
Why can't I run virtualenv without root?
I'm trying to run virtual env and all the documentation says I don't need to run it as root (and probably shouldn't). If I run it as root, everything works. If I run it without root, I get:
[stats@...