2

I've been trying to use OpenCV and following this tutorial where they decided to use virtualenvs but this isn't working out for me, and other similar questions aren't helping. Using 16.04 LTS

I installed it and it gave me a few errors regarding virtualenv, I thought it was normal and followed with the tutorial, but apparently when trying to use "workon cv" it gives me errors as well so it isn't something normal.

When I open the terminal this appears:

    /home/user/anaconda3/bin/python: Error while finding spec for 'virtualenvwrapper.hook_loader' (ImportError: No module named 'virtualenvwrapper')
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=/home/user/anaconda3/bin/python and that PATH is
set properly.

I have no idea of what I'm supposed to do with this.

When using "workon cv" this errors appear:

    /home/user/anaconda3/bin/python: Error while finding spec for 'virtualenvwrapper.hook_loader' (ImportError: No module named 'virtualenvwrapper')
/home/user/anaconda3/bin/python: Error while finding spec for 'virtualenvwrapper.hook_loader' (ImportError: No module named 'virtualenvwrapper')

What am I supposed to do? I've used a virtual environment tool before I think, (venv if not mistaken).

Thanks a ton, I hope this hasn't been answered before, but all I found didn't really help me.

2 Answers 2

1

I run...

conda install -c eumetsat virtualenvwrapper 

and the problem is gone.

0

in my case had to upgrade stevedore I had installed bandit and precommit and had to update a few things in relation to that. Stevedore was the last thing i had to upgrade pip3 install -U stevedore

Here is part of the traceback:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/stevedore/_cache.py", line 159, in _get_data_for_path
    with open(filename, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/root/.cache/python-entrypoints/d4b9.........
1
  • I would suggest you say what version of Ubuntu you are using so any future user will know that the path 3.7 may need to be updated.
    – David
    Mar 25, 2023 at 13:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .