Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8830505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:06:28+00:00 2026-06-14T08:06:28+00:00

I’m following this tutorial to get started with Django, but I’m very confused about

  • 0

I’m following this tutorial to get started with Django, but I’m very confused about how to integrate MySQL. Doing this in the context of virtualenv (which is new to me) seems to complicate things even further.

I’m running on Ubuntu and the MySQL server is on another host. Here are my specific questions:

  1. What packages do I need to install and in what order?
  2. Which packages should be installed while virtualenv is activated?
  3. How do I know whether to use pip, easy_install, or apt-get install?
  4. If I run any of the commands above while the virtualenv is activated, are they only installed in the virtualenv?
  5. I seem to run into problems when I try to issue the above commands with sudo. I’ve avoided this issue by logging in as root. Is this to be expected?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:06:29+00:00Added an answer on June 14, 2026 at 8:06 am
    1. You need to install the system library. This is global and does not happen inside a virtualenv. If you have aptitude it is as easy as sudo apt-get install python-mysqldb
      this alos needs libmysqlclient (libmysqlclient18 - MySQL database client library) too.

    2. after installing libmysqlclient and python-mysql using aptitude you can activate your virutualenv and install python-mysql package pip install MySQL-python. This will make MySQLdb avaialable within your virtualenv

    3. Mysql is a tricky package because it requires the mysql client libraries, which must be installed on your system. the vast majority of python packages will be available on pip or through github (which you can easily install through pip) and will not require extra system packages.

    4. if you pip install something while your virtualenv is active it will install it only into your virtual env.

    5. You will probably need to run sudo to install system wide packages using aptitude. Please don’t log in as root, you can grant your user sudo access

    THe good news is mysql is pretty much as difficult as it gets. Almost all other python packages are as simples as activating your environment, and pip install <pacakge_name>

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.