ramkan is a library for Romaji/Kana conversion. A memorandum because an error occurred during installation.
ramkan installation
$ pip3 install romkan
Then such an error occurs.
Collecting romkan==0.2.1
Downloading romkan-0.2.1.tar.gz (10 kB)
ERROR: Command errored out with exit status 1:
command: /home/scaruadmin/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8y_m14tz/romkan_f9a5712add8043608044b16dab0fc01c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8y_m14tz/romkan_f9a5712add8043608044b16dab0fc01c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-xw46by6f
cwd: /tmp/pip-install-8y_m14tz/romkan_f9a5712add8043608044b16dab0fc01c/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-8y_m14tz/romkan_f9a5712add8043608044b16dab0fc01c/setup.py", line 12, in <module>
README = open(os.path.join(here, 'README.rst')).read()
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 181: ordinal not in range(128)
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The language setting of python seems to be a problem.
$ sudo vim ~/.bashrc
Add ↓ to the file and save.
export LC_ALL=en_US.UTF-8
restart bash
$source ~/.bashrc
The end
How to deal with UnicodeDecodeError in Python-Introduction to Python
Prerequisite knowledge, etc. Summary of .bash_profile and .bashrc --Qiita Frequently used Vim command summary --Qiita
If you are using Docker, you may want to set the language to docker instead of bash. Docker: I want to set the locale of the container --Qiita
Recommended Posts