bash: syntax error near unexpected token `(' - Python

前端 未结 4 1571
野的像风
野的像风 2020-12-03 10:37
# from lxml import etree; 
import module2dbk; 
print module2dbk.xsl_transform(etree.parse(\'test-ccap/col10614/index.cnxml\'), []);

Error: bash: syntax error near u         


        
4条回答
  •  忘掉有多难
    2020-12-03 11:13

    add

    #!/usr/bin/env python
    

    or but i will prefer to use the above one.

    #!/usr/bin/python

    In case you have installed python 2 and python 3 and python 2 is default you can run python 3 by using these command

    #!/usr/bin/env python3
    

    at top of the file

    or run this way

    python code.py
    

提交回复
热议问题