Using multiple versions of Python

前端 未结 7 654
温柔的废话
温柔的废话 2020-12-06 10:25

I have both Python 3.3 and Python 2.7 installed on my computer. The python 3.3 works fine, but when I try to run something using python 2.7, it is still referencing python

7条回答
  •  生来不讨喜
    2020-12-06 10:52

    I received the same error when I was running my python file using python filename.py my PYTHONPATH was set to use python3

    I fixed it by using the below command to run my file

    python3 filename.py
    

提交回复
热议问题