[Core-X]pythonの状態

作業メモ

core-x においてpythonの仮想環境を(venv)を作ろうとする。
以下のエラーが出て失敗。

python -m venv venv
Error: Command '['/home/cvcln4/work/python/test01/venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

このエラー自体は –without-pip で解消出来るが、そもそもpip使えないの?
やりたいこととして、そこらのライブラリをpipでインストールすることを考えているため、ちと不便

そもそもpip自体がもともとあるのか確認

pip3 -version
-bash: pip3: コマンドが見つかりません

python --version
Python 3.6.8

あれ?Pythonのバージョンもちょっと古い?
古くてもそんなに困ることは無い(大したことするわけではない)が、一応上げておいたほうが良くないか?
と思い、pythonのソースコードをダウンロード、参照ページを参考にconfigure , make でエラーが出てくる。

非公式Pythonダウンロードリンク

...
/home/****/work/module_src/python_src/Python-3.8.13/Modules/_ctypes/_ctypes.c:107:10: 致命的エラー: ffi.h: No such file or directory
 #include <ffi.h>
          ^~~~~~~
コンパイルを停止しました。

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_gdbm                 _tkinter              nis                
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc                  atexit                pwd                
time                                                           


Failed to build these modules:
_ctypes                                                        

running build_scripts
…

あれ?ctypesとかってmysqlconectorとかで必要なやつじゃなかったけ?
うつろな覚えだが、ctypesが無くてなんかいろいろ引っかかったような覚えがあるから、結構大事なやつじゃないかと思える。

で、どうにかならないかとネットを検索、以下のページが参考になりそうだったので、今度やってみようと思う。

さくらレンタルサーバーに libffi をインストールする

コメントを残す

メールアドレスが公開されることはありません。