All posts tagged: virtualenv

Linux: MySQLdb on virtualenv with –no-site-packages

comment 1
Howtos / Python / System Administration

In the past it was difficult to get MySQL working on virtualenv without using system packages. Now you can have a real separated environment with simple steps: Follow this guide to install virtualenv using this command: This command will install a new virtualenv inside a new directory myproject created by the command itself. Activate virtualenv: Upgrade setuptools You can now install MySQLdb, inside the package MySQL-python: Now do a simple test trying to connect to […]

Python: MySQLdb on Windows virtualenv (w. figures)

comment 1
Howtos / Python

If you have a virtualenv on Windows and you want to add MySQLdb support via mysql-python, read this before spending hours of your life to figure why it doesn’t and it will never work. 1) Install MySQL for Python selecting the same Python version of the virtualenv 2) From site-packages directory above, copy the selected files: 3) (optional) On PyCharm, look for virtualenv site-packages inside the path marked with the arrow: 4) Open your virtualenv […]