Note that there are some explanatory texts on larger screens.

plurals
  1. POimport lxml fails on OSX after (seemingly) successful install
    primarykey
    data
    text
    <p>I'm trying to install lxml for python on OS X 10.6.8</p> <p>I ran <code>sudo env ARCHFLAGS="-arch i386 -arch x86_64" easy_install lxml</code> in the terminal based on this answer to a question installing lxml: <a href="https://stackoverflow.com/a/6545556/216336">https://stackoverflow.com/a/6545556/216336</a></p> <p>This was the output of that command:</p> <pre><code>MYCOMPUTER:~ MYUSERNAME$ sudo env ARCHFLAGS="-arch i386 -arch x86_64" easy_install lxml Password: Searching for lxml Reading http://pypi.python.org/simple/lxml/ Reading http://codespeak.net/lxml Best match: lxml 2.3.3 Downloading http://lxml.de/files/lxml-2.3.3.tgz Processing lxml-2.3.3.tgz Running lxml-2.3.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ytPLAc/lxml-2.3.3/egg-dist-tmp-NgYLdF Building lxml version 2.3.3. Building without Cython. Using build configuration of libxslt 1.1.24 Adding lxml 2.3.3 to easy-install.pth file Installed /Library/Python/2.6/site-packages/lxml-2.3.3-py2.6-macosx-10.6-universal.egg Processing dependencies for lxml Finished processing dependencies for lxml </code></pre> <p>Which looked successful to me, but I get an import error when I try to import lxml in python...</p> <pre><code>Last login: Sat Mar 24 15:26:04 on ttys000 MYCOMPUTER:~ MYUSERNAME$ python2.7 Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; import lxml Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; ImportError: No module named lxml </code></pre> <p>The fact that I it appears to have installed to 2.6 and I'm running 2.7 seems to be a clue, but I don't know what to do with that.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload