Questions tagged [virtualenv]

65 questions
41
votes
1 answer

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: command 'gcc' failed with exit status 1 I'm…
J.Zil
  • 1,103
  • 3
  • 20
  • 29
15
votes
1 answer

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 maintainable over the years. However, I've only…
gnufs
  • 161
  • 1
  • 6
13
votes
8 answers

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/activate (myenv.env)nam@server:~$ pip install…
Luke Sapan
  • 189
  • 1
  • 2
  • 15
11
votes
1 answer

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…
Jasmine
  • 243
  • 1
  • 3
  • 8
10
votes
3 answers

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 virtualenv with Python 3 in it produces the following…
Jaap Joris Vens
  • 561
  • 2
  • 7
  • 18
8
votes
1 answer

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 correctly, I run ./manage.py syncdb But an…
user236239
7
votes
3 answers

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/bin/activate $ pip install trac I've then written…
Nicolas Appriou
  • 173
  • 1
  • 1
  • 6
7
votes
1 answer

Django + gunicorn + virtualenv + Supervisord issue

I have a strange issue with my virtualenv + gunicorn setup, only when gunicorn is launched via supervisord. I do realize that it may very well be an issue with my supervisord and I would appreciate any feedback on a better place to ask for…
Florian Le Goff
  • 121
  • 1
  • 5
6
votes
1 answer

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 scripts are throwing errors. Here is my…
Hanpan
  • 183
  • 1
  • 1
  • 4
6
votes
2 answers

"ImportError: No module named flask" - Trouble with nginx + uWSGI + Flask in a virtualenv setup

I got nginx + uWSGI running on localhost inside a virtualenv with a simple hello world program, but I get this error when I replace the hello world with a simple Flask app: File "./wsgi_configuration_module.py", line 1, in from flask…
vjk2005
  • 175
  • 1
  • 2
  • 8
5
votes
1 answer

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-session -d -s my_server tmux send-keys -t…
Houman
  • 1,325
  • 3
  • 18
  • 30
5
votes
0 answers

Running Celery as a Daemon while using VirtualEnv

I've setup and tested celery on my amazon linux server, using mysql as the messaging backend and it works fine when running the program directly. My python project and celery install are located in a virtualenv. However if I attempt to daemonize…
elkelk
  • 161
  • 1
  • 8
4
votes
1 answer

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.json /home/crimson/venv/python3/myvrni.json…
KidACrimson
  • 320
  • 1
  • 10
  • 24
3
votes
1 answer

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.g.: /vars/activateEnvironment.groovy: def…
cwh
  • 63
  • 1
  • 9
3
votes
1 answer

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 today while trying to figure this out: what user…
mlissner
  • 990
  • 3
  • 8
  • 17
1
2 3 4 5