【发布时间】:2019-10-24 02:02:34
【问题描述】:
我尝试导入 BeautifulSoup,但它确实告诉我找不到该模块。我使用 Python 3.7.3 和 Atom 编辑器
但是已经安装了
Requirement already satisfied: BeautifulSoup in C:users\ich\anaconda\lib\site-packages (4,7,1)
Requirement already satisfied: BeautifulSoup in C:users\ich\anaconda\lib\site-packages (from BeautifulSoup4) (1.8)
由于我对编程完全陌生,我不知道如何解决它。设置环境变量?或者将 .atom 文件放入 my_env ?如何激活已安装的软件包(当 import ... 不起作用时?)
我应该把路径 C:users\ich\anaconda\lib\site-packages (4,7,1) 放到 .atom 文件中吗?
【问题讨论】:
-
在cmd中运行
py -0 -
找不到命令“py”
-
python -m pip install bs4 -
所以它说它成功构建了bs4。但是,当我尝试在 atom 中运行它时,它仍然说“找不到模块”。
中的文件 C:\Program Files\.atom\Neuer Ordner\test2.py from bs4 import beautifulSoup - 没有名为 的模块bs4 -
你有anaconda和python吗?重新打开 Atom 编辑器
标签: python python-3.x beautifulsoup path anaconda