If the program mysql_config is installed on your box, it may be installed in a directory that is not on your path. If you can find it on your box (try the locate and find commands), you can add the directory to your PATH by hand before running pip (or easy_install). It only needs to be there for the runnings of pip that instiall or update MySQL-python so you don't need to add the directory permanently. (An alternative is a symbolic link to it in some directory that is on your path, such as maybe /usr/local/bin - though this is slightly less certain to work, depending on how clever mysql_config is - I don't use MySQL, so I don't know for sure.)
On Wed, Oct 16, 2013 at 12:10 PM, Jimmy Pants <jpaska...@gmail.com> wrote: > I'm trying to do the "Writing Your first Django App" tutorial, and Django > can't see MySQL-python, though it is installed globally. > > I'm not sure if this is a virtualenv problem or what. > > > > Outside of virtualenv: > > jimmy@lilly ~/mysite $ sudo pip install MySQL-python > [sudo] password for jimmy: > Requirement already satisfied (use --upgrade to upgrade): MySQL-python in > /usr/lib/python2.7/dist-packages > Cleaning up... > > *In* my Django virtualenv: > > (DJANGO)jimmy@lilly ~/mysite $ pip install MySQL-python > Downloading/unpacking MySQL-python > Downloading MySQL-python-1.2.4.zip (113kB): 113kB downloaded > Running setup.py egg_info for package MySQL-python > Downloading > http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz > Extracting in /tmp/tmpLPLYIS > Now working in /tmp/tmpLPLYIS/distribute-0.6.28 > Building a Distribute egg in > /home/jimmy/.virtualenvs/DJANGO/build/MySQL-python > > /home/jimmy/.virtualenvs/DJANGO/build/MySQL-python/distribute-0.6.28-py2.7.egg > sh: 1: mysql_config: not found > Traceback (most recent call last): > File "<string>", line 16, in <module> > File "/home/jimmy/.virtualenvs/DJANGO/build/MySQL-python/setup.py", > line 18, in <module> > metadata, options = get_config() > File "setup_posix.py", line 43, in get_config > libs = mysql_config("libs_r") > File "setup_posix.py", line 25, in mysql_config > raise EnvironmentError("%s not found" % (mysql_config.path,)) > EnvironmentError: mysql_config not found > Complete output from command python setup.py egg_info: > Downloading > http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz > > Extracting in /tmp/tmpLPLYIS > > Now working in /tmp/tmpLPLYIS/distribute-0.6.28 > > Building a Distribute egg in > /home/jimmy/.virtualenvs/DJANGO/build/MySQL-python > > > /home/jimmy/.virtualenvs/DJANGO/build/MySQL-python/distribute-0.6.28-py2.7.egg > > sh: 1: mysql_config: not found > > Traceback (most recent call last): > > File "<string>", line 16, in <module> > > File "/home/jimmy/.virtualenvs/DJANGO/build/MySQL-python/setup.py", line > 18, in <module> > > metadata, options = get_config() > > File "setup_posix.py", line 43, in get_config > > libs = mysql_config("libs_r") > > File "setup_posix.py", line 25, in mysql_config > > raise EnvironmentError("%s not found" % (mysql_config.path,)) > > EnvironmentError: mysql_config not found > > ---------------------------------------- > Cleaning up... > Command python setup.py egg_info failed with error code 1 in > /home/jimmy/.virtualenvs/DJANGO/build/MySQL-python > Storing complete log in /home/jimmy/.pip/pip.log > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/2679ff82-df1c-403a-89f1-f6e1f62f6a84%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAB%2BAj0sNUEyG5cMig_ewzKoNnADJFNjzy3ogwi1Cm9rXMOkSNg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.