Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cdesch opened this issue Dec 31, 2020 · 2 comments

Comments

@cdesch
Copy link

cdesch commented Dec 31, 2020

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
Copy link
Author

cdesch commented Dec 31, 2020

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
Copy link
Member

Mainline code uses Ubuntu 20.04 now. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants