heykelh33 / Radix-Django-Angularjs

Radix - Real-Time Enviromental Monitoring (Django, MySQL, Channels, Angularjs)
0 stars 0 forks source link

Problem Installing asgi_redis in RPib+ #2

Open heykelh33 opened 6 years ago

heykelh33 commented 6 years ago

Issue while installing asgi_redis packages in RPiB+. Solved but not tested. I explain how I did it. I hadn't this issue in Ubuntu 14.04

(django-snapdots) pi@raspberrypi ~/Django_projects/django-snapdots $ pip install --timeout 1000 --proxy http://username:key@proxy_IP:port/ asgi_redis

Collecting asgi_redis /home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning. SNIMissingWarning /home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning Downloading asgi_redis-1.4.3-py2.py3-none-any.whl Collecting redis~=2.10.6 (from asgi_redis) Downloading redis-2.10.6-py2.py3-none-any.whl (64kB) 100% |████████████████████████████████| 71kB 21kB/s Collecting msgpack-python (from asgi_redis) Downloading msgpack-python-0.4.8.tar.gz (113kB) 63% |████████████████████▏ | 71kB 32kB/s eta 0:00:02Exception: Traceback (most recent call last): File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/commands/install.py", line 335, in run wb.build(autobuilding=True) File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/wheel.py", line 749, in build self.requirement_set.prepare_files(self.finder) File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/req/req_set.py", line 620, in _prepare_file session=self.session, hashes=hashes) File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/download.py", line 821, in unpack_url hashes=hashes File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/download.py", line 659, in unpack_http_url hashes) File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/download.py", line 882, in _download_http_url _download_url(resp, link, content_file, hashes) File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/download.py", line 603, in _download_url hashes.check_against_chunks(downloaded_chunks) File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/utils/hashes.py", line 46, in check_against_chunks for chunk in chunks: File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/download.py", line 571, in written_chunks for chunk in chunks: File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/utils/ui.py", line 139, in iter for x in it: File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/download.py", line 560, in resp_read decode_content=False): File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 357, in stream data = self.read(amt=amt, decode_content=decode_content) File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 314, in read data = self._fp.read(amt) File "/home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 60, in read data = self.__fp.read(amt) File "/usr/lib/python2.7/httplib.py", line 562, in read s = self.fp.read(amt) File "/usr/lib/python2.7/socket.py", line 380, in read data = self._sock.recv(left) File "/usr/lib/python2.7/ssl.py", line 241, in recv return self.read(buflen) File "/usr/lib/python2.7/ssl.py", line 160, in read return self._sslobj.read(len) SSLError: [Errno 1] _ssl.c:1415: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac /home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning

SOLUTION (NOT TESTED)

  1. download msgpack-python-0.4.8.tar.gz from https://pypi.python.org/pypi/msgpack-python

  2. Install msgpack-python-0.4.8.tar.gz with Pip

    (django-snapdots) pi@raspberrypi ~ $ cd packages/
    (django-snapdots) pi@raspberrypi ~/packages $ pip install msgpack-python-0.4.8.tar.gz

Processing ./msgpack-python-0.4.8.tar.gz Building wheels for collected packages: msgpack-python Running setup.py bdist_wheel for msgpack-python ... done Stored in directory: /home/pi/.cache/pip/wheels/ff/bd/00/3a928ad2e6fd3dcd7252ddfbff11cd6af8d20af8e7d880ac72 Successfully built msgpack-python Installing collected packages: msgpack-python Successfully installed msgpack-python-0.4.8

  1. Install asgi_redis (again) (django-snapdots) pi@raspberrypi ~/Django_projects/django-snapdots $ pip install --timeout 1000 --proxy http://username:key@proxy_IP:port/ asgi_redis

Collecting asgi_redis /home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning. SNIMissingWarning /home/pi/Django_projects/django-snapdots/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning Using cached asgi_redis-1.4.3-py2.py3-none-any.whl Collecting redis~=2.10.6 (from asgi_redis) Using cached redis-2.10.6-py2.py3-none-any.whl Requirement already satisfied: msgpack-python in /home/pi/Django_projects/django-snapdots/lib/python2.7/site-packages (from asgi_redis) Requirement already satisfied: six in /home/pi/Django_projects/django-snapdots/lib/python2.7/site-packages (from asgi_redis) Requirement already satisfied: asgiref~=1.1.2 in /home/pi/Django_projects/django-snapdots/lib/python2.7/site-packages (from asgi_redis) Installing collected packages: redis, asgi-redis Successfully installed asgi-redis-1.4.3 redis-2.10.6

PACKAGES INSTALLED

(django-snapdots) pi@raspberrypi ~/packages $ pip list --format=freeze

asgi-redis==1.4.3 asgiref==1.1.2 attrs==17.2.0 autobahn==17.9.2 Automat==0.6.0 channels==1.1.8 constantly==15.1.0 daphne==1.3.0 Django==1.11.5 hyperlink==17.3.1 incremental==17.5.0 msgpack-python==0.4.8 pip==9.0.1 pytz==2017.2 redis==2.10.6 setuptools==28.8.0 six==1.10.0 Twisted==17.5.0 txaio==2.8.2 wheel==0.29.0 zope.interface==4.4.2