“ValueError: zero length field name in format” error in Python 3.0,3.1,3.2

后端 未结 3 598
情歌与酒
情歌与酒 2020-11-29 05:18

I\'m trying learn Python (3 to be more specific) and I\'m getting this error:

ValueError: zero length field name in format

I googled it and

3条回答
  •  一生所求
    2020-11-29 05:31

    If you're using Eclipse you should look into Window -> Preferences -> PyDev -> Interpreter - Python. There you have a list of interpreters (with name and location). If for your current project you're using interpreter which is located for example in /usr/bin/python then probably executing /usr/bin/python -V whill give you something like "Python 2.6.6". And there is your answer like Winston Ewert wrote.

    (you can add new interperter by simply clicking "New..." button and giving /usr/bin/python3 as "location". Then you have probably to change your project settings (Preferences -> PyDev - Interpreter/Grammar).

提交回复
热议问题