2016-05-12 45 views
0

我試圖通過PyCharm安裝BeautifulSoup包,我也嘗試通過命令行下載它。但我似乎無法在PyCharm上運行它。我不斷收到以下錯誤在PyCharm上下載BeautifulSoup

Collecting BeautifulSoup 
    Using cached BeautifulSoup-3.2.1.tar.gz 
    Complete output from command python setup.py egg_info: 
    Traceback (most recent call last): 
     File "<string>", line 1, in <module> 
     File "C:\Users\Hemesh\AppData\Local\Temp\pycharm-packaging\BeautifulSoup\setup.py", line 22 
     print "Unit tests have failed!" 
            ^
    SyntaxError: Missing parentheses in call to 'print' 

    ---------------------------------------- 

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Hemesh\AppData\Local\Temp\pycharm-packaging\BeautifulSoup\ 
You are using pip version 8.1.1, however version 8.1.2 is available. 
You should consider upgrading via the 'python -m pip install --upgrade pip' command. 

任何人都可以幫忙嗎?

在此先感謝

+0

'python -V'和'pip -V'的輸出是什麼? –

回答

1

您是否習慣使用Python 2.7?它似乎要求您的打印語句使用Python 3.X語法,因此它可能是您嘗試使用的版本的問題?

BeautifulSoup 3.2.1只適用於Python 2.7(並且已經過時),如果你得到BeautifulSoup 4,它應該適用於兩個版本。

+0

我在python 3上運行。我嘗試安裝並重新安裝python。但由於一些奇怪的原因,我似乎無法安裝python 3. –

+0

我剛剛編輯了我的評論,但BeautifulSoup 3.2.1不應該工作Python 3 –

+0

感謝您的幫助。我現在設法下載它 –