简体   繁体   中英

How do you install paramiko on Mac OSX?

I'm having a lot of problems with this one. When I try using easy_install, I get this error:

warning: GMP library not found; Not building Crypto.PublicKey._fastmath.
unable to execute gcc-4.0: No such file or directory
error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1

How do you install paramiko? I get the same error when I try to install PyCrypto.

You need to install Xcode (on the OSX install DVD or online in the AppStore).

It includes the gcc compileer you are apprantly missing. It also includes other stuff like make that you probably need to build it. Maybe homebrew or fink also have gcc and the like included.

If it helps any, I solved this issue with sym links, and I think it will work for you. I wrote this with my version of gcc in mind, which is 4.2:

cd /usr/bin
rm cc gcc c++ g++
ln -s gcc-4.2 cc
ln -s gcc-4.2 gcc
ln -s c++-4.2 c++
ln -s g++-4.2 g++
ln -s gcc-4.2 gcc-4.0

There ya go!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM