hyperledger / indy-node

The server portion of a distributed ledger purpose-built for decentralized identity.
https://wiki.hyperledger.org/display/indy
Apache License 2.0
687 stars 657 forks source link

Dev Setup Error: Python could not import the module virtualenvwrapper.hook_loader #1638

Closed cdesch closed 1 year ago

cdesch commented 3 years ago

I'm following this quick setup tutorial for Ubuntu 16.04. On the step source ~/.bashrc, I hit this error:


cj@cj-VirtualBox:~/projects/indy-node/dev-setup/ubuntu$ source ~/.bashrc
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/stevedore/_cache.py", line 28, in <module>
    import importlib.metadata as importlib_metadata
ImportError: No module named 'importlib.metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.5/dist-packages/virtualenvwrapper/hook_loader.py", line 16, in <module>
    from stevedore import ExtensionManager
  File "/usr/local/lib/python3.5/dist-packages/stevedore/__init__.py", line 11, in <module>
    from .extension import ExtensionManager
  File "/usr/local/lib/python3.5/dist-packages/stevedore/extension.py", line 19, in <module>
    from . import _cache
  File "/usr/local/lib/python3.5/dist-packages/stevedore/_cache.py", line 31, in <module>
    import importlib_metadata
  File "/usr/local/lib/python3.5/dist-packages/importlib_metadata/__init__.py", line 88
    dist: Optional['Distribution'] = None
        ^
SyntaxError: invalid syntax
virtualenvwrapper.sh: There was a problem running the initialization hooks.

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 and that PATH is
set properly.

Has anyone seen this before?

cdesch commented 3 years ago

It seems to be caught up here source /usr/local/bin/virtualenvwrapper.sh and throwing this error regarding the python package.

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/stevedore/_cache.py", line 28, in <module>
    import importlib.metadata as importlib_metadata
ImportError: No module named 'importlib.metadata'

Is there a list of python dependencies installed globallying or a virtualenv that need to be activated first?

WadeBarnes commented 1 year ago

Mainline code uses Ubuntu 20.04 now. Closing this.