What to do if pipreqs results in UnicodeDecodeError

What is pipreqs

A guy who automatically writes requirements.txt when using an external module of python. When it is in the project folder /hoge.py

cd project folder
pipreqs .

The requirements.txt of hoge.py should appear under the project folder,

UnicodeDecodeError: 'cp932' codec can't decode byte 0x81 in position 239: illegal multibyte sequence

I got an error that often appears when I don't know how to encode.

Read the reference. https://pypi.org/project/pipreqs/ There seems to be a --encoding option.

Resolve command

pipreqs --encoding UTF8 .

This is the solution.

requirements.txt


networkx==2.3
plotly==4.4.1
pandas==1.0.3
streamlit==0.60.0

It came out safely, it's over.

Recommended Posts

What to do if pipreqs results in UnicodeDecodeError
What to do if a UnicodeDecodeError occurs in pip
What to do if pip install fails in Xcode 5.1
What to do if yum breaks
What to do if ʻarguments [0] .scrollIntoView ();` fails in python selenium
What to do if pip gives a DistributionError in Homebrew
What to do if you get "coverage unknown" in Coveralls
What to do if a 0xC0000005 error occurs in tf.train.start_queue_runners ()
What to do if you can't log in as root
What to do if you get a minus zero in Python
What to do if you get a UnicodeDecodeError with pip install
What to do if "Unnamed: 0" is added in to_csv-> read_csv in pandas
What to do if you can't use the trash in Lubuntu 18.04.
What to do when UnicodeDecodeError occurs during read_csv in pandas (pd.read_table ())
What to do if there is a decimal in python json .dumps
What to do if you can't find PDO in Laravel or CakePHP
What to do if you can't pipenv shell
What to do if you can't use scikit grid search in Python
Note: What to do if pip install fails
What to do if mod_fcgid cannot resolve UnicodeEncodeError
What to do if rails s doesn't work
What to do if you get lost in file reference with FileNotFoundError
What to do if you get angry in TensorFlow v2 without attribute'app'
What to do if No Python documentation found for ... appears in pydoc
What to do if you can't install with pip in babun environment
What to do if pip cannot be installed
What to do if atom autocomplete-python doesn't work
What to do to get google spreadsheet in python
What to do if Docker-sync suddenly stops working
What to do if "amazon-linux-extras" → "No module named amazon_linux_extras"
[Python] What to do if an error occurs in pip (pyinstaller, pyautogui, etc.)
What to do if you get a "No versions found" error in pipenv
What to do if a Unicode Encode Error occurs in Sublime Text Python
What to do if you get "Python not configured." Using PyDev in Eclipse
What to do if abort is displayed when inputting camera video in OpenCV
What to do if NotADirectoryError: [Errno 20] Not a directory:'xdg-settings' appears in jupyter notebook
What to do if a version error occurs in the selenium Chrome driver
[openpyxl] What to do when IllegalCharacterError appears in pandas.DataFrame.to_excel
What to do if you can't pip install mysqlclient
UnicodeDecodeError: What to do when'shift_jis' codec can't decode byte
No module named What to do if you get'libs.resources'
ModuleNotFoundError: No module What to do if you get'tensorflow.contrib'
What to do if SciPy installation fails on CentOS
What to do if pip install fails to install dependent libraries
What to do if sys / cdefs.h does not exist
What to do if pyenv is not enabled (zsh)
What to do if you get `No kernel for language python found` in Hydrogen
What to do if the print command itself causes an error in Maya python
What to do if you get "(35,'SSL connect error')" in pycurl (one of them)
What to do if you get an error when importing matplotlib in Python (Mac)
What to do if the progress bar is not displayed in tqdm of python
What to do if Python IntelliSense is not displayed in VS Code on Windows
What to do if Sort imports get stuck in VS Code's Python Extension (around 2020/09)
What to do if Python does not switch from the System version in pyenv
What to do if you can't hit the arrow keys in the Python interactive console
What to do if you run python in IntelliJ and end with an error
What to do if the package dependency cannot be repaired
What to do if you are addicted to Windows character code
What to do if you can't sort files with subscripts
What to do if package installation fails when deploying to heroku
What to do when "SSL: CERTIFICATE_VERIFY_FAILED _ssl.c: 1056" appears in Python