スクレイピングをしようと思い、モジュールをインストールしたのですが、
エラーが発生しました。
モジュールのインストール 以下
$sudo pip3 install beautifulsoup4 Looking in indexes: https://~ beautifulsoup4 Using cached https://~ Installing collected packages: beautifulsoup4 Successfully installed beautifulsoup4-4.6.1
###「テキスト.py」 に以下を保存
import urllib.request
from bs4 import BeautifulSoup
### モジュールを使用した際のエラー ``` $python3.6 テキスト.py Traceback (most recent call last): File "テキスト.py", line 2, in <module> from bs4 import BeautifulSoup ModuleNotFoundError: No module named 'bs4' ``` ### 試したこと python3.5に入っていたbeautifulsoup、bs4ファイルをpython3.6に移す。 beautifulsoupをsudo pip3 uninstall beautifulsoup4で削除して、再インストール。 ###環境 python2.7, 3.5, 3.6.5を入れています。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/07/31 04:21