WebFaction
Community site: login faq

Hi, I am a complete newbie so please bear with me. I'm trying to install a bottle application using MySQLdb.

When I run python from the command line, I can import the MySQLdb library, and everything works fine. However, from my bottle application, i get an error saying "ImportError: No module named MySQLdb"

Am I missing something?

Thanks!

asked 09 Jul '13, 12:17

silverline
11
accept rate: 0%


On our servers the default version of 'python' is 2.4 on CentOS 5 and 2.6 on CentOS 6, where as most mod_Wsgi and other installers use 2.7 or another version. This might be the issue, but it is difficult to say based on the info you provided alone.

Can you provide more info about how you built the application? Including the commands you ran?

You may also want to submit a support ticket so we can look directly.

permanent link

answered 09 Jul '13, 16:57

johns
5.4k412
accept rate: 23%

edited 09 Jul '13, 17:10

Thanks. It seems you are right - i was running python2.4 from command line, but the web app uses 3.1. Is there an easy way to change it to use python 2.7?

Thanks

(10 Jul '13, 08:51) silverline

There's a 3to2 package that might help.

(10 Jul '13, 12:53) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×9
×5

question asked: 09 Jul '13, 12:17

question was seen: 2,298 times

last updated: 10 Jul '13, 12:53

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2021 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM