即使我將包安裝到項(xiàng)目解釋器(python文件的解釋器也設(shè)置為相同的環(huán)境),當(dāng)我嘗試導(dǎo)入epipy時(shí)Python拋出錯(cuò)誤嘗試使用絕對(duì)導(dǎo)入;從外延進(jìn)口 *嘗試導(dǎo)入特定函數(shù),例如從 epipy import case_tree嘗試卸載并重新安裝軟件包我的代碼:將熊貓導(dǎo)入為 pd進(jìn)口外延我希望導(dǎo)入沒有錯(cuò)誤的安裝包,收到以下錯(cuò)誤:/Users/Noelle/Python/stats/bin/python /Users/Noelle/Python/stats/basic_analytics.pyTraceback (most recent call last): File "/Users/Noelle/Python/stats/basic_analytics.py", line 2, in <module> import epipy File "/Users/Noelle/Python/stats/lib/python3.6/site-packages/epipy/__init__.py", line 5, in <module> from .analyses import generation_analysis, reproduction_number, create_2x2 File "/Users/Noelle/Python/stats/lib/python3.6/site-packages/epipy/analyses.py", line 88 print 'Summary of reproduction numbers' ^SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Summary of reproduction numbers')?進(jìn)程以退出代碼 1 結(jié)束
2 回答

至尊寶的傳說
TA貢獻(xiàn)1789條經(jīng)驗(yàn) 獲得超10個(gè)贊
該錯(cuò)誤是因?yàn)檎谡{(diào)用打?。?/p>
print'Summary of reproduction numbers'
代替:
print('Summary of reproduction numbers')
Python 3 打印語法與 Python 2 不同
編輯:這似乎是因?yàn)槟惭b的 Epipy 軟件包適用于 python 2 而不是 python 3
添加回答
舉報(bào)
0/150
提交
取消