python3へscrapyをインストールする際のエラー解決方法
初質問です。
python3へscrapyをインストールする際、以下のエラーが出ました。
Running setup.py install for pycparser ... error
Exception:
Traceback (most recent call last):
File "c:\program files\python36\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 81: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\program files\python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\program files\python36\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\program files\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\program files\python36\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "c:\program files\python36\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\program files\python36\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 81: invalid start byte
※インストール開始から終了までのログは文末をご覧ください。
デコードができるようにするためにはなにをすればいいのか、
お手数ですが、ご教授いただければ幸いです。
よろしくお願いいたします。
環境は以下の通りです。
OS:Windows 10 Home
システムの種類:64-bit
Python:3.6.0
Anaconda:4.3.0 (64-bit)
また、インストールしたり、.pyを実行したりする際は、MINGW64を使用しています。
以下は、scrapyのインストール開始から終了までのログです。
$ pip3 install scrapy
Collecting scrapy
Using cached Scrapy-1.5.0-py2.py3-none-any.whl
Collecting pyOpenSSL (from scrapy)
Using cached pyOpenSSL-17.5.0-py2.py3-none-any.whl
Collecting parsel>=1.1 (from scrapy)
Using cached parsel-1.4.0-py2.py3-none-any.whl
Collecting PyDispatcher>=2.0.5 (from scrapy)
Requirement already satisfied: six>=1.5.2 in c:\program files\python36\lib\site-packages (from scrapy)
Collecting cssselect>=0.9 (from scrapy)
Using cached cssselect-1.0.3-py2.py3-none-any.whl
Collecting lxml (from scrapy)
Using cached lxml-4.1.1-cp36-cp36m-win_amd64.whl
Collecting queuelib (from scrapy)
Using cached queuelib-1.4.2-py2.py3-none-any.whl
Collecting w3lib>=1.17.0 (from scrapy)
Using cached w3lib-1.19.0-py2.py3-none-any.whl
Collecting Twisted>=13.1.0 (from scrapy)
Using cached Twisted-17.9.0.tar.bz2
Collecting service-identity (from scrapy)
Using cached service_identity-17.0.0-py2.py3-none-any.whl
Collecting cryptography>=2.1.4 (from pyOpenSSL->scrapy)
Using cached cryptography-2.1.4-cp36-cp36m-win_amd64.whl
Collecting zope.interface>=4.0.2 (from Twisted>=13.1.0->scrapy)
Using cached zope.interface-4.4.3-cp36-cp36m-win_amd64.whl
Collecting constantly>=15.1 (from Twisted>=13.1.0->scrapy)
Using cached constantly-15.1.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from Twisted>=13.1.0->scrapy)
Using cached incremental-17.5.0-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from Twisted>=13.1.0->scrapy)
Using cached Automat-0.6.0-py2.py3-none-any.whl
Collecting hyperlink>=17.1.1 (from Twisted>=13.1.0->scrapy)
Using cached hyperlink-17.3.1-py2.py3-none-any.whl
Collecting attrs (from service-identity->scrapy)
Using cached attrs-17.4.0-py2.py3-none-any.whl
Collecting pyasn1-modules (from service-identity->scrapy)
Using cached pyasn1_modules-0.2.1-py2.py3-none-any.whl
Collecting pyasn1 (from service-identity->scrapy)
Using cached pyasn1-0.4.2-py2.py3-none-any.whl
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography>=2.1.4->pyOpenSSL->scrapy)
Using cached cffi-1.11.4-cp36-cp36m-win_amd64.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=2.1.4->pyOpenSSL->scrapy)
Using cached asn1crypto-0.24.0-py2.py3-none-any.whl
Requirement already satisfied: idna>=2.1 in c:\program files\python36\lib\site-packages (from cryptography>=2.1.4->pyOpenSSL->scrapy)
Requirement already satisfied: setuptools in c:\program files\python36\lib\site-packages (from zope.interface>=4.0.2->Twisted>=13.1.0->scrapy)
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=2.1.4->pyOpenSSL->scrapy)
Using cached pycparser-2.18.tar.gz
Installing collected packages: pycparser, cffi, asn1crypto, cryptography, pyOpenSSL, cssselect, lxml, w3lib, parsel, PyDispatcher, queuelib, zope.interface, constantly, incremental, attrs, Automat, hyperlink, Twisted, pyasn1, pyasn1-modules, service-identity, scrapy
Running setup.py install for pycparser ... error
Exception:
Traceback (most recent call last):
File "c:\program files\python36\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 81: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\program files\python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\program files\python36\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\program files\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\program files\python36\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "c:\program files\python36\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\program files\python36\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 81: invalid start byte