0

How can i install ACtive python in virtual env.

I have this problem as in this post answer https://stackoverflow.com/a/7458717/1958218

Now that was solved by using active python on centos itself. But for django , i am using virtualenv and i get same problem there. But problem is i dont have active python there.

I tried activating virtual env and then use this command /opt/ActivePython-2.6/bin/pypm install mysql-python but same error

i want to use something like

/virtualenv/bin/ActivePython-2.6/bin/pypm install mysql-python
Community
  • 1
  • 1
user1958218
  • 1,571
  • 3
  • 18
  • 28
  • why don't use the regular python that comes with centos ? – silviud Jul 03 '13 at 01:16
  • @silviud because it fetches mysql-python 1.2.3 , which does not work for mysql >5.1. but active python gets the latest version. It is working because i tested it. But i don't know how to use that in virtualenv python – user1958218 Jul 03 '13 at 01:25
  • when you set the virtualenv you can tell it where is the binary located - see -p. – silviud Jul 03 '13 at 01:47

1 Answers1

0

You can tell to virtualenv where is your python interpreter

Usage: virtualenv [OPTIONS] DEST_DIR

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -v, --verbose         Increase verbosity
  -q, --quiet           Decrease verbosity
  -p PYTHON_EXE, --python=PYTHON_EXE
                        The Python interpreter to use, e.g.,
                        --python=python2.5 will use the python2.5 interpreter
                        to create the new environment.  The default is the
                        interpreter that virtualenv was installed with
silviud
  • 1,015
  • 1
  • 12
  • 21