내 windows7 PC에 파이썬 2.7을 설치했습니다. 이제 Beautiful Soup을 거쳤습니다. 이제 BeautifulSoup4를 설치하기위한 두 가지 명령을 발견했습니다. easy_install beautifulsoup4
과 pip install beautifulsoup4
입니다.하지만 내 혼란은 어느 디렉토리에 있습니다. 내 python 폴더는 C:\Python27
입니다. 그 명령을 어디에서 실행할 수 있도록 도와 주실 수 있습니까?beautifulsoup4 설치와 혼동
오류
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Arup Rakshit>cd..
C:\Users>cd..
C:\>cd C:\Python27
C:\Python27>python.exe virtualenv.py selenv
New python executable in selenv\Scripts\python.exe
Installing setuptools....................................done.
Installing pip.........................done.
C:\Python27>cd selenv\Scripts\
C:\Python27\selenv\Scripts>pip.exe install selenium
Downloading/unpacking selenium
Downloading selenium-2.28.0.tar.gz (2.1MB): 2.1MB downloaded
Running setup.py egg_info for package selenium
C:\Python27\Lib\distutils\dist.py:267: UserWarning: Unknown distribution opt
ion: 'src_root'
warnings.warn(msg)
warning: no files found matching 'docs\api\py\index.rst'
Installing collected packages: selenium
Running setup.py install for selenium
C:\Python27\Lib\distutils\dist.py:267: UserWarning: Unknown distribution opt
ion: 'src_root'
warnings.warn(msg)
warning: no files found matching 'docs\api\py\index.rst'
Successfully installed selenium
Cleaning up...
C:\Python27\selenv\Scripts>python.exe my_selenium_script.py
python.exe: can't open file 'my_selenium_script.py': [Errno 2] No such file or d
irectory
C:\Python27\selenv\Scripts>python.exe my_selenium_script.py
Hello
C:\Python27\selenv\Scripts>cd..
C:\Python27\selenv>pip install beautifulsoup4
'pip' is not recognized as an internal or external command,
operable program or batch file.
C:\Python27\selenv>
감사
모든 명령은 어느 디렉토리에서나 실행할 수 있습니다. BS 패키지는'C : \ Python27 \ Lib \ site-packages'에 설치 될 것입니다. 자세한 내용은 다음을 참조하십시오. http://docs.python.org/2/install/index.html#how-installation-works – bernie
@bernie 설명을 참조하십시오. 오류가 발생했습니다. 나를 안내 해줘! – CodeLover
http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows –