pythonpython-3.6virtualenvwrapper

virtualenvwrapper.sh crashes shell


I am following the install instructions for virtualenvwrapper, described here.

I have used pip install virtualenvwrapper and it installed at the path /home/.pyenv/shims/.

But when I run the command source /home/.pyenv/shims/virtualenvwrapper.sh the whole Konsole shuts down. I had previously put the command in the .bashrc file and almost broke Linux because the Konsole would crash immediately after opening.

I'm using Linux OpenSuse and Python version 3.6.0.

Any ideas what could be causing the crash?


Solution

  • I have come across this problem several times now on different machines and while I don't fully understand why it happens, I have found a solution to the problem.

    The problem seems to be due to mismatches in the python version being used and the pip version used to install virtualenvwrapper. I had been using the system install of python (2.7) but the pip version was for python 3.5.

    To fix this, use the suggestion in this answer as follows:

    python -m pip install virtualenvwrapper
    

    Then you can source /path/to/virtualenvwrapper.sh and everything should work fine.