I have installed a python library but dreampie won't import it

戏子无情 提交于 2020-01-03 16:54:25

问题


I have installed a python library in python3.3. When I run the interpreter in Dreampie, it can't find my newly-installed library, resulting in an error like:

>>> from bs4 import BeautifulSoup
Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    from bs4 import BeautifulSoup
ImportError: No module named 'bs4'

回答1:


This is a dreampie 1.2.1 bug. To work around it, under Edit | Preferences | Shell, add the following line to the automatically-run code in the black box:

import site
site.addsitedir(r'C:\Python33\lib\site-packages')


来源:https://stackoverflow.com/questions/16560723/i-have-installed-a-python-library-but-dreampie-wont-import-it

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!