Where is virtualenvwrapper.sh after pip install?

后端 未结 24 1449
忘了有多久
忘了有多久 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 09:58

    You can use the find command to search for a file:

    find / -name virtualenvwrapper.sh

    This will search all directories from the root for the file.


    on ubuntu 12.04 LTS, installing through pip, it is installed to

    /usr/local/bin/virtualenvwrapper.sh


    on ubuntu 17.04, installing through pip as a normal user, it is installed to

    ~/.local/bin/virtualenvwrapper.sh

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

    in my case: /home/username/.local/bin/virtualenvwrapper.sh

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

    In OSx EI captain, I installed the virtualenvwrapper as

    sudo pip3 install virtualenvwrapper
    

    , however I cannot find the virtualenvwrapper.sh in /user/local/bin, it was finally found at /Library/Frameworks/Python.framework/Versions/3.4/bin/virtualenvwrapper.sh , and you can make an soft link to /usr/local/bin as

    ln -s /Library/Frameworks/Python.framework/Versions/3.4/bin/virtualenvwrapper.sh /usr/local/bin/virtualenvwrapper.sh, and everything you can just follow the setup guide as the official document does. Good luck!

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

    For me it was in :

    ~/Library/Python/2.7/bin/virtualenvwrapper.sh
    

    (With OS X, with a pip install --user installation)

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

    The exact path where virtualenvwrapper.sh is stored/located varies from OS to OS. Even with in same OS, it varies from version to version. So we need a generic solution that works for all OS versions.

    Easiest way I have found to find its path is: Do

    pip uninstall virtualenvwrapper
    

    This will prompt a confirmation. Say "No" But first line of confirmation shows the path of virtualenvwrapper.sh (Prompt gives a list of files it will delete, if you say Yes. First entry in this list contains path to virtualenvwrapper.sh in your machine)

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

    or, like I did..just uninstall virtualenvwrapper

    sudo pip uninstall virtualenvwrapper

    and then install it with easy_install

    sudo easy_install virtualenvwrapper

    this time I found the file "/usr/local/bin/virtualenvwrapper.sh" installed... Before that I weren't finding that file anywhere even by this command

    find / -name virtualenvwrapper.sh

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