Error Installing OpenWISP2 on Raspbian Jessie

37 views
Skip to first unread message

M Ricky Anggoro P

unread,
Jul 12, 2019, 1:56:27 PM7/12/19
to OpenWISP
Hello, I'm still newbie on OpenWISP2 and Ansible. I had some trouble on installing OpenWISP2 on Raspbian Jessie with ansbile playbook. This is my error line:

------------------------------
TASK [openwisp.openwisp2 : Update pip & related tools] ***********************************************
ok: [10.33.109.247]

TASK [openwisp.openwisp2 : Install cryptography from pip] ********************************************
fatal: [10.33.109.247]: FAILED! => {"changed": false, "cmd": ["/opt/openwisp2/env/bin/pip", "install", "-U", "cryptography"], "msg": "stdout: Collecting cryptography\n  Using cached https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz\n  Installing build dependencies: started\n  Installing build dependencies: finished with status 'done'\n  Getting requirements to build wheel: started\n  Getting requirements to build wheel: finished with status 'done'\n\n:stderr: DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).\nERROR: Exception:\nTraceback (most recent call last):\n  File \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/cli/base_command.py\", line 178, in main\n    status = self.run(options, args)\n  File \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/commands/install.py\", line 352, in run\n    resolver.resolve(requirement_set)\n  File \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\", line 131, in resolve\n    self._resolve_one(requirement_set, req)\n  File \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\", line 294, in _resolve_one\n    abstract_dist = self._get_abstract_dist_for(req_to_install)\n  File \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py\", line 242, in _get_abstract_dist_for\n    self.require_hashes\n  File \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py\", line 362, in prepare_linked_requirement\n    abstract_dist.prep_for_dist(finder, self.build_isolation)\n  File \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py\", line 169, in prep_for_dist\n    self.install_backend_dependencies(finder=finder)\n  File \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py\", line 123, in install_backend_dependencies\n    reqs = req.pep517_backend.get_requires_for_build_wheel()\n  File \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py\", line 71, in get_requires_for_build_wheel\n    'config_settings': config_settings\n  File \"/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py\", line 162, in _call_hook\n    raise BackendUnavailable\npip._vendor.pep517.wrappers.BackendUnavailable\n"}

PLAY RECAP *******************************************************************************************
10.33.109.247              : ok=24   changed=0    unreachable=0    failed=1    skipped=40   rescued=0    ignored=1   


----------------------------------
I Suggest that my Python version is deprecated, but I already upgrade Python version to 3.6.3,

raspi.png



I also tried to install cryptography manually, like this:

pi@ricky:~/Python-3.6.3 $ sudo pip install cryptography
Collecting cryptography
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting six>=1.4.1 (from cryptography)
Collecting cffi!=1.11.3,>=1.8 (from cryptography)
Collecting asn1crypto>=0.21.0 (from cryptography)
     |████████████████████████████████| 102kB 1.8MB/s 
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography)
Building wheels for collected packages: cryptography
  Building wheel for cryptography (PEP 517) ... done
  Stored in directory: /root/.cache/pip/wheels/d0/02/96/64b1439e5409591b6b0294d1da2f66a4ae4f0548d1bdb225b7
Successfully built cryptography
Installing collected packages: six, pycparser, cffi, asn1crypto, cryptography
  Running setup.py install for cffi ... done
Successfully installed asn1crypto-0.24.0 cffi-1.12.3 cryptography-2.7 pycparser-2.19 six-1.12.0


I got no idea what I should do to fix the error, thanks before.

M Ricky Anggoro P

unread,
Jul 12, 2019, 1:58:18 PM7/12/19
to OpenWISP
This is my hosts file:
[pi]
10.33.109.247

And this is my playbook.yml:
- hosts : pi
  become: true
  become_user: root
  roles : 
    - openwisp.openwisp2
  vars:
    openwisp2_shared_secret: 12345678
    postfix_myhostname: localhost

Federico Capoano

unread,
Jul 12, 2019, 2:03:04 PM7/12/19
to OpenWISP
To install cryptography manually you should do it in the python virtual environment used by openwisp:

cd /opt/openwisp2
source env/bin/activate
pip install cryptography

Try this and let me know if it solves it.

Best regards
Fed

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/2b2b1ca1-bccf-4b2a-94f7-35e73f2ab4bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

M Ricky Anggoro P

unread,
Jul 12, 2019, 2:10:58 PM7/12/19
to OpenWISP
Thanks for your very fast response :)
After I followed your suggest, i'm still got my error:

pi@ricky:~ $ cd /opt/openwisp2/
pi@ricky:/opt/openwisp2 $ ls
env
pi@ricky:/opt/openwisp2 $ source env/bin/activate
(env)pi@ricky:/opt/openwisp2 $ pip install cryptography
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Collecting cryptography
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
  File "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/cli/base_command.py", line 178, in main
    status = self.run(options, args)
  File "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/commands/install.py", line 352, in run
    resolver.resolve(requirement_set)
  File "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
  File "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
    self.require_hashes
  File "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py", line 362, in prepare_linked_requirement
    abstract_dist.prep_for_dist(finder, self.build_isolation)
  File "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py", line 169, in prep_for_dist
    self.install_backend_dependencies(finder=finder)
  File "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py", line 123, in install_backend_dependencies
    reqs = req.pep517_backend.get_requires_for_build_wheel()
  File "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py", line 71, in get_requires_for_build_wheel
    'config_settings': config_settings
  File "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py", line 162, in _call_hook
    raise BackendUnavailable
pip._vendor.pep517.wrappers.BackendUnavailable
To unsubscribe from this group and stop receiving emails from it, send an email to open...@googlegroups.com.

Federico Capoano

unread,
Jul 12, 2019, 6:08:41 PM7/12/19
to OpenWISP
I'm not sure why it's happening, even after looking on Google it's not clear to me what that error means exactly.

To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/391d9af2-28b7-4441-9e02-a9481f8058f3%40googlegroups.com.

M Ricky Anggoro P

unread,
Jul 14, 2019, 10:21:16 AM7/14/19
to OpenWISP
Thanks for your response. After all, I gave up on Jessie, so I update my raspi to Buster, and run this command:
ansible-playbook -i hosts playbook.yml -b -k -K -u pi

It solved my problem. I think because the Python that installed in Jessie is 3.4, when Buster's default Python version is 3.7.3.
Thank you Federico, for your quick response. 

Federico Capoano

unread,
Jul 15, 2019, 1:54:04 PM7/15/19
to OpenWISP
Welcome, I'm glad you solved it on your own.
It's quite hard to support many platforms out of the box.

Federico
Reply all
Reply to author
Forward
0 new messages