疑问
C:\Users\Mike>pip3 install BeautifulSoupCollecting BeautifulSoup
Using cached https://files.pythonhosted.org/packages/40/f2/6c9f2f3e696ee6a1fb0e4d7850617e224ed2b0b1e872110abffeca2a09d4/BeautifulSoup-3.2.2.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\users\mike\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv = '"'"'C:\\Users\\Mike\\AppData\\Local\\Temp\\pip-install-89je9lm2\\BeautifulSoup\\setup.py'"'"'; __file__='"'"'C:\\Users\\Mike\\AppData\\Local\\Temp\\pip-install-89je9lm2\\BeautifulSoup\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\Mike\AppData\Local\Temp\pip-install-89je9lm2\BeautifulSoup\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Mike\AppData\Local\Temp\pip-install-89je9lm2\BeautifulSoup\setup.py", line 3
"You're trying to run a very old release of Beautiful Soup under Python 3. This will not work."<>"Please use Beautiful Soup 4, available through the pip package 'beautifulsoup4'."
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
求助 SyntaxError: invalid syntax
语法错误,可能误用中文字符、缩进、忘记加冒号、括号等 小错误 Twilight6 发表于 2020-6-6 20:42
语法错误,可能误用中文字符、缩进、忘记加冒号、括号等 小错误
啊啊 那怎么改呀 Mike_python小 发表于 2020-6-6 20:42
啊啊 那怎么改呀
1.你认真自己找错误
2.发代码 Twilight6 发表于 2020-6-6 20:42
语法错误,可能误用中文字符、缩进、忘记加冒号、括号等 小错误
我这是安装bs4的包有什么语法错误 本帖最后由 Hello. 于 2020-6-6 20:59 编辑
“您正试图在Python 3下运行一个非常旧的 Beautiful Soup版本。这不起作用。”<>“请使用 Beautiful Soup4,可通过pip包‘ Beautiful Soup4’获得。”
^
SyntaxError:语法无效
----------------------------------------
错误:命令错误,退出状态为1:python setup.py egg_info检查日志以获取完整的命令输出。
警告:您正在使用pip版本19.2.3,但是版本20.1.1可用。
你应该考虑通过“ PIP安装”命令升级
解决方案pip3 install beautifulsoup4 Hello. 发表于 2020-6-6 20:44
“您正试图在Python 3下运行一个非常旧的 Beautiful Soup版本。这不起作用。”“请使用 Beautiful Soup4, ...
C:\Users\Mike>pip install Beautiful Soup4
Collecting Beautiful
Downloading https://files.pythonhosted.org/packages/34/7d/35df0e4eb195b67afb741115ea35d2b064fceb53bd4d0aa3ff023d69043a/beautiful-0.0.2-py3-none-any.whl
Collecting Soup4
ERROR: Could not find a version that satisfies the requirement Soup4 (from versions: none)
ERROR: No matching distribution found for Soup4
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command. Twilight6 发表于 2020-6-6 20:43
1.你认真自己找错误
2.发代码
啊我的错 抱歉 本帖最后由 Hello. 于 2020-6-6 20:59 编辑
pip3 install beautifulsoup4 这样试试吧!刚刚没看见你是在安装,抱歉
python -m pip install beautifulsoup4 -i https://pypi.tuna.tsinghua.edu.cn/simple 难道不是
pip3 install bs4
吗? 本帖最后由 Hello. 于 2020-6-6 21:00 编辑
qiuyouzhi 发表于 2020-6-6 20:55
难道不是
吗?
你说得对,我忘了他是 win
linux 才用 sudo python -m pip install bs4 -i https://pypi.tuna.tsinghua.edu.cn/simple
页:
[1]