Mac OSX : python packages failed to build because of gcc issues

前端 未结 3 589
抹茶落季
抹茶落季 2021-01-24 17:41

I am trying to install MySQL-python package with the following error:

cc1: error: unrecognized command line option \"-arch\"
cc1: error: unrecogni         


        
3条回答
  •  闹比i
    闹比i (楼主)
    2021-01-24 18:13

    Solution 1:

    May be missing installation package of pyton-dev:

    $  yum list | grep python-dev
    $ yum -y install python-dev*     //need root privileges
    

    After the execution, re-installation.

    Solution 2:

    If solution 1 does not resolve the problem, might be "gcc" is not installed or are no longer in the PATH

    $ whereis gcc         //check gcc
    $ echo $PATH        //Check the gcc whether in the PATH
    

    If you do not install the "gcc", execute the following command

    $ yum list | grep gcc
    $ sudo yum install -y gcc.x86_64
    

    After the execution, re-install.

提交回复
热议问题