Problem with python

Mats Wichmann mats at wichmann.us
Sat Sep 4 14:38:20 EDT 2021


On 9/4/21 12:27 PM, Igor Korot wrote:
> Hi, ALL,
> 
> [code]
> igor at WaylandGnome ~/bakefile $ python
> Python 3.9.6 (default, Aug  8 2021, 17:26:32)
> [GCC 10.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from distutils import sysconfig
>>>> print sysconfig.get_python_inc()
>    File "<stdin>", line 1
>      print sysconfig.get_python_inc()
>            ^
> SyntaxError: invalid syntax
>>>>
> [/code]
> 
> What is the proper way to fix this?

print is a function in Python 3.

print(sysconfig.get_python_inc())

Try:

 >>> help(print)

for a quick check.



More information about the Python-list mailing list