이 파이썬 메시지는 무엇을 의미합니까?
-
19-08-2019 - |
문제
ho-fe3fdd00-12:~ Sam$ easy_install BeautifulSoup
Traceback (most recent call last):
File "/usr/bin/easy_install", line 8, in <module>
load_entry_point('setuptools==0.6c7', 'console_scripts', 'easy_install')()
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/setuptools/command/easy_install.py", line 1670, in main
with_ei_usage(lambda:
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/setuptools/command/easy_install.py", line 1659, in with_ei_usage
return f()
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/setuptools/command/easy_install.py", line 1674, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py", line 125, in setup
dist.parse_config_files()
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 373, in parse_config_files
parser.read(filename)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py", line 267, in read
self._read(fp, filename)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py", line 462, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /Users/Sam/.pydistutils.cfg, line: 1
'install_lib = ~/Library/Python/$py_version_short/site-packages\n'
BeautifulSoup을 설치하려고합니다. ~/.pydistutils.cfg의 처음 두 줄 :
install_lib = ~/Library/Python/$py_version_short/site-packages
install_scripts = ~/bin
해결책
BeautifulSoup은 BeautifulSoup.py 파일 (예 : 표준 .tar.gz 배포 내부에서)을 잡고 PythonPath에 어딘가에 놓아 설치할 수있는 순수한 Python 모듈입니다. 오류 메시지에 언급 된 경로가 정확한 경우 /users/sam/library/python/2.5/site-packages 내부.
문제를 과도하게 복잡하게하는 까다 롭고 오류가 발생하기 쉬운 설치자가 필요하지 않습니다.
다른 팁
구성 파일 .pydstutils.cfg에는 구문 오류가 있습니다.
상단에 라인을 추가하십시오 ~/.pydistutils.cfg
:
[easy_install]
제휴하지 않습니다 StackOverflow