I'm new to Python. I was able to use it with an error of the `` `pip install``` command when building the Python development environment, so Make a note of the solution.
--When I listed the libraries I wanted to install in a text file and tried to pip install in the local environment (see link (1) below), the following error was output while installing the library called wordcloud.
C:\Python\Python38 >> pip install -r requirements.txt
>>
(Omission)
ERROR: Command errored out with exit status 1:
(Omission)
ERROR: Command errored out with exit status 1: 'c:\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize;
sys.argv[0] = '"'"'C:\\Users\\I\\AppData\\Local\\Temp\\pip-install-dm1mwd6_\\wordcloud\\setup.py'"'"';
__file__='"'"'C:\\Users\\I\\AppData\\Local\\Temp\\pip-install-dm1mwd6_\\wordcloud\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"',
open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\I\AppData\Local\Temp\pip-record-20xrbjk9\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
--Even if I try pip install wordcloud
, the same error message is spit out and the situation does not change.
――I didn't understand the error text well, so I investigated that there were people who were in trouble as well, and found it (see link (2) below).
--Download the wheel file (.whl) of the library that could not be installed from link 3 below.
--It seems that it is the extension of the file used when the Python library is distributed (confirmation required)
--Example: wordcloud-1.6.0-cp38-cp38-win_amd64.whl
--Move to the folder that manages Python
-(In my case, it was C: \ Python \ Python38)
--In that folder, run pip install hogehoge.whl
to install
-(In my case this time, I commented out the wordcloud part described in the text file and executed `` `pip install -r requirements.txt``` again to complete.)
-(1) [windows10] Install Python 3.7 and put the package with pip through path
Recommended Posts