我刚买了一台带有OSX 10.11 El Capitan
的新MacBook Pro。ImportError:Mac OSX上没有任何名为lxml的模块10.11
我正在运行Google App Engine
本地开发启动python,这是我在日志中看到它时,它到达import lxml
。
"ImportError: No module named lxml"
我跟着从lxml website
sudo pip install lxml
包安装的指示,但不能由路径蟒蛇可以看出。我更新了我的路在.bashrc
和.bash_profile
有:
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/lib/python2.7/site-packages/:$PATH
然后发现这篇文章Installing lxml on Mac OSX (10.11) inside a virtualenv with pip
$ STATIC_DEPS=true pip install lxml
它再次安装,但无法找到。
我甚至尝试从源代码编译和安装macports
,因为它嵌入,但仍然没有运气。
我看了lxml团队感到很沮丧,OSX
和过时的库和所有的混乱。
UPDATE
关于所提出的意见,它不是一个app.yaml的库声明,其不可能的具体到GAE的问题,因为它似乎Python和OXS-elcapitan之间的可能性较大。
也是我得到这个不寻常的消息
The directory '/Users/[username]/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
我尝试使用sudo -H但没有任何解决的路径。
但它确实表明10.11的变化可能是问题的一部分。
您运行'source〜/ .bash_profile'加载更新的路径吗? – Forge
可能重复[ImportError:No Module named simplejson](http://stackoverflow.com/questions/2604841/importerror-no-module-named-simplejson) –
这与appengine有什么关系? –