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

learn more… | top users | synonyms

2
votes
1answer
118 views

Python: How can i read the environment variables / user path variables from another user?

As far as i know, the user variables (of the currently logged on user) are stored in HKEY_CURRENT_USER\Environment. User path variables are stored in HKEY_CURRENT_USER\Software\Microsoft\Windows\...
1
vote
1answer
28 views

Running a script before packages are installed from requirements.txt

My app has some prerequisite conditions that mean that the installs from requirements won't work until a few scripts are run. I've been reading through the documentation on customizing the Python ...
0
votes
0answers
59 views

exception raised while using pip3

I need help fixing my pip3 install. every time I try to use it, say to install a python program or even to list the installed modules I've got the same series of errors : root@test:~# pip3 list ...
-1
votes
1answer
335 views

What shebang for Anaconda Python on my directory of Server

I have anaconda python distribution in ~/anaconda/bin/python but what shebang can I use to call this version of python instead of the old one that is default on the server? # /opt/python/bin/python2....
0
votes
0answers
333 views

“WindowsError: [Error 5] Access is denied” when running a python script

I'm getting a "WindowsError: [Error 5] Access is denied" message when running a python script which attempts to make an https connection. The following error message is produced by python: Traceback ...
-1
votes
2answers
923 views

python boto3 allow ingress security groups

I am developing a simple python script to add rules to securitygroups, and I am wondering what is the difference between the two methods available within boto3: authorize_security_group_ingress(**...
2
votes
1answer
430 views

Apache mod_wsgi installation error

I'm running CentOS 6.7, I'm trying to install mod_wsgi (https://code.google.com/p/modwsgi/) Normally I'd just do: yum install mod_wsgi But since I need to make sure it compiles under Python 2.7 ...
2
votes
1answer
216 views

Why do I sporadically get SSL: CERTIFICATE_VERIFY_FAILED in python 2.7.9+?

Let me start off by saying that I am aware of Python 2.7.9's changes to verify SSL certificates. I'm also aware of a few different ways to hack around it to turn it off. My question is that why do I ...
0
votes
0answers
691 views

Howto install python psutil on CentOS 6?

#yum install python26 python26-devel python26-setuptools gcc #easy_install psutil [root@vps021 ~]# easy_install psutil Searching for psutil Reading http://pypi.python.org/simple/psutil/ Best match: ...
0
votes
0answers
105 views

tmux permission denied error

I have got ubuntu 12.04 server with python tornado http application server. Tornado server started in tmux('python server.py'). It works fine with tmux session from my laptop. After disconnecting (...
0
votes
1answer
99 views

(Possibly installing and) using a specific version of Python

For a scientific application, I need to use specific versions of the Python packages numpy, scipy, and brian2. I've installed the correct versions on my laptop and run their test suites as follows: &...
0
votes
1answer
25 views

IMAP port permission (Python)

I'm writing a program to read emails from python when I execute below code it hangs in the last line import imaplib mail_server = "192.168.2.2" connection = imaplib.IMAP4_SSL(mail_server,993) I ...
0
votes
1answer
890 views

How to stop celery worker?

I am running celery via redis. I start my worker like this: celery multi start worker1 -A mypackage.tasks.tasks celery multi v3.1.18 (Cipater) > Starting nodes... > worker1@polyphemus....
-1
votes
1answer
321 views

Running Python scripts on Apache Server: 403 Forbidden Error

I need to run a few python scripts on a subdomain of my website set up using Apache on an AWS EC2 instance running Ubuntu. I tried following some of the steps mentioned in this post. I get a 403 error ...
0
votes
0answers
179 views

Apache, how to set a different virtualenv for every virtual host

I would like to host multiple web application on my Apache Server (2.2). But I would like each application to use a different virtualenv. This is my current configuration: WSGIPythonHome /home/...
0
votes
1answer
39 views

What to do if /usr/lib/python*/site-packages is accidentally deleted?

I have accidentally deleted my site-packages folder for python2.7.5 under /usr/lib/ . I have seen that if this problem happens i need to install python again. So, i took an rpm and tried rpm -i ...
0
votes
1answer
85 views

Use boto to update ElasticBeanstalk environment options

Boto has a function, update_environment, that allows the user to update options in an AWS ElasticBeanstalk environment. Using the AWS CLI, this would typically be actioned as follows: aws ...
2
votes
0answers
88 views

noVNC console on Openstack Dashboard is rendering garbled UI on RHEL7

I am running nova-compute on RHEL7. Openstack dashboard's noVNC console is rendering garbled UI for any instance having a UI console. Can somebody please help out? This is working just fine on RHEL65
0
votes
1answer
92 views

After moving a Django application to a new project on the same server it is still using the original project settings.py

Setup: Django version 1.4, using Supervisor, NGINX, gunicorn, and postgresql 8.4. I have two Django projects hosted on one server, and one is leaving the server. There is an important application ...
0
votes
0answers
54 views

Issues with NAUbackup Email Notification

I've setup NAUbackup to carry out backups for my xenserver 6.5 VM's. It backups up fine but I can't get the email notification to work. I've uncommented everything in the VmBackup.py script, added my ...
-1
votes
1answer
23 views

Nagios Custom scripting help needed

I am running into a file permissions error when a custom python script is running as a service check, but when I run the script from the bash shell it runs fine. Here is more information on how this ...
0
votes
0answers
77 views

Apache mod_wsgi virtualenv

I would like to install mod_wsgi for my apache server. I've seen in the documentation that I have 2 ways to install: 1. directly for the apache 2. with pip In case I install it with pip, as far as I'...
0
votes
0answers
146 views

openshift online: issues with single cartridge for nodejs and python3

I'm trying to setup a single cartridge for nodejs and python3 because i need to execute a python3 script from nodejs and by default, a nodejs cart doesn't support python3, neither do I have root ...
1
vote
0answers
340 views

Can't connect to (or write to) a socket file, despite being owner?

I am working on Debian Jessie with Django 1.8, trying to set up Gunicorn to run my Django site. I have made a user called opuser, and made this user the owner of the gunicorn.sock file and of the ...
1
vote
1answer
199 views

yum or apt-get does not work on amazon-aws

when I do yum, it says bash: /usr/bin/yum: /usr/bin/python2.62.7: bad interpreter: No such file or directory my aws instance details are as given below: Linux ip-72-311-15-127 3.14.27-25.47.amzn1....
-1
votes
1answer
69 views

Cron: Execute python script, capture stdout & stderr and send via msmtp [duplicate]

I try this for almost 4 hours now, in different ways. I googled a lot, but nothing I try work as expected. I have a simple .msmtprpc file, that allows me to send mails like this: echo -e "Subject: ...
3
votes
1answer
93 views

What's the difference between running Python web applications in normal way and running them under wsgi?

I know that in order to run a Python web application(an application developed with frameworks such as Flask & Django) on the server, you need to deploy it using things such as uwsgi, wsgi.. ...
0
votes
1answer
187 views

root location of Flask app returns 403 on nginx server

I've seen other posts say that either file permissions or the lack of an index directive are the cause. However, my Flask application does not have an index file at all, and most of the site works ...
1
vote
0answers
14 views

Call to pythons os.getcwd returning odd results on Lustre filesystem

I don't really know if this question should be on Server Fault or Stack Oveflow, but I thought I'd try here first. I have a python application that makes quite a lot of calls to os file system calls ...
-1
votes
1answer
130 views

Missing “app engine service account” in developers console

I'm currently in the proces of updating an old appengine application to use the new cloudstorage based files API (python). This also means setting up cloudstorage for this application. I've done ...
1
vote
0answers
224 views

How to efficiently re-order packets in PCAP files based on timestamp?

I have a PCAP file which contains many packets. They are however out of order based on the timestamp (it is actually randomized). What is the best way to efficiently sort the PCAP packets based on ...
2
votes
0answers
1k views

uwsgi and “No module named django.core.wsgi”

On a fairly vanilla FreeBSD system without virtualenv, I'm having trouble getting uwsgi to work with Django. Attempting to run generates this error: Traceback (most recent call last): File "./...
0
votes
0answers
87 views

Trying to get metircs from collectd with python plugin

I am trying to write a python plugin for collectd that will grab selected metrics and send them as json somewhere else. I have seen a few similar projects such the librato plugin here. However when ...
1
vote
0answers
274 views

Docker on freebsd11

I am trying to build a python application on freebsd11 and docker i have installed docker as per https://wiki.freebsd.org/Docker and all seems to work fine. my Dockerfile is like FROM python:2-slim ...
0
votes
0answers
33 views

Uwsgi Fallback Strategies

I'm giving some thought to application redundancy, and I was wondering what the best-practices are for improved reliability using uwsgi fallback features. Specifically, I had two thoughts: 1) We ...
1
vote
0answers
240 views

pyffmpeg installation on Ubuntu fails with Cython related errors

I'm failing in pyffmpeg installation on Ubuntu. Cython installation seems to be correct: $ sudo python setup.py install ... Adding Cython 0.22.1 to easy-install.pth file Installing cython script to /...
0
votes
0answers
19 views

Why does python 3 script not execute via crontab? [duplicate]

There's one little problem with my crontab and python 3 script. Currently I'm on VDS with Ubuntu 14.04 installed. There're 2 scripts that need to be executed via crontab in desired time. The first ...
0
votes
0answers
110 views

Uwsgi “Permission denied” after “Gracefully killing worker”

I run python environment with uwsgi on old centos 6.6 (it necessary for customer). But often i get error 502. log of uwsgi with error: 1) Request to /show/12763 took 0.474370002747 seconds Request ...
0
votes
2answers
178 views

The best approach to deploying a python solution to AWS

I have a Python solution that is deployed to AWS, my current deployment approach feels very archaic. I follow these steps each time I update the service: tar the python files that have changed scp ...
-3
votes
1answer
158 views

Run Python and Php under same server

I am trying to run python on main domain and a wordpress blog in sub-directory. Is it possible to do so? Currently the they are running good in sub-domains i.e http://main-domain.com and blog.main-...
2
votes
1answer
78 views

How can I install libmemcached on Openshift with sasl support?

I need libmemcached with sasl support to use Memcached Cloud cartridge on Openshift Online. I doing next: 1) Install sasl. curl -LO ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz tar --...
0
votes
0answers
46 views

What kind of RAM to choose for data analysis? [closed]

I'm planning to upgrade my computer and also want to buy some new DDR3 RAM modules. Making some research I realized that there are 2 main characteristics of RAMs (beside capacity): frequency and ...
0
votes
0answers
28 views

How to configure NGINX to servce Python file and also Django file?

I have the following NGINX configuration: server { listen 8888; root /var/www; index index.html index.htm; location / { try_files $uri $uri/ /index.html; } } ...
0
votes
0answers
120 views

RHEL 6.6 pip after python upgrade “ImportError: /usr/local/lib/python2.7/lib-dynload/array.so: undefined symbol: PyUnicodeUCS2_FromUnicode”

I originally have python 2.6 and installed 2.7 and want to use pip to install some libraries like futures (with an s :)). Unfortunately, it seems like pip's libraries has been messed up. When type pip ...
0
votes
0answers
78 views

ip command vs qdisc discrepancy in dropped packets

I am simulating packet loss via mininet network on Ubuntu 14.04. Why are there no dropped packets showing up in ip command? For switch s3, I have Qdisc (sudo tc -s qdisc show): qdisc htb 5: dev s3-...
1
vote
1answer
2k 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....
7
votes
1answer
1k views

Are Elastic Beanstalk's environment variables an appropriate place to store secret values?

I have deployed my Django application to Elastic Beanstalk with the intention of using its environment variable configuration interface to store my API keys instead of storing them in my source (as ...
0
votes
1answer
129 views

Send user level messages to syslog

I currently have syslog.conf like so to send INFO logs to /var/log/messages *.info;mail.none;authpriv.none; /var/log/messages; I have an application that uses python libraries LOG_USER facility to ...
0
votes
1answer
657 views

collectd won't recognize my python plugin

I am trying to load a super simple plugin I found online as a starting point, and collectd doesn't seem to recognize my python plugin. My conf file has the appropriate lines: <LoadPlugin python>...
-2
votes
1answer
186 views

How to find out reason of python script stop working in background?

I've bought a VDS server some days ago just to have some Telegram Bots working 24/7. I can't keep shell always open, so I've decided to use this "hack": 1. In Python script add #!/usr/bin/python3.4 ...