How can I add a default path to look for python script files in?

后端 未结 4 1119
醉话见心
醉话见心 2020-12-10 13:50

I\'ve always had a bit of trouble figuring out how to get Python set up properly in Windows.

I\'ve already set up path=%path%;C:\\python27 , so I\'m able to open .py

4条回答
  •  天命终不由人
    2020-12-10 14:35

    import sys
    sys.path.append(YOUR_PATH)  # or .insert(0, YOUR_PATH) may give higher priority
    

    or set your $PYTHONPATH environment variable

提交回复
热议问题