./xx.py: line 1: import: command not found

后端 未结 6 1326
不知归路
不知归路 2020-12-03 13:32

I am trying to use this Python urllib2 Basic Auth Problem bit of code to download a webpage content from an URL which requires authentication. The code I am trying is:

6条回答
  •  [愿得一人]
    2020-12-03 14:15

    It's about Shebang

    #!usr/bin/python
    

    This will tell which interpreter to wake up to run the code written in file.

提交回复
热议问题