I download a piece of work data from the Aozora Bunko and use Janome to make a program that gets parts of speech, but I get an error when I install janome. What should I do?Applicable source code
import urllib.request from janome.analyzer import Analyzer from janome.charfilter import * from janome.tokenizer import Tokenizer class MainTextCharFilter (CharFilter): def __init __ (self, start, end): self.start = start self.end = end def apply (self, text): return text.split (self.start)  .split (self.end)  # Natsume Soseki # I'm a cat html = '' with urllib.request.urlopen (url) as response: html = response.read (). decode ('shift_jis') char_filters = [UnicodeNormalizeCharFilter (), MainTextCharFilter ('<div>', '<div>'), RegexReplaceCharFilter ('<rp>\ (. *? \)</rp>', ''), RegexReplaceCharFilter ('<. *?>', '')] tokenizer = Tokenizer () analyzer = Analyzer (char_filters, tokenizer) for token in analyzer.analyze (html): print (token)
janome installation screen (Anaconda prompt) Add a response Result of entering pip show janome Result of entering import sys;print (sys.prefix)
Traceback (most recent call last): File "directory name", line 3, in<module> from janome.analyzer import Analyzer ModuleNotFoundError: No module named 'janome'
Answer # 1
At the Anaconda prompt
Confirm the installation destination as
pip show janome
On python code
import sys;print (sys.prefix)
to check the installation destination of the interpreter that is running.
If you don't have janome installed in the latter directory, something may be wrong.
If it is difficult to judge, please tell us the results.
- error when running python setuppy install
- python - i get an error when i type pip3 install scikit-learn
- about python pip install error
- i tried to install python 390 on my mac with pyenv, but i get an error and can't install it
- python - i got an import error even though i did pip install
- python - in raspberry pi, the error occurs only in the case of the automatic start program using systemd
- indent error doesn't go away, python
- python - an error occurs in the if statement program that compares the size of numbers
- python - sklearn, svm error
- python - error in image binarization using cv2adaptivethreshold function
- python - categorical_crossentoropy error does not resolve
- eliminating pandas install and import in python pyenv export ldflags
- error in import xlrd of python file from cakephp
- readcsv error in python
- python - i want to display an image with pysimplegui, but an error occurs
- python - error when scraping with selenium and firefox
- [python] graphviz output format error
- python - i get an error when connecting to a voice channel with discordpy
- python 3x - best estimator: i get an error with no syntax, so please tell me what to do
- [python] i don't know how to solve the error