3
가상 환경에서 아름다운 스프를 사용하려고했습니다. pip와 easy_install을 모두 사용하여 모듈을 성공적으로 설치했지만 인터프리터로 가져올 수 없습니다. 여기 내가 그것을 시도하고 시작한 것입니다 .. 어떤 도움을 많이 주시면 감사하겠습니다.가상 환경에서 아름다운 수프 4 캔 가져 오기
감사합니다.
(WebScraper)[email protected]:~/code/WebScraper$ easy_install beautifulsoup4
Searching for beautifulsoup4
Reading http://pypi.python.org/simple/beautifulsoup4/
Reading http://www.crummy.com/software/BeautifulSoup/bs4/
Reading http://www.crummy.com/software/BeautifulSoup/bs4/download/
Best match: beautifulsoup4 4.2.0
Downloading http://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4- 4.2.0.tar.gz#md5=48a3a7ee42d9b5bd046b3b5c86bb2d35
Processing beautifulsoup4-4.2.0.tar.gz
Writing /tmp/easy_install-R6wbsM/beautifulsoup4-4.2.0/setup.cfg
Running beautifulsoup4-4.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install- R6wbsM/beautifulsoup4-4.2.0/egg-dist-tmp-xIc3Vf
zip_safe flag not set; analyzing archive contents...
Adding beautifulsoup4 4.2.0 to easy-install.pth file
Installed /home/test/code/WebScraper/lib/python2.7/site-packages/beautifulsoup4-4.2.0- py2.7.egg
Processing dependencies for beautifulsoup4
Finished processing dependencies for beautifulsoup4
(WebScraper)[email protected]:~/code/WebScraper$ python
Python 2.7.4 (default, Apr 19 2013, 18:28:01)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bs4
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "bs4.py", line 1, in <module>
from bs4 import BeautifulSoup
ImportError: cannot import name BeautifulSoup
>>>>
흥미 롭습니다. 그냥 내 우분투 동일한 브랜드의 새로운 virtualenv - 가져온'bs4' 오류없이 일을했다. – alecxe
새로운 virtualenv에서 똑같은 작업을 시도 할 수 있습니까? – alecxe
흠. 그것은 작동하는 것처럼 보였다. 조언 해주셔서 감사합니다. 내 프로젝트를 새로운 가상 환경으로 옮겼고 모든 것이 잘 작동했습니다. –