在Windows 10上使用conda在python3上安装bs4的问题

时间:2017-08-05 23:21:00

标签: python beautifulsoup pip windows-10 conda

如果有人之前遇到此问题并遇到解决方案,请分享。如果我试试

import bs4

我明白了:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'bs4'

如果我尝试导入beautifulsoup4的任何变体(大写,没有数字等),我会收到此错误。但是,如果我检查模块已安装:

conda list beautifulsoup4
PS C:\WINDOWS\system32> conda list beautifulsoup4
# packages in environment at C:\Anaconda3:
#
beautifulsoup4            4.6.0                     <pip>

我已尝试删除软件包并使用conda或pip重新安装,但始终会出现相同的结果。如果我检查安装的位置,似乎安装了相应的包并在正确的地方解压缩:

C:\Anaconda3\pkgs\beautifulsoup4-4.6.0-py34_0\Lib\site-packages\bs4

我已尝试在目录中运行测试程序,并返回上述错误。 &#39;没有bs4&#39;,我尝试在shell中键入help(&#39; modules&#39;)但是没有一个beautifulsoup模块的迹象,这是意外的,因为conda列表说它已安装。

我在使用conda安装其他软件包时没有任何问题,并且无法看到任何明显的解决方案。任何帮助都会很棒?

0 个答案:

没有答案