UnicodeEncodeError: ‘ASCII’ Codec can’t encode characters in position 0-2: ordinal not in range(128
Solution:
(1) set the environment variable LANG
, modify ~/.profile file, and execute:
export LANG=“en_US.UTF-8” >> ~/.profile
source ~/.bash_profile
(2) Add UTF-8 to the Python execution command, execute:
export PYTHONIOENCODING=utf-8 >> ~/.bashrc
source ~/.bashrc
Transfer: https://www.cnblogs.com/beile/p/12980149.html
Read More:
- source, ~/.bashrc, ~/.bash_ Profile details
- The Linux terminal appears bash: setup.bash : no such file or directory, and. Bashrc file
- Command not found: ADB appears on Mac
- Installation and use of graphviz under mac
- bash: /opt/ros/kinetic/ setup.bash : there is no file or directory
- How to install cuda10.01in Ubuntu18.04
- How to set JAVA_HOME on mac
- Boot / etc/ rc.local What about invalidity? resolvent
- Under Linux, git cannot be used, prompt sign_and_send_pubkey: signing failed: agent refused operation
- [Linux] curl: (7) failed to connect to 127.0.0.1 port 1086: connection reused solution
- Datagrip import & export table structure and data
- Cocoapods- ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension.
- unable to read askpass response from ‘/usr/libexec/openssh/gnome-ssh-askpass
- Problems encountered after Maven installation or upgrade: could not find or load main class org.codehaus.plexus .class…..
- Mac command not found solution
- When installing ROS: bash / opt / ROS / kinetic/ setup.bash : there is no file or directory
- Git bash Error: Could not fork child process: There are no available terminals (-1)
- The solution of push D command execution error (/ bin / sh: 1: push D: not found) on Ubuntu
- Error in PIP command execution – syntax error: invalid syntax