Installing easy_install… to get to installing lxml

后端 未结 5 1234
难免孤独
难免孤独 2021-02-01 18:42

I\'ve come to grips with the fact that ElementTree isn\'t going to do what I want it to do. I\'ve checked out the documentation for lxml, and it appears that it will serve my pu

5条回答
  •  情话喂你
    2021-02-01 19:00

    First off we don't use easy_install anymore. We use pip. Please use pip instead.

    To get to your particular troubles, as the comments point out, you're missing GCC. On OS X, Xcode Command Line Tools provides GCC, as well as many other programs necessary for building software on OS X. For OS X 10.9 (Mavericks) and newer, either install Xcode through the App Store, or alternatively, install only the Xcode Command Line Tools with

    xcode-select --install
    

    For more details, please see the Apple Developer FAQ or search the web for "install Xcode Command Line Tools".

    For older versions of OS X, you can get Xcode Command Line Tools from the downloads page of the Apple Developer website (free registration required).

    Once you have GCC installed, you may still encounter errors during compilation if the C/C++ library dependencies are not installed on your system. On OS X, the Homebrew project is the easiest way to install and manage such dependencies. Follow the instructions on the Homebrew website to install Homebrew on your system, then issue

    brew update
    brew install libxml2 libxslt
    

    Possibly causing further trouble in your case, you placed the downloaded setuptools in /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/. Please do not download any files to this location. Instead, I suggest you download the file to your home directory, or your usual Downloads directory. After downloading it, you're supposed to run sh setuptools-X.Y.Z.egg, which will then install it properly into the appropriate site-packages and put the executable easy_install on your path.

提交回复
热议问题