ubuntu-12.04

'HTTP Error 400: Bad Request' with Python Bottlenose

'HTTP Error 400: Bad Request' with Python Bottlenose Question: I have the following file (associate.py) import bottlenose from bs4 import BeautifulSoup from urllib2 import HTTPError ;; My real keys are here in reality, I just replaced them ;; with the following because they are private. credentials = {‘access-key’ : ‘MY_ACCESS_KEY_GOES_HERE’, ‘secret-key’ : ‘MY_SECRET_KEY_GOES_HERE’, ‘associate-tag’ : …

Total answers: 1

ImportError: No module named datetime

ImportError: No module named datetime Question: When I upgrade my Ubuntu into 14.04 from 12.04, this time I get this error: ImportError: No module named datetime Asked By: akbsmile || Source Answers: I tried to re-install it by these steps. 1. remove the old version of venv 2. virtualenv venv 3. .venv/activate/bin 4. pip install …

Total answers: 11

Python OpenCV – waitKey(0) does not respond?

Python OpenCV – waitKey(0) does not respond? Question: I’m using opencv 2.4.7 on ubuntu 12.04. I’m programming with python and I have a problem when i run this script: import cv2 img = cv2.imread(‘347620923614738322_233985812.jpg’) cv2.namedWindow(“window”) cv2.imshow(“window”, img) cv2.waitKey(0) The problem is that the script doesn’t stop when I close the image. I searched information about …

Total answers: 13

How do I know python path on linux ubuntu?

How do I know python path on linux ubuntu? Question: In ubuntu linux if we want to set up python path we do something like this: export PYTHONPATH=/etc … Now, how I would know what the current path I have? Asked By: Mero || Source Answers: First, I hope you don’t really set PYTHONPATH=/etc, /etc …

Total answers: 4

trying to install pymssql on ubuntu 12.04 using pip

trying to install pymssql on ubuntu 12.04 using pip Question: I am trying to install pymssql on ubuntu 12.04 using pip. This is the error I am getting. Any help would be greatly appreciated as I am completely lost! Tried googling this but unfortunately to no avail… Downloading pymssql-2.0.0b1-dev-20130403.tar.gz (2.8Mb): 2.8Mb downloaded Running setup.py egg_info …

Total answers: 4

Python.h missing from Ubuntu 12.04

Python.h missing from Ubuntu 12.04 Question: I installed an openflow controller on my Ubuntu 12.04 called RYU using: sudo pip install ryu I was trying to run a python file using ryu-manager as shown below. sudo ryu-manager simple_switch.py Traceback (most recent call last): File "/usr/local/bin/ryu-manager", line 19, in <module> import gevent ImportError: No module named …

Total answers: 4

python error: no module named pylab

python error: no module named pylab Question: I am new to Python and want to use its plot functionality to create graphs. I am using ubuntu 12.04. I followed the Python installation steps from http://eli.thegreenplace.net/2011/10/10/installing-python-2-7-on-ubuntu/ but when I do from pylab import * I am getting this error >>> from pylab import * Traceback (most …

Total answers: 7

How to install python3 version of package via pip on Ubuntu?

How to install python3 version of package via pip on Ubuntu? Question: I have both python2.7 and python3.2 installed in Ubuntu 12.04. The symbolic link python links to python2.7. When I type: sudo pip install package-name It will default install python2 version of package-name. Some package supports both python2 and python3. How to install python3 …

Total answers: 18