Programing

pip 설치 후 virtualenvwrapper.sh는 어디에 있습니까?

lottogame 2020. 8. 12. 22:08
반응형

pip 설치 후 virtualenvwrapper.sh는 어디에 있습니까?


나는 OSX에서 virtualenvwrapper를 설정하려고하는데 내가 찾은 모든 지침과 자습서는 virtualenvwrapper.sh를 가리키는 소스 명령을 .profile에 추가하라고 알려줍니다. 모든 python 및 site-packages 디렉토리를 확인했지만 virtualenvwrapper.sh를 찾을 수 없습니다. 별도로 다운로드해야합니까? pip가 올바르게 설치되지 않습니까?

다음은 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenvwrapper의 내용입니다.

hook_loader.py      hook_loader.pyc     project.py      project.pyc     user_scripts.py     user_scripts.pyc

보시다시피 virtualenvwrapper.sh가 없습니다. 어디 있어요?


find명령을 사용하여 파일을 검색 할 수 있습니다 .

find / -name virtualenvwrapper.sh

그러면 루트에서 모든 디렉토리에서 파일을 검색합니다.


우분투 12.04 LTS에서 pip를 통해 설치하면 다음 위치에 설치됩니다.

/usr/local/bin/virtualenvwrapper.sh


우분투 17.04에서 일반 사용자로 pip를 통해 설치하면 다음 위치에 설치됩니다.

~/.local/bin/virtualenvwrapper.sh


벌써 해봤 어?

$ which virtualenvwrapper.sh

방금 pip로 다시 설치했습니다.

sudo pip uninstall virtualenvwrapper
sudo pip install virtualenvwrapper

그리고 이번에는 / usr / local / bin에 넣습니다.


virtualenvwrapper.sh 가 저장 / 위치 되는 정확한 경로 는 OS마다 다릅니다 . 동일한 OS에서도 버전 마다 다릅니다 . 따라서 모든 OS 버전에서 작동하는 일반적인 솔루션이 필요합니다.

경로를 찾는 가장 쉬운 방법은 다음과 같습니다.

pip uninstall virtualenvwrapper

확인 메시지가 표시됩니다. "아니오"라고 말하지만 확인의 첫 번째 줄에는 virtualenvwrapper.sh의 경로가 표시됩니다 (예라고 말하면 삭제할 파일 목록이 프롬프트에 표시됩니다.이 목록의 첫 번째 항목에는 컴퓨터의 virtualenvwrapper.sh에 대한 경로가 포함됩니다)


또는 내가 한 것처럼 .. virtualenvwrapper를 제거하십시오.

sudo pip uninstall virtualenvwrapper

그런 다음 easy_install로 설치하십시오.

sudo easy_install virtualenvwrapper

이번에는 " /usr/local/bin/virtualenvwrapper.sh " 파일이 설치되어 있음을 발견했습니다 . 그 전에는이 명령으로도 해당 파일을 찾을 수 없었습니다.

/ -name virtualenvwrapper.sh 찾기


Mac OS에서

which virtualenvwrapper.sh

당신은 얻었다

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

그리고 당신은 할 수 있습니다

sudo ln /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh /usr/local/bin/virtualenvwrapper.sh

그리고 당신의 .bash_profile

source /usr/local/bin/virtualenvwrapper.sh

또는 당신 은 할 수 있습니다

source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh

OS X 10.8.2에서 Python 2.7 :

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


OSx EI 캡틴에서 virtualenvwrapper를 다음과 같이 설치했습니다.

sudo pip3 install virtualenvwrapper

그러나에서 virtualenvwrapper.sh를 찾을 수 없으며 /user/local/bin마침내에서 발견되었으며 /Library/Frameworks/Python.framework/Versions/3.4/bin/virtualenvwrapper.sh/ usr / local / bin에 대한 소프트 링크를 다음과 같이 만들 수 있습니다.

ln -s /Library/Frameworks/Python.framework/Versions/3.4/bin/virtualenvwrapper.sh /usr/local/bin/virtualenvwrapper.sh, 그리고 공식 문서처럼 설정 가이드를 따를 수 있습니다. 행운을 빕니다!


나도 같은 문제가있어. 이전 버전의 virtualenvwrapper가 있으면 pip가 작동하지 않습니다.

download src from http://pypi.python.org/pypi/virtualenvwrapper/3.6 and python setup.py install. Then the problem solved.


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

For me it was in :

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

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


Installed it using pip on Ubuntu 15.10 using a normal user, it was put in ~/.local/bin/virtualenvwrapper.sh which I found by running:

$ find / -name virtualenvwrapper.sh 2>/dev/null


Using

find / -name virtualenvwrapper.sh

I got a TON of "permissions denied"s, and exactly one printout of the file location. I missed it until I found that file location when I uninstall/installed it again with pip.

In case you were curious, it was in

/usr/local/share/python/virtualenvwrapper.sh

In my case (OSX El Capitan, version 10.11.5) I needed to edit the .profile like so:

In the terminal:

vim ~/.profile

export WORKON_HOME=$HOME/.virtualenvs
export MSYS_HOME=C:\msys\1.0
source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh                                                                                   

And then reload the profile (that it will be availuble in the current session.)

source ~/.profile

Hope it will help someone.


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


Although this is an OS X question, here's what worked for me on Linux (Red Hat).

My virtualwrapper.sh was in

~/.local/bin/virtualenvwrapper.sh

This is probably because I installed virtualenvwrapper locally, using the --user flag...

pip install --user virtualenvwrapper

...as an alternative to the risky practice of using sudo pip.


/usr/share/virtualenvwrapper/virtualenvwrapper.sh

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


/usr/local/bin/virtualenvwrapper.sh

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

Manually downloading the package and installing worked for me.


For Ubuntu
If you just installed it, check the output on Terminal, I'm posting mine :

Running setup.py install for virtualenv-clone    
Installing virtualenv-clone script to /home/username/.local/bin
Successfully installed virtualenvwrapper virtualenv virtualenv-clone stevedore pbr six
Cleaning up...

Here the second line tells you the path. For me it was at /home/username/.local/bin


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.


If you execute pip install virtualenvwrapper without sudo as a normal user pip will run but won't copy the files in the required locations because the lack of permissions.

mortiz@florida:~# sudo pip3 install virtualenvwrapper

Use sudo and the files will be created under their respective paths:

root@florida:/usr/local/bin# ls -ltr
total 8008
-rwxr-xr-x 1 root staff 8136192 Jun 11 17:45 chromedriver
-rwxr-xr-x 1 root staff   41697 Sep  5 16:06 virtualenvwrapper.sh
-rwxr-xr-x 1 root staff    2210 Sep  5 16:06 virtualenvwrapper_lazy.sh
-rwxr-xr-x 1 root staff     215 Sep  5 16:06 pbr
-rwxr-xr-x 1 root staff     218 Sep  5 16:06 virtualenv-clone
-rwxr-xr-x 1 root staff     213 Sep  5 16:06 virtualenv
root@florida:/usr/local/bin# 

Worked for me on Debian GNU/Linux 9


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


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

참고URL : https://stackoverflow.com/questions/12647266/where-is-virtualenvwrapper-sh-after-pip-install

반응형