开发者

pip install error on Mac OS X and Mamp Pro

I'm having trouble installing pip as it can't find my mysql_config file. I'm on a Mac I'm using Mamp Pro the config file is located here in Mamp: /Users/james/Applications/MAMP/tmp/mysql/my_cnf

I've changed the site.cfg file to point to this:

mysql_config = /Users/james/Applications/MAMP/tmp/mysql/my_cnf

Which didn't work. I've placed the mysql_config on my path via:

PATH=$PATH:/Users/james/Applications/MAMP/tmp/mysql/my_cnf
export PATH

The error I'm getting is:

Command python setup.py egg_info failed with error code 1
Storing complete log in /Users/james/.pip/pip.log
(thecarbonlist)JamesApps:thecarbonlist james$ sudo pip install django mysql-python
Downloading/unpacking django
Running setup.py egg_info for package django
Downloading/unpacking mysql-python
Running setup.py egg_info for package mysql-python
sh: mysql_config: command not found
Traceback (most recent call last):
  File "<string>", line 14, in <module>
  File "/Users/james/Projects/current/code/project/build/mysql-python/setup.py", line 15, 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 24, 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:
sh: mysql_config: command not found

Traceback (most recent call last):

File "<string>", line 14, in <module>

File "/Users/james/Projects/current/code/project/build/mysql-python/setup.py", line 15, 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 24, in mysql_config

raise EnvironmentError开发者_运维问答("%s not found" % (mysql_config.path,))

EnvironmentError: mysql_config not found

What am I doing wrong? I would like to carry on using Mamp Pro, does anyone know how to fix this as I'm out of ideas!?!?


Since you are running install command with sudo you are using the elevated accounts path, that may not include mysql_config.

Try this:

james$ which mysql_config
james$ sudo which mysql_config

and make sure both return the same path to mysql_config.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜