You are not logged in.

#1 2018-08-08 23:07:39

AldoCuriel
Member
Registered: 2018-07-07
Posts: 7

Virtualenvwrapper path

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

#2 2018-08-09 08:57:30

robg
Member
Registered: 2015-03-05
Posts: 218

Re: Virtualenvwrapper path

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

#3 2018-08-09 09:42:42

imdn
Member
Registered: 2016-04-12
Posts: 40

Re: Virtualenvwrapper path

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

#4 2018-08-10 05:08:12

beholder
Member
Registered: 2018-08-10
Posts: 2

Re: Virtualenvwrapper path

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

#5 2018-08-10 14:06:07

pknox
Member
Registered: 2018-08-10
Posts: 11

Re: Virtualenvwrapper path

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

#6 2018-08-17 05:37:26

AldoCuriel
Member
Registered: 2018-07-07
Posts: 7

Re: Virtualenvwrapper path

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 hmm


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* ]] && return

alias 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

Board footer

Powered by FluxBB