laike9m / pdir2

Pretty dir() printing with joy:beer:
MIT License
1.33k stars 47 forks source link

运行 import pdir 的时候,报的错可以看下 #33

Closed tmpbook closed 6 years ago

tmpbook commented 6 years ago
(wechat) ➜  ~ python
Python 3.5.2 (default, Dec 22 2016, 15:41:29)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pdir
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/kevin/.pyenv/versions/wechat/lib/python3.5/site-packages/pdir/__init__.py", line 46
    print  '-' + attribute + '-'
             ^
SyntaxError: Missing parentheses in call to 'print'

可以看出,写法是Python2的

我的环境: 在虚拟环境中的Python,版本:3.5.2(安装pdir的过程中没出现任何问题)

laike9m commented 6 years ago

...这是个以前就有人遇到过的问题 原因是你装错库了,我的叫 pdir2

tmpbook commented 6 years ago

@laike9m 谢谢 🙄