Where is virtualenvwrapper.sh after pip install?

后端 未结 24 1450
忘了有多久
忘了有多久 2020-12-07 09:20

I\'m trying to setup virtualenvwrapper on OSX, and all the instructions and tutorials I\'ve found tell me to add a source command to .profile, pointing towards virtualenvwra

相关标签:
24条回答
  • 2020-12-07 10:06

    Have you installed it using sudo? Was the error in my case.

    0 讨论(0)
  • 2020-12-07 10:07

    For RPM-based distributions(like Fedora 19), after running the sudo pip install virtualenvwrapper command, you may find the file at:

    /usr/bin/virtualenvwrapper.sh
    
    0 讨论(0)
  • 2020-12-07 10:09
    /usr/share/virtualenvwrapper/virtualenvwrapper.sh
    

    I've installed it on Ubuntu 16.04 and it resulted in this location.

    0 讨论(0)
  • 2020-12-07 10:09

    I can find one in macOS Mojave (10.14) while playing with virtualenvwrapper-4.8.4

    /Library/Frameworks/Python.framework/Versions/3.7/bin/virtualenvwrapper.sh

    0 讨论(0)
  • 2020-12-07 10:09

    I had the same issue in with the beagle bone black(debian).

    Manually downloading the package and installing worked for me.

    0 讨论(0)
  • 2020-12-07 10:12

    pip will not try to make things difficult for you on purpose.

    The thing is commands based files are always installed in /bin folders they can be anywhere on the system path.

    I had the same problem and I found that I have these files in my

    ~/.local/bin/

    folder instead of

    /usr/loca/bin/

    which is the common case, but I think they changed the default path to

    ~ or $HOME

    directory because its more isolate for the pip installations and provides a distinction between apt-get packages and pip packages.

    So coming to the point you have two choices here either you go to your .bashrc and make changes like this

    # for virtualenv wrapper
    export WORKON_HOME=$HOME/Envs
    export PROJECT_HOME=$HOME/Devel
    source $HOME/.local/bin/virtualenvwrapper.sh
    

    and than create a directory virtualenvwrapper under /usr/share/ and than symlink your virtualwrapper_lazy.sh like this

    sudo ln -s ~/.local/bin/virtualenvwrapper_lazy.sh /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh
    

    and you can check if your workon command is working which will list your existing virtualenv's.

    0 讨论(0)
提交回复
热议问题