Questions tagged [python]

Python is a dynamically and strongly typed programming language that encourages readability.

1743 questions
8
votes
3 answers

Install Python 2.5 on RedHat/Centos

Current Python version is 2.4... yum upgrade python Gives Could not find update match for python Do I have to install from source?
EoghanM
  • 560
  • 2
  • 7
  • 15
8
votes
5 answers

How can I create multiple, numbered copies of a file in Windows?

I have a file named poll001.html, and need to create 100 copies that are named incrementally (i.e poll002.html, poll003.html...etc). I know this is stupid, but it is what boss-man wants. any suggestions to this with either a script, command-line, or…
tomwolber
  • 179
  • 1
  • 1
  • 3
8
votes
3 answers

CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team

I'm trying to run docker-compose (which was installed via pip), yet running into following error: # pip install --quiet docker-compose # docker-compose ps /usr/local/lib/python2.7/dist-packages/paramiko/transport.py:33:…
alexus
  • 13,112
  • 32
  • 117
  • 174
7
votes
1 answer

Cron job running a Django Python command through a virtual environment not working

I have a crontab file supposedly executing a Django command after loading the project virtual environment: */1 * * * * source /home/virtualenvs/mydjangoproject-venv/bin/activate && python /home/www/production/mydjangoproject/manage.py…
bolino
  • 273
  • 3
  • 15
7
votes
1 answer

Build Docker image with cache on build server?

We've got a Jenkins CI server that fetches our code from Git, builds it, makes a Docker image, and then ships it off to some production servers. Our project is primarily written in Python, so "building" involves running pip install -r…
Tim
  • 71
  • 2
7
votes
2 answers

pip install seems to be ignoring dependency links

I have a Python application that depends on several packages. One of those packages, unfortunately, isn't in PyPi so I have to install it directly from the git repo. I've been trying to add it into my setup.py like…
Dave Holland
  • 1,898
  • 1
  • 13
  • 18
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

Unable to load configuration from uwsgi

Since yesterday I have been wrestling with this problem: unable to load configuration from uwsgi When I google it, nothing comes up. I am trying to run UWSGI under nginx with a very simple uwsgi.ini file. The file is being pointed to correctly. Can…
J.Zil
  • 1,123
  • 3
  • 21
  • 29
7
votes
2 answers

During yum update, Python installation is updated. Do I need to restart running programs?

As the title says. If I run yum update(It's a CentOS box) and there happens to be a Python update. What happens if other users have running Python programs. Do I need to alert them to restart the programs? Or can they safely continue to run those…
Ivan Kovacevic
  • 1,801
  • 3
  • 15
  • 19
7
votes
10 answers

How can I restart a windows service remotely using a script?

I have a Python web application running in a CherryPy server, which is running as a windows service. I have a batch file to deploy this application, but I'm still having to remote desktop in to the server to restart the service. Is there any way…
Jason Baker
  • 1,229
  • 6
  • 20
  • 26
7
votes
0 answers

ImportError: No module named flask - uwsgi and buildout

uWSGI config: app_wsgi:app ./src /tmp/uwsgi.sock /tmp/uwsgi.pid uwsgi.log buildout.cfg [buildout] parts =…
Pavel Paulau
  • 171
  • 3
7
votes
2 answers

uWSGI cannot find "application" using Flask and Virtualenv

Using uWSGI to serve a simple wsgi app, (a simple "Hello, World") my configuration works, but when I try to run a Flask app, I get this in uWSGI's error logs: current working directory: /opt/python-env/coefficient/lib/python2.6/site-packages writing…
skyler
  • 465
  • 3
  • 8
  • 17
7
votes
2 answers

'pip install carbon' looks like it works, but pip disagrees afterward

I'm trying to use pip to install the package carbon, a package related to statistics collection. When I run pip install carbon, it looks like everything works. However, pip is unconvinced that the package is actually installed. (This ultimately…
user33638
7
votes
4 answers

Perl or Python, better suited for Unix system automation?

I have been using bash for most of my system administration tasks. I also know a bit of perl. Should I learn Python or Perl is better for system automation. So far from my experience learning perl has been easy.
nitins
  • 2,579
  • 15
  • 44
  • 68
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