MycroftAI / enclosure-picroft

Mycroft interface for Raspberry Pi environment
https://mycroft.ai/documentation/picroft
GNU Lesser General Public License v3.0
804 stars 191 forks source link

import from fasteners fails, but pip list shows fasteners installed #87

Closed KathyReid closed 5 years ago

KathyReid commented 5 years ago

I'm currently updating the docs for Picroft, and am using a fresh install / image of the Lighting release to do the documentation. On first boot, the following error message is shown;

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.5/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/pi/mycroft-core/mycroft/__init__.py", line 17, in <module>
    from mycroft.api import Api
  File "/home/pi/mycroft-core/mycroft/api/__init__.py", line 26, in <module>
    from mycroft.identity import IdentityManager, identity_lock
  File "/home/pi/mycroft-core/mycroft/identity/__init__.py", line 21, in <module>
    from mycroft.util.combo_lock import ComboLock
  File "/home/pi/mycroft-core/mycroft/util/combo_lock.py", line 16, in <module>
    from fasteners.process_lock import InterProcessLock
ImportError: No module named 'fasteners'

but running a pip list shows fasteners as installed:

(.venv) pi@picroft:~ $ pip list | grep fasteners
fasteners                    0.14.1  

On subsequent reboots the error is not shown, but it will be a poor first experience for folks new to Picroft.

Thoughts on why this occurs

On first boot, the requirements.txt file hasn't been installed, and fasteners is included from the file. Should pip install -r requirements.txt be run first and then a reboot done on first boot?

Other references

This was also mentioned on the forum at; https://community.mycroft.ai/t/missing-dependencies-on-fresh-picroft-install/5254

penrods commented 5 years ago

I don't believe this is an issue anymore. Let me know if you still see this.