You are not logged in.
Pages: 1
Hi, after I update my ARCH, a problem appears in the terminal.
/usr/bin/python: Error while finding module specification for 'virtualenvwrapper.hook_loader' (ModuleNotFoundError: 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=/usr/bin/python and that PATH is
set properly.
I don't know if it's a problem of the python version ( I have Python3).
Thanks.
Offline
We need more information. Please post your pacman log, your .bashrc and the command leading to
a problem appears in the terminal
(or did you mean that you open a terminal emulator and these lines appear?)
Offline
Also worth checking if you installed virtualenv via pip instead of the 'python-virtualenv' package from the official arch repo.
The repo version is outdated (15.1.0-4), while on Pypi it is ahead by a major release (16.0.0)
Last edited by imdn (2018-08-09 13:01:52)
Offline
I ran into the same issue after I upgraded. This command is what worked for me (you might not need the --user depending on how you installed it previously)
python -m pip install --user virtualenvwrapper --upgrade
Last edited by beholder (2018-08-10 05:09:01)
Offline
Try to remove all virtualenvwrapper packages. Then, install it like this:
# check the pip
sudo pacman -Syu python-pip
# install virtualenvwrapper with the --user option
# in this case, virtualenvwrapper.sh will be here: ~/.local/bin/virtualenvwrapper.sh
pip install --user virtualenvwrapper
# run these commands to add the needed two lines to your .bashrc file in your home folder
echo "source $HOME/.local/bin/virtualenvwrapper.sh" >> .bashrc
echo "export PATH="$PATH:$HOME/.local/bin" >> .bashrc
Close the terminal and start a new instance of terminal, then check if it works now.
Last edited by pknox (2018-08-10 15:32:37)
Offline
Hi thanks for all the answers. But I broke everything, now pip doesn't work, no pip command respond. Sorry for that.
I tried all the solutions you gave me but nothing works and some other I found reading on forums.
What happend is that I neded to run some thing with python 2.7 and my Arch has 3.7.0, So I installed virtualenv and virtualenvwrapper, It appered that everything was fine, I even worked with the programs etc, until I updated Arch and the message appeared.
I think I installed correctly python 2 and 3 coreectly. ( I thinks so ... if you know how to check it would be great)
[aldo@ARCHALAVERGA ~]$ python --version
Python 3.7.0
[aldo@ARCHALAVERGA ~]$ python2 --version
Python 2.7.15
Now if I run pip commands this happen:
[aldo@ARCHALAVERGA ~]$ pip
bash: /usr/bin/pip: No such file or directory
[aldo@ARCHALAVERGA ~]$ pip2
bash: /usr/bin/pip2: No such file or directory
[aldo@ARCHALAVERGA ~]$ pip3
Traceback (most recent call last):
File "/usr/bin/pip3", line 7, in <module>
from pip._internal import main
ModuleNotFoundError: No module named 'pip'
I read about pip2 and pip3 so I tried some other things and boom, I broke everything
My .bashrc looks like this, I erase the lines that called the virtualenvwrapper so the message of course disappeared but I think it is not solved:
[aldo@ARCHALAVERGA ~]$ cat .bashrc
#
# ~/.bashrc
## If not running interactively, don't do anything
[[ $- != *i* ]] && returnalias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '[aldo@ARCHALAVERGA ~]$ cat .bash_profile
#
# ~/.bash_profile
#[[ -f ~/.bashrc ]] && . ~/.bashrc
if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
exec startx
fi
I can activate virtualenvs btw.
Thanks far all the help.
Offline
Pages: 1