Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [virtualenv]

The tag has no usage guidance.

1
vote
3answers
73 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
0answers
99 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 ...
0
votes
0answers
80 views

Error 22, gcloud deploy app; wrong slashes? From installing python tools with linux and using gloud shell on windows?

On Windows 10, I run glcoud app deploy And it fails, the stack trace starts like this ERROR: gcloud crashed (IOError): Got exception Traceback (most recent call last): File "C:\Program Files (...
0
votes
2answers
352 views

Let's Encrypt error with Amazon Linux with virtualenv

I download certbot-auto and ran ./certbot-auto certonly --standalone -d domain.com -m tech@domain.com --agree-tos -n --debug I get below error that it is looking for virtualenv==15.1.0 but ...
0
votes
0answers
256 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 --...
0
votes
1answer
244 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 ...
2
votes
1answer
976 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
1answer
85 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$ ...
0
votes
1answer
832 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
0answers
87 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 ...
9
votes
1answer
17k 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 ...
1
vote
1answer
380 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
1answer
29 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
0answers
177 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
1answer
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
1answer
129 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
0answers
947 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
1answer
821 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
1answer
780 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 ...
2
votes
2answers
9k 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....
4
votes
1answer
2k 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
1answer
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
1answer
948 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/...
1
vote
1answer
2k 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
2answers
2k 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 ...
7
votes
3answers
7k 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 ...
6
votes
1answer
11k 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 ...
4
votes
3answers
14k 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
1answer
37 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>/...
1
vote
1answer
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
4answers
764 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
1answer
142 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
1answer
603 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 ...
1
vote
1answer
1k 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
1answer
104 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
0answers
57 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?
0
votes
1answer
4k 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-...
21
votes
1answer
48k 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:...
7
votes
5answers
15k 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
1answer
90 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
1answer
13k 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
1answer
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
1answer
155 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
2answers
4k 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
1answer
454 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
3answers
1k 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@...
1
vote
1answer
329 views

Virtualenv not isolating pip installs properly on Ubuntu

I'm using virtualenv on Ubuntu 12 and when I install packages with pip (after activating the virtualenv) the packages are not being installed in the environment's site-packages directory, they're ...
15
votes
1answer
3k views

Is virtualenv suitable for a production server?

I'm planning to set up a Python app (Pyblosxom) on my server and considering to run it in its own virtualenv sandbox with --no-site-packages. I'm hoping that such a setup would be easily portable and ...
1
vote
1answer
2k views

How do I upgrade Django 1.3.1 to 1.4? Any tips, tutorials, or warnings?

Django 1.4 was recently released. Almost all the information about Django 1.4 is in the release note, but I didn't see anything about how to upgrade. Should I just remove the django folder inside ...
2
votes
1answer
2k views

How to run easy_install and pip without root, without virtualenv?

People have access to servers as normal users (jailed actually), and they're advised - at the moment - to download whatever python packages they need, setup.py build them, then add their location to ...