简体   繁体   中英

ImportError while installing lxml on OS X 10.6

I am trying to install lxml on OS X 10.6 using Python 2.7a3. However I am receiving an error during the install setup: ImportError: cannot import name _config_vars

I have put the terminal output here .

Thanks.

If you've had a 10.7 , I'd ask "have you latest X-Code installed?", because I got no errors just now.
But instead I will ask: did you try/consider easy_install or pip install ?

You're using an alpha release of Python 2.7.0, an alpha release for which setuptools , which is used by lxml's setup.py , doesn't work. Setuptools relies on an implementation detail of distutils.sysconfig (the _config_vars attribute) that was changed in the early Python 2.7 alpha releases, and reverted later in the release process (to un-break setuptools, in all likelyhood.)

It's a good idea to install alpha releases to test if your own software works in the newer Python version, but you should not keep using them after newer versions are released, and certainly not after the final release has been made. In this case, two more patchreleases were made later; you should really install those instead.

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