python - 无法在pycharm中安装BeautifulSoup

标签 python package pycharm

DEPRECATION: --no-install, --no-download, --build, and --no-clean are deprecated.  See https://github.com/pypa/pip/issues/906.
Downloading/unpacking BeautifulSoup==3.2.1
  Downloading BeautifulSoup-3.2.1.tar.gz
  Running setup.py (path:/tmp/pycharm-packaging0.tmp/BeautifulSoup/setup.py) egg_info for package BeautifulSoup
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pycharm-packaging0.tmp/BeautifulSoup/setup.py", line 22
        print "Unit tests have failed!"
                                      ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pycharm-packaging0.tmp/BeautifulSoup/setup.py", line 22

    print "Unit tests have failed!"

                                  ^

SyntaxError: invalid syntax

----------------------------------------
Cleaning up...

Command python setup.py egg_info failed with error code 1 in /tmp/pycharm-packaging0.tmp/BeautifulSoup
Storing debug log for failure in /home/jatin/.pip/pip.log

最佳答案

发生这种情况是因为您尝试在 python3 中安装 BeautifulSoup,只有在使用 python2 时才有效。

为了在 python3 中安装它,请使用 pip 安装 beautifulsoup4

关于python - 无法在pycharm中安装BeautifulSoup,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31825433/

相关文章:

python - 导入pymssql时出错

java - Maven 禁止循环包依赖

python - pipelinev 依赖项在终端中正常,但在 PyCharm 中不行

Python - 根据另一列中的值获取两列的最大值或最小值?

python - 如何使用 Beautifulsoup 解析网站

python - 为什么我在 python 中收到此错误? (httplib)

python - VS 代码无法识别我在 Mac 上安装的 Python 包

windows - 无法打开报告文件 (iexpress)

python - PyCharm 在哪里保存 Python/Django 项目的错误日志?

python - 使用 python 调试器 (pdb) 时调试 cython 代码 (.pyx) - 最佳实践