前提・実現したいこと
ubuntu環境でnltkのモジュールを使ったpythonコードを実行しようとしています。
発生している問題・エラーメッセージ
以下のエラーが表示され、いろいろ試しましたが、インストールされているのに使用できずに困っています。
%python3 sample.py Traceback (most recent call last): File "sample.py", line 4, in <module> from nltk import data ImportError: No module named 'nltk'
試したこと
% pip3 install nltk Requirement already satisfied: nltk in /usr/local/lib/python3.6/dist-packages (3.3) Requirement already satisfied: six in /usr/lib/python3/dist-packages (from nltk) (1.10.0) % python3 Python 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import nltk Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'nltk' >>>
補足情報(FW/ツールのバージョンなど)
ubuntu VERSION="16.04.4 LTS (Xenial Xerus)"
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/09/10 14:09
退会済みユーザー
2018/09/10 14:10
2018/09/10 14:17
退会済みユーザー
2018/09/13 07:19
2018/09/13 07:23