platformio-core: PIO Home not working anymore (Raspberry Pi 3 and Termux)
Pio Home stopped working on Raspberry Pi3 installation. Reinstalling, updating or upgrading with pip install -U platformio doesn´t help.
Error log on Raspberry Pi :
Error: Traceback (most recent call last):
File "/home/openhabian/.local/lib/python2.7/site-packages/platformio/__main__.py", line 102, in main
cli() # pylint: disable=no-value-for-parameter
File "/home/openhabian/.local/lib/python2.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/openhabian/.local/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/openhabian/.local/lib/python2.7/site-packages/platformio/commands/__init__.py", line 44, in invoke
return super(PlatformioCLI, self).invoke(ctx)
File "/home/openhabian/.local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/openhabian/.local/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/openhabian/.local/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/openhabian/.local/lib/python2.7/site-packages/platformio/commands/home/command.py", line 52, in cli
from autobahn.twisted.resource import WebSocketResource
File "/home/openhabian/.platformio/packages/contrib-pysite/autobahn/twisted/__init__.py", line 58, in <module>
from autobahn.twisted.wamp import ApplicationSession
File "/home/openhabian/.platformio/packages/contrib-pysite/autobahn/twisted/wamp.py", line 50, in <module>
from autobahn.wamp import protocol, auth
File "/home/openhabian/.platformio/packages/contrib-pysite/autobahn/wamp/auth.py", line 43, in <module>
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
File "/home/openhabian/.platformio/packages/contrib-pysite/cryptography/hazmat/primitives/kdf/pbkdf2.py", line 12, in <module>
from cryptography.hazmat.primitives import constant_time
File "/home/openhabian/.platformio/packages/contrib-pysite/cryptography/hazmat/primitives/constant_time.py", line 11, in <module>
from cryptography.hazmat.bindings._constant_time import lib
ImportError: /home/openhabian/.platformio/packages/contrib-pysite/cryptography/hazmat/bindings/_constant_time.so: cannot open shared object file: No such file or directory
============================================================
An unexpected error occurred. Further steps:
* Verify that you have the latest version of PlatformIO using
`pip install -U platformio` command
* Try to find answer in FAQ Troubleshooting section
https://docs.platformio.org/page/faq.html
* Report this problem to the developers
https://github.com/platformio/platformio-core/issues
============================================================
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 37 (9 by maintainers)
Commits related to this issue
- Automatically rebuild contrib-pysite package when import fails // Issue #3313 — committed to platformio/platformio-core by ivankravets 4 years ago
- platformio 4.2.1 - [x] Have you followed the [guidelines for contributing](https://github.com/Homebrew/homebrew-core/blob/master/CONTRIBUTING.md)? - [x] Have you checked that there aren't other open ... — committed to Homebrew/homebrew-core by ivankravets 4 years ago
Please take all of this with the consideration I am not a python developer. The issue seems the be that the shared library assets under contrib-pysite for cryptography’s bindings are incompatible with the raspberry pi runtime (at least while running raspbian). Examining the objects they seemed to be arm compatible, but I didn’t dig into this much further beyond the fact they wouldn’t load.
Someone else can probably clean up my workaround, but to circumvent the issue for now inside the venv created by platformio I did a pip install cryptography, then copied the binary artifacts created from that install over the files inside contrib-pysite.
cd ~/.platformiosource penv/bin/activatepip install cryptographycp -r penv/lib/python3.7/site-packages/cryptography/hazmat/bindings/* packages/contrib-pysite/cryptography/hazmat/bindings/Again, sorry for the crude and ugly workaround, I’m sure a more experienced python developer can provide better guidance.
I’m not sure if you wanted me to open a ticket for the crypto related issue or that the curl stuff installs those packages with pip 😃 I’ve opened #3482 for the crypto library related issue - just ping me and I’ll test it.
Please provide an output from a system Terminal