Python3.7.7 環境構築

Tinker Board S(Debian)でPythonの最新環境(3.7.7)作成するとき、

./configure --enable-optimizationsをつけてコンパイルすると下記のエラーメッセージが出る。

error: the control flow of function ‘PyCurses_ConvertToString.isra.0’ does not match its profile data (counter ‘arcs’) [-Werror=coverage-mismatch]

検索すると、どうも--enable-optimizationsのオプションに問題があるようだ。

下記コマンドでPython3のinstallができる。

./configure --enable-shared LDFLAGS=-Wl,-rpath,

sudo make/make altinstall

sudo ln -fns /usr/local/bin/python3.7 python3

 あとは、pipやらvirtualenvして問題なし。

 

このサイトが参考になりました。ありがとうございます。

https://www.mk-mode.com/blog/2020/01/05/debian-10-python-3-7-installation-by-src/#