2017-08-17 143 views
0

私はちょうどPython言語について知り始めました。私は基本を知っています。 nuitkaを使ってubuntuで小さなコマンドをコンパイルしようとすると、問題が見つかりました。Pythonのこのコンパイル(Nuitka)エラーを解決する方法

注:ここで使用しているPythonのバージョンは、Python 3.6 です。これは$ sample.py $です。

Print ("Hello user.") 

そして、ここで私は、コードをコンパイルするために使用されるコマンドラインです...

nuitka --recurse-on --python-version=3.6 sample.py 

私は、このコマンドを使用すると、私は出力としてこれを取得...

sample.build/CompiledAsyncgenType.c: In function 
‘Nuitka_Asyncgen_unwrap_value’: 
sample.build/CompiledAsyncgenType.c:994:9: warning: implicit declaration    
of function ‘_PyGen_SetStopIterationValue’ [-Wimplicit-function-declaration] 
    _PyGen_SetStopIterationValue(((_PyAsyncGenWrappedValue*)result)->agw_val);    

    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
sample.build/CompiledAsyncgenType.o: In function  
`Nuitka_Asyncgen_unwrap_value.isra.9': 
CompiledAsyncgenType.c:(.text+0x118c): undefined reference to  
`_PyGen_SetStopIterationValue' 
sample.build/CompiledAsyncgenType.o: In function 
`Nuitka_AsyncgenAsend_throw': 
CompiledAsyncgenType.c:(.text+0x2337): undefined reference to  
`_PyGen_SetStopIterationValue' 
sample.build/CompiledAsyncgenType.o: In function 
`Nuitka_AsyncgenAthrow_throw': 
CompiledAsyncgenType.c:(.text+0x295f): undefined reference to  
`_PyGen_SetStopIterationValue' 
sample.build/CompiledAsyncgenType.o: In function 
`Nuitka_AsyncgenAthrow_iternext': 
CompiledAsyncgenType.c:(.text+0x30e8): undefined reference to  
`_PyGen_SetStopIterationValue' 
sample.build/CompiledAsyncgenType.o: In function 
`Nuitka_AsyncgenAsend_tp_iternext': 
CompiledAsyncgenType.c:(.text+0x37b7): undefined reference to  
`_PyGen_SetStopIterationValue' 
sample.build/CompiledAsyncgenType.o:CompiledAsyncgenType.c:(.text+0x3fe7):  
more undefined references to `_PyGen_SetStopIterationValue' follow 
collect2: error: ld returned 1 exit status 
scons: *** [sample.exe] Error 1 

...

答えて

0

また、CPythonで障害が発生する2つの問題があります(参照実装指導)。

  1. 大文字で印刷P doesはPythonに組み込まれていません。組み込み関数 は、小文字のpで始まります。
  2. 1行のプログラムはインデントしないでください。
+0

あなたが言ったことを試した後に更新されます... –

関連する問題