LoginSignup
1
0

Debian12にpython2をインストール

Last updated at Posted at 2023-10-26

Debian12にpython2.7をインストールする方法

・経緯
1.ionicの古い動作環境を作ろうとnpm installを実行したところエラーが出た。
2.内容を見てみるとpython2を使っているぽいのでpython2をDebian12に入れる方法を調べてみたところ既にpython2はドロップされておりパッケージはない。
3.Docker使えばいいじゃんという意見もあるかと思うがとりあえずnpmでインストールしたかったのでpython2を入れてみる。

インストールする方法

1.python.orgに行く
2.DownloadメニューからSource Codeを選ぶ
3.python2.7.18あたりのZipped source tarballをダウンロードする
4.rootでinstall用ディレクトリにソースを展開する・・・
  tar xovfz Python-2.7.18.tgz
5.cd Python-2.7.17
  でディレクトリを移動
6.cmake環境ではないので
  ./configure で Makefileを生成する
7.make
  python2.7をコンパイル
8.make install
  でpython2.7をインストール


・追記
標準では入っていないので
apt-get install gcc make


ー 以上 ー

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0