pip - Cannot install or use scrapy on OS X -- blocked by proxy (I think) -


so having tough time should easy. @ work have lot of annoying proxies etc. , i'm pretty sure that's involved here. anyhow, when try install scrapy, "connection reset peer" in middle of downloading libxml, 37% of way in:

root@rcmac (~ ): pip install scrapy requirement satisfied (use --upgrade upgrade): scrapy in /library/python/2.7/site-packages/scrapy-0.24.5-py2.7.egg requirement satisfied (use --upgrade upgrade): twisted>=10.0.0 in /system/library/frameworks/python.framework/versions/2.7/extras/lib/python (from scrapy) requirement satisfied (use --upgrade upgrade): w3lib>=1.8.0 in /library/python/2.7/site-packages (from scrapy) collecting queuelib (from scrapy)   using cached queuelib-1.2.2-py2.py3-none-any.whl collecting lxml (from scrapy) /library/python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: insecureplatformwarning: true sslcontext object not available. prevents urllib3 configuring ssl appropriately , may cause ssl connections fail. more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.   insecureplatformwarning   downloading lxml-3.4.2.tar.gz (3.5mb)     37% |############                    | 1.3mb 186kb/s eta 0:00:12  exception:   traceback (most recent call last):     file "/library/python/2.7/site-packages/pip/basecommand.py", line 246, in main       status = self.run(options, args)     file "/library/python/2.7/site-packages/pip/commands/install.py", line 342, in run       requirement_set.prepare_files(finder)     file "/library/python/2.7/site-packages/pip/req/req_set.py", line 345, in prepare_files       functools.partial(self._prepare_file, finder))     file "/library/python/2.7/site-packages/pip/req/req_set.py", line 290, in _walk_req_to_install       more_reqs = handler(req_to_install)     file "/library/python/2.7/site-packages/pip/req/req_set.py", line 487, in _prepare_file       download_dir, do_download, session=self.session,     file "/library/python/2.7/site-packages/pip/download.py", line 827, in unpack_url       session,     file "/library/python/2.7/site-packages/pip/download.py", line 673, in unpack_http_url       from_path, content_type = _download_http_url(link, session, temp_dir)     file "/library/python/2.7/site-packages/pip/download.py", line 888, in _download_http_url       _download_url(resp, link, content_file)     file "/library/python/2.7/site-packages/pip/download.py", line 621, in _download_url       chunk in progress_indicator(resp_read(4096), 4096):     file "/library/python/2.7/site-packages/pip/utils/ui.py", line 133, in iter       x in it:     file "/library/python/2.7/site-packages/pip/download.py", line 586, in resp_read       decode_content=false):     file "/library/python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 273, in stream       data = self.read(amt=amt, decode_content=decode_content)     file "/library/python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 203, in read       data = self._fp.read(amt)     file "/library/python/2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 49, in read       data = self.__fp.read(amt)     file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/httplib.py", line 567, in read       s = self.fp.read(amt)     file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/socket.py", line 380, in read       data = self._sock.recv(left)     file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/ssl.py", line 241, in recv       return self.read(buflen)     file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/ssl.py", line 160, in read       return self._sslobj.read(len)   error: [errno 54] connection reset peer 

i can hands on libxml tarball, don't know how pip past roadblock. have somehow managed scrapy installed blows when try import it:

root@rcmac (~ ): python python 2.7.5 (default, mar  9 2014, 22:15:05)  [gcc 4.2.1 compatible apple llvm 5.0 (clang-500.0.68)] on darwin type "help", "copyright", "credits" or "license" more information. >>> import scrapy traceback (most recent call last):   file "<stdin>", line 1, in <module>   file "/library/python/2.7/site-packages/scrapy-0.24.5-py2.7.egg/scrapy/__init__.py", line 56, in <module>     scrapy.spider import spider   file "/library/python/2.7/site-packages/scrapy-0.24.5-py2.7.egg/scrapy/spider.py", line 7, in <module>     scrapy.http import request   file "/library/python/2.7/site-packages/scrapy-0.24.5-py2.7.egg/scrapy/http/__init__.py", line 11, in <module>     scrapy.http.request.form import formrequest   file "/library/python/2.7/site-packages/scrapy-0.24.5-py2.7.egg/scrapy/http/request/form.py", line 9, in <module>     import lxml.html importerror: no module named lxml.html 

so let's see: guess question is, "help?" :-) thanks.

ok, solved again. sorry. looks proxy server here @ work blocking lxml install pip. reran pip install command scrapy , lxml got installed @ point. after that, error went away.


Popular posts from this blog