简体   繁体   English

Python3.6 Mac OS中的ModuleNotFoundError

[英]ModuleNotFoundError in Python3.6 Mac OS

I'm getting the ModuleNotFoundError: No module named 'lxml' while trying run a python script in Mac os. 我在尝试在Mac OS中运行python脚本时遇到ModuleNotFoundError:没有名为“ lxml”的模块。

I've installed python in /usr/local/bin. 我已经在/ usr / local / bin中安装了python。 All the libraries are also successfully installed. 所有库也都已成功安装。

I tried setting the PATH to include the location where the libraries are installed, but it didn't help. 我尝试将PATH设置为包括库的安装位置,但这没有帮助。 Please advise. 请指教。

通过在OS X中设置PYTHONPATH变量可以解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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