5

I have been stuck with this problem since last night trying to solve and have tried all recommended solutions here and still didn't work. I am hoping to find a positive suggestion if there is actually any possible method I may not have tried yet. I started experiencing problems with my virtaulenv and virtualwrapper after downgrading my python version from 3.7 to 3.6.

"/usr/local/opt/python/bin/python3.6: Error while finding module specification for 'virtualenvwrapper.hook_loader' (ModuleNotFoundError: No module named 'virtualenvwrapper') virtualenvwrapper.sh: There was a problem running the initialization hooks"

when I tried 'sudo pip install virtualenv virtualenvwrapper' and 'sudo pip3 install virtualenv virtualenvwrapper' I received "Requirements already satisfied".

I also tried "brew unlink python && brew link python" to link them with python3.6 but still it didn't work. Please I will appreciate your help and positiive suggestions.

Thanks

Godspower
  • 87
  • 2
  • 6

2 Answers2

1

I found that I was able to navigate through this using

sudo pip3 install virtualenv virtualenvwrapper

Then I created another virtual environment using

sudo virtualenv-p python3

source >target folder>/bin/activate

This worked for me

Godspower
  • 87
  • 2
  • 6
0

Adding the following to ./bashrc fixed this error in my environment.

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python

similar to: /usr/bin/python3: Error while finding spec for 'virtualenvwrapper.hook_loader' (<class 'ImportError'>: No module named 'virtualenvwrapper')

fgui
  • 1,564
  • 1
  • 13
  • 14