- 投稿日:2019-06-25T23:36:12+09:00
SIGNATEにPytorchで初投稿【練習】
0 背景
CIFAR10で色々なことを体験し、92%になったところで、(別記事)
他のもので遊んでみようかと思います。
日本版kaggleとも言われている(?)SIGNATEのうち、learningにある分類問題はCIFAR10と同じ32×32の画像なので、以前の記事と同じようなネットワークでそのまま突っ込んでみました。
すると、いくつかの発見もあったので備忘録として残そうと思います。
あとSIGNATEに投稿したい私のような初心者のために。1 データのロードどうしよう
torchvisonが使えないやり方は知りませんでした。
調べたところ、pytorchのdatasetクラスを継承すると、Dataloaderが使えるのでやりやすいとのことで実践してみました。実際のコードは以下の通りです。
from PIL import Image import torchvision.transforms as transforms from torch.utils.data import Dataset transform = transforms.Compose( [transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]) class MyDataSet(Dataset): def __init__(self, csv_path, root_dir, transform): self.train_df = pd.read_csv(csv_path,skipinitialspace = True, delimiter = "\t") self.root_dir = root_dir self.images = os.listdir(self.root_dir) self.transform = transform def __len__(self): return len(self.images) def __getitem__(self, idx): # load pic image_name = self.images[idx] image = Image.open( os.path.join(self.root_dir, image_name) ) # label label = self.train_df.query('file_name=="'+image_name+'"')['label_id'].iloc[0] return self.transform(image), int(label)また、ロードする際には、
train_loader = torch.utils.data.DataLoader(train_set, batch_size=64, shuffle=True)としてやると、自前のデータセットからロードすることがきます。
2 提出用ファイル
提出するのは、testデータの各クラスの推論結果です。
提出用のsubmit.csvに推論結果を格納して保存していきます。import csv test_dir = "./test/" test_images = os.listdir(test_dir) with open("submit.csv", mode = "w") as f: f.write("") for test in test_images: image = Image.open( os.path.join(test_dir, test) ) image = transform(image) image = image.view(-1, 3, 32, 32) with torch.no_grad(): outputs = net(image) outputs = F.softmax(outputs, dim = 1) outputs = outputs.cpu().numpy().reshape(20) csvlist = [] csvlist.append(test) for i in range(len(outputs)): csvlist.append(outputs[i]) with open("submit.csv", "a") as f: writer = csv.writer(f) writer.writerow(csvlist)3 過学習を図るためのデータ
テストデータのラベルがないので、モデルが過学習しているかがわかりません。
そこで、traindataをさらに分割し、過学習の度合いをはかりましょう。
Pytorchでは割と簡単にできてしまいます。trainval_set = MyDataSet('train_master.tsv', './train/', transform) train_set, test_set = torch.utils.data.random_split(trainval_set, [42000, 8000]) train_loader = torch.utils.data.DataLoader(train_set, batch_size=64, shuffle=True) test_loader = torch.utils.data.DataLoader(test_set, batch_size=512, shuffle=True)おわりに
以上のような形でSIGNATEに投稿することができました。
- 投稿日:2019-06-25T23:30:01+09:00
JupyterのTracebackを見やすくする
better-exceptionsを jupyter でも
この記事は何?
jupyerでバッチコードも書くアナタ、pdbを起動させるのがかったるいアナタにオススメします。ExceptionでTracebackが起動すると前後の変数を出力しておいてくれる優れモノのモジュール「better-exceptions」をjupyterでも使えるようにするHackです。
イントロ
「PythonのException発生時のTracebackを綺麗に見る」
元記事は、Twitter:@vaaaaanquish氏の上記記事で、Traceback周りのモジュール紹介してくれています。大変秀逸な記事です。氏はその中で様々な機能拡張がコメントされていますが、そこはかとなくオススメされていた「better-exception」は、Traceback停止時に、変数の内容を一緒に表示してくれる優れモノ。
こりゃjupyterでも使いたいと思い、アレコレ試したところjupyterでも使えるようになったので、ノウハウとして投稿することにしました。
モジュール作者はQixさん(githubはこちら)
リポジトリのREADME.mdにある紹介画像を下に引用します。
元々はシェルやREPL環境用
IDE環境がある人はそれでできている機能ですが、何かの理由でシェルやREPL環境用で実行してTracebackが発生した際には、パッとデバッグできないのが厄介。better_exceptionsがインポートしてあれば、業務は劇的に向上します。
better-exceptionsの使い方
インストール
まだ、未インストールの方はインストールをしてください
pip install better_exceptionsまた、REPLやシェルでも使う方は環境変数を設定すると幸せになれるかも
export BETTER_EXCEPTIONS=1 # Linux / OSXPython REPL (インタラクティブ・シェル)に入って使う
下記のように起動コマンドでーmオプションを使ってbetter-exceptionsモジュールをしています。
$ python -m better_exceptions Type "help", "copyright", "credits" or "license" for more information. (BetterExceptionsConsole) >>>jupyterでもbetter-exceptionsを使う
jupyter用の設定ファイルをipythonのスタートアップパスにおきます。
ipythonのスタートアップパス
$HOME/.ipython/profile_default/startup/00-better_exceptions.pyjupyter用設定ファイル ↓↓↓↓↓
00-better_exceptions.pyimport sys try: import better_exceptions except ImportError: better_exceptions = None def exception_thunk(exc_tuple=None, filename=None, tb_offset=None, exception_only=False, **kwargs): new_exc_tuple = exc_tuple or sys.exc_info() if not isinstance(new_exc_tuple[0], SyntaxError): return print(better_exceptions.format_exception(*new_exc_tuple)) else: return old_show_tb(exc_tuple, filename, tb_offset, exception_only) if better_exceptions: ip = get_ipython() old_show_tb = ip.showtraceback ip.showtraceback = exception_thunk実行例
githubのテストスクリプトによる実行例(意図的に例外を発生させるコード)
コード中にあるようにbetter_exceptions.MAX_LENGTHで出力する文字数(水色)を調整できます。
本当に便利(マジで関心しています)。
実は正式採用にはなっていない
上の'00-better...'ファイルは未だリポジトリには正式採用されていません。github上のissue ipython support#10 の中でユーザ同士の提案で出てきたコードです。その中から良さげなものをピックしました。pdbとも上手く同居できるようです(当方はまだ試していません)。
https://github.com/Qix-/better-exceptions/issues/10良い jupyter生活を!
- 投稿日:2019-06-25T22:02:50+09:00
【IBM Watson Studio】クラウド上に無料でJupyter Notebook環境を作る方法
皆さん、こんにちは。戸倉彩です。
「IBM Watson」 は、IBM Cloud の機能の一つとして提供されており、 IBM Cloud アカウントを持っていれば誰でも手軽に利用することが可能です。今回は、IBM Cloudのアカウント取得からIBM Watson Studio 上で「Jupyter Notebook」 環境を作成する方法の流れについてご紹介いたします。
1. IBM Cloud とは
IBM社が運用し、提供しているパブリッククラウドサービスのことです。詳細については、ここでは割愛させていただきます。
■ IBM Cloud 公式サイト
https://www.ibm.com/jp-ja/cloud2. IBM Cloud のアカウントの種類について
IBM Cloud を利用するためにはアカウント登録が必要です。現在、3つのアカウントプランのタイプががあります。無料で利用できるアカウントは 「ライト・アカウント」 と呼ばれています。無料の範囲で、無期限にサービスを利用することができるので、ちょっとした検証や学習に役立ちます。
※最新情報や詳細については公式サイトをご確認ください。3. 必要なシステム環境
IBM Cloud アカウント登録は、すべてWebブラウザから行うことが可能です。公式サイトでは、IBM Cloudのソフトウェア要件として代表的なブラウザの最新バージョンと記載されていましたが、ワタシの手元のWindows 10 の環境でMicrosoft Edgeや別のブラウザからもアクセスできましたので、試してみてください。
* Mozilla Firefox Extended Support Release(ESR) 38(最新バージョン)
* Windows Internet Explorer バージョン10、11
* Safari(Mac用最新バージョン)
* Google Chrome(最新バージョン)4. メールアドレス一つで登録できる無料アカウント登録の手順
手元に登録用のメールアドレスを用意して次の操作を行なってください。電話認証やクレジットカード登録は不要となるため学生さんでも利用可能です。
1. IBM Cloudアカウント登録 サイトへアクセスし、「フリー・アカウントの作成」ボタンをクリックする。
2. アカウントに紐づける必要項目を入力し、「アカウントの作成」ボタンをクリックして次に進む。
➀ Eメール* (登録したいメールアドレス)
➁ 名前* (平仮名、カタカナ、アルファベットOK)
➂ 姓* (平仮名、カタカナ、アルファベットOK)
➃ 会社名
➄ 国または地域* (日本を選択する)
➅ パスワード* (大文字、小文字、数字、記号すべて1つ以上を含めた8文字以上を入力する)
※ * は入力必須項目です。
※サービスの特性上、氏名や会社名はアルファベットで登録しておくことをお勧めします。
3. ボットではなく人間が操作していることを reCAPTCHA とよばれている仕掛けを操作して証明する。
(1) 自動的にポップアップ画像が表示される
(2) 指示された画像をすべてクリックして選択する (例えば、今回は「お店の外観」と表示されているので、お店と思われる画像を選択します。表示される画像はその都度異なります。)
(3) 選択したタイルの上に✓マークが表示されることを確認する
(4)「確認」ボタンをクリックして次に進む
4. 「ありがとうございます」画面が表示される。
5. 必要に応じて下記のメールを受信できるように設定しておき、メールを受信したら内容を確認して「Confirm Account」ボタンをクリックする。
・メール送信元: IBM Cloud (no-reply@bluemix.net)
・メール件名: Action required: Confirm your IBM Cloud account
6. 「成功しました!」画面が表示され登録完了する。
所要時間はわずか数分でアカウント登録を完了させることができます。
5. IBM Watson 上でJupyter Notebookを作成する
- IBM Cloud サイトにアクセスし、「Login」 ボタンをクリックしてログインする。
- 「カタログ」 をクリックする。
![]()
- 左メニュー「AI」 → 「Watson Studio」 をクリックする。
![]()
- 「サービス名」 に任意のサービス名、今回はデプロイする地域/ロケーションは「ダラス」のまま右下の 「作成」 ボタンをクリックする。
![]()
- 「Get Started」 をクリックして、Watson Studioを起動する。
![]()
- 「サービス名」 に任意のサービス名を入力し、今回はデプロイする地域/ロケーションは「ダラス」が選択されているままの状態で画面下の「作成」ボタンをクリックする。
- ログインに成功すると 「IBM Watson Studio」 のWelcome画面が表示される。「Create a project」ボタンをクリックしてプロジェクトを新規作成を行う。
![]()
- 「Data Science and AutoAI」 にカーソルを合わせ 「Create Project」 をクリックしてプロジェクトを作成する。
![]()
- 「Select a region for Machine Learning (機械学習サービスを利用するための地域の選択)」 画面が表示されたら、今回は 「US South」 を選択し、「Select」ボタンで次に進む。
- 「New project」 画面の 「Name」 には任意のプロジェクト名、「Description」には任意の説明情報を入力し、画面右下の 「Create」 ボタンをクリックする。
※ 「Restrict who can be a collaborator」 (共同編集者になれる人を制限する) チェックボックにチェックが入っていない場合には、チェックを追加する。
※右側の 「Storage」 欄にcloud-object-storage-xxxなどがあらかじめ入力されていることも合わせて確認してください。無い場合には、 「Add」 ボタンで手動で画面に従って無料プラン(Free)のstorage(ストレージ)を作成してください。
![]()
- プロジェクト作成が完了したら、右上の 「Add to project」 ボタンをクリックする。
![]()
- 「notebook」 を選択する。
![]()
- 「New notebook」 画面で「Name」には任意の名前を入力し、今回はデフォルトの 「Default Python 3.5 XS (2 vCPU and 8GB RAM)」 のまま 「Create Notebook」 ボタンをクリックして作成する。
- 少しすると指定した名前のJupyter Notebookが作成され表示される。
![]()
- 動作を確認する場合は、例えばボックスに 1+1 と入力して 「Run」 アイコンをクリックして次の行に 2 と表示されればOKです。
![]()
作成方法は以上となります。スムーズに操作できた方が多いのではないでしょうか。ここからは、自由にJupyter Notebookを使っていろいろ試してみてください。
Have a nice Geek Life♪
※Twitterで最新情報配信中 @ayatokura
- 投稿日:2019-06-25T21:46:27+09:00
Python と機械学習を学びたい人に送る(2ヶ月有給プラン)
以下のような方に向けた記事となっています。
- Pythonも機械学習も初心者。
- 早く学びたいけど、どう勉強したら良いのか分からない。当時「右も左も分からなかった自分」のような人の道しるべになれれば幸いです。
1. 初心者時代
PyQ
PyQ は、Pythonの「基礎」から「機械学習のコードを書く」まで幅広く学習できる環境となっています。
料金も以下のようになっており、良心的です ♬
参考書一冊買うつもりで、1ヶ月短期で集中してやってみるのをおすすめします。個人ライトプラン ¥2980(税込)/月
個人スタンダードプラン ¥7980(税込)/月※ 個人スタンダードプランはPython学習サポートがあるため、大変便利なのですが、まずはライトプランで初めてみても問題ないと思います。
Progate
Progate は、基礎をビジュアルを通じて学習できるため、非常に分かりやすい。
スマホからでも使用できるので、通勤時間を利用して学ぶと非常に効率的です。何よりも、可愛いキャラクターが教えてくれるので、捗ります。
簿記の勉強でお世話になったパブロフ君を思い出します。
絵でわかる人工知能
以下に当てはまる方に最適な一冊。
- 機械学習、人工知能をざっくりと理解したい方。
- ここまで来て、急に興味が薄れてしまった方。
興味を持つことも大事ですので、機械学習や人工知能がどのようなものなのかを分かった気になることも大事です。もし、ここに来て、やる気を失ってしまった方は、この本で興味を復活させましょう。2. 初心者から脱出したい
Kaggle
勿論実践無くしては実力も付かないため、実践には有名な「Kaggle」をオススメします。
難易度も多々用意されているため、自分にあった難易度で挑戦してみると良いと思います。最初は何をして良いのか全く分からない。という方は以下を繰り返していくうち、少しずつ力が付いてくると思います。
- 他の方のカーネルを見て何をしているのか理解する。
- カーネルをフォークして、少し自分なりの工夫を加えてみる。
- 1 に戻る。
Pythonではじめる機械学習
Kaggleで行き詰まった時には、この参考書をおすすめいたします。
助けになってくれる一冊になってくれます。
「つまづいた問題」 → 「解決法」
といった作りになっているため、つまづいた内容を元に探していけば、もしかしたら解決策が見つかるかもしれません。
3. 色々出来るようになって楽しくなってきた頃?
Python 機械学習プログラミング 達人データサイエンティストによる理論と実践
ここまで来たら、理論も理解しておきましょう。
「そのモデルはどういうモデルなのか」
「どのようなデータに対して、上手く作動するのか、失敗するのか」
を知るためには、やはり理論を知っておく必要があります。勿論、上部だけの理解でも良いという方には必要ないのかもしれません。
ただ、もしあと一歩踏み出して、他の人と差別化をはかりたいという方は是非とも挑戦してみてください。
- 投稿日:2019-06-25T21:34:00+09:00
OSM データを NetworkX へ取り込んで最短経路計算(osm.pbf 形式)
こんにちは。
「OSM データを NetworkX へ取り込んで最短経路計算」の続編として、osm.pbf 形式ファイルを取り込んでみました(pyosmium 利用)。動作例は高速道路利用(=motorway)で Kagoshima, Aomori 間の最短経路です(図例内の黄色線)。なお、osmupdate、osmium-tool も利用しました。
$ wget https://download.geofabrik.de/asia/japan.poly $ wget https://download.geofabrik.de/asia/japan-latest.osm.pbf $ osmupdate -B=japan.poly japan-latest.osm.pbf japan-latest-updated.osm.pbf $ mv -f japan-latest-updated.osm.pbf japan-latest.osm.pbf $ osmium tags-filter -o japan-motorway.osm.pbf japan-latest.osm.pbf w/highway=motorway,motorway_link $ ./osmpbf2nx.py japan-motorway.osm.pbf > motorway.htmlosmpbf2nx.py#!/usr/bin/env python3 # -*- coding: utf-8 -*- import math import osmium as o import networkx as nx import geoleaflet import geojson RE = 6378137.0 # GRS80 FE = 1/298.257223563 # IS-GPS E2 = FE * (2 - FE) DEGREE = math.pi / 180 ONEWAY = 1 BIDIRECTIONAL = 0 class OsmHandler(o.SimpleHandler): def __init__(self): super(OsmHandler, self).__init__() self.graph = None self.nodes = {} self.ways = {ONEWAY: {}, BIDIRECTIONAL: {}} def node(self, n): self.nodes[n.id] = [n.location.lon, n.location.lat] def way(self, w): highway = w.tags.get('highway') if highway in ['motorway', 'motorway_link'] and w.tags.get('moped') != 'yes': nodes = [n.ref for n in w.nodes] oneway = wayDirection(w.tags.get('oneway')) if oneway == -ONEWAY: oneway = ONEWAY nodes = nodes[::-1] self.ways[oneway][w.id] = {'nodes': nodes, 'highway': highway} def split_way(self): node_hist = {} for ways in self.ways.values(): for way in ways.values(): for node in way['nodes']: node_hist.setdefault(node, 0) node_hist[node] += 1 for oneway, ways in self.ways.items(): for id, way in ways.items(): self.ways[oneway][id]['nodes'] = split_nodes(way['nodes'], node_hist) def geojson_features(self, route): feas = [] for ways in self.ways.values(): nodes = [concat_nodes(way['nodes']) for way in ways.values()] paths = [[self.nodes[n] for n in ns] for ns in nodes] feas.extend([(geojson.LineString(p), {"color":"#40a040", "weight": 1.5, "opacity": 0.7}) for p in paths]) path = [self.nodes[n] for n in route] feas.append((geojson.LineString(path), {"color":"#ffe000", "weight": 8, "opacity": 0.5})) feas = [geojson.Feature(geometry=g, properties=p) for g, p in feas] return geojson.FeatureCollection(feas) def distance(self, u, v): p, q = self.nodes[u], self.nodes[v] coslat = math.cos((p[1]+q[1])/2*DEGREE) w2 = 1 / (1 - E2 * (1 - coslat * coslat)) dx = (p[0]-q[0]) * coslat dy = (p[1]-q[1]) * w2 * (1 - E2) return math.sqrt((dx*dx+dy*dy)*w2) * RE * DEGREE def routing(self, source, target): route = nx.astar_path(self.graph, source, target, heuristic=self.distance, weight='length') route = [self.graph.edges[route[i], route[i+1]]['nodes'] for i in range(len(route)-1)] return concat_nodes(route) def createGraph(self): self.graph = nx.DiGraph() for oneway, ways in self.ways.items(): for way in ways.values(): for nodes in way['nodes']: length = path_length(nodes, self.distance) self.graph.add_edge(nodes[0], nodes[-1], nodes=nodes, length=length) if oneway == BIDIRECTIONAL: self.graph.add_edge(nodes[-1], nodes[0], nodes=nodes[::-1], length=length) def path_length(path, dist): return sum([dist(path[i], path[i+1]) for i in range(len(path)-1)]) def wayDirection(oneway): if oneway in [None, 'no', 'false', '0', 'reversible']: return BIDIRECTIONAL if oneway in ['reverse', '-1']: return -ONEWAY else: return ONEWAY def split_nodes(arr, dividers): i = 0 arrs = [] for j in range(1, len(arr)-1): if dividers[arr[j]] >= 2: arrs.append(arr[i:j+1]) i = j arrs.append(arr[i:len(arr)]) return arrs def concat_nodes(nodes_list): nodes = [nodes_list[0][0]] for ns in nodes_list: nodes.extend(ns[1:]) return nodes def OSM(file): o = OsmHandler() o.apply_file(file, locations=False) o.split_way() o.createGraph() return o def htmlLeaflet(features): MAXZOOM = 19 CD_STYLE = ('light_nolabels') CD_URL = 'http://{s}.basemaps.cartocdn.com/{style}/{z}/{x}/{y}.png' CD_ATTR = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>' html = geoleaflet.html(features, service=CD_URL, attribution=CD_ATTR, style=CD_STYLE, maxzoom=MAXZOOM) return html if __name__ == '__main__': import sys osmfile = sys.args[1] source, target = 1928135161, 3749182296 # Kagoshima, Aomori o = OSM(osmfile) route = o.routing(source, target) feas = o.geojson_features(route) print(htmlLeaflet(feas))
- 投稿日:2019-06-25T21:32:11+09:00
Pythonista3 for iphoneを使って簡単ssh port fowarding
用意するもの
- sshサーバー
- iphone
- Pythonista3(IOS)
鍵の準備
RSA暗号で秘密鍵と公開鍵を作成します。Ed25519は非対応なので必ずRSA暗号で鍵を作ってください!!PythonistaにStaShが入っていない場合はインストールして下さい。StaShで次のコマンドを実行します。
$ ssh-keygen -t rsa -b 4096"~/.ssh/"にid_rsa(秘密鍵)とid_rsa.pub(公開鍵)が生成されるはずです。作れたら公開鍵をsshサーバーに追加しておいて下さい。
sshtunnelのインストール
Pythonで作成されたsshtunnelというPort Fowardingが簡単にできるモジュールがあります。StaShで次のコマンドを実行してインストールします。
$ pip install sshtunnelここで、sshtunnelを少し修正します。sshtunnelはparamikoというモジュールに依存しているのですが、バージョンの食い違いでそのまま使うとエラーが出ます。PythonistaメニューのPython Modulesからsshtunnel.pyを探し出して次のように修正します。
1021> if host_pkey_directories is not None: 1022> paramiko_key_types = {'rsa': paramiko.RSAKey, 1023> 'dsa': paramiko.DSSKey, 1024>-'ecdsa': paramiko.ECDSAKey, 1025>-'ed25519': paramiko.Ed25519Key} 1024>+'ecdsa': paramiko.ECDSAKey} ... 1215> for pkey_class in (key_type,) if key_type else ( 1216> paramiko.RSAKey, 1217> paramiko.DSSKey, 1218>- paramiko.ECDSAKey, 1219>- paramiko.Ed25519Key 1218>+ paramiko.ECDSAKey 1220> ):-の行を消して+の行を追加して下さい。
プログラムの作成
sshtunnelを使ってポート転送するプログラムを書きます。
from sshtunnel import SSHTunnelForwarder server = SSHTunnelForwarder( ('sshサーバーアドレス', sshサーバーポート), ssh_username='ユーザー名', ssh_pkey='秘密鍵の場所', remote_bind_address=('リモート側アドレス', リモート側ポート), local_bind_address=('ローカル側アドレス', ローカル側ポート) ) server.start() input() server.stop()例えば次のように作成します。
from sshtunnel import SSHTunnelForwarder server = SSHTunnelForwarder( ('server_ip', 22), ssh_username='user', ssh_pkey='~/.ssh/id_rsa', remote_bind_address=('127.0.0.1', 8000), local_bind_address=('127.0.0.1', 8000) ) server.start() input() server.stop()適当な場所にこのコードを作成して実行すればポート転送出来ます(iphoneの仕様上、バックグラウンドで動作するのは10分間だそうです)。Pythonistaは作成したプログラムのショートカットをホーム画面に追加する機能があります。作成しておけばワンクリックで実行できます。
- 投稿日:2019-06-25T21:29:39+09:00
Pythonで「切り捨て可能素数日」を求めたら日は暮れなかった
はじめに
Pythonで「素数日」を求めたら処理が長すぎて日が暮れそうになったの記事から引き続き、Pythonの練習。
前回は8桁表示が素数になる「素数日」をPythonで求めました(コメント/いいねくださった方ありがとうございます)2019年5月23日は素数日(20190523:素数)ですが、この素数には面白い性質があります。
- 20190523 :素数
- __190523 :素数
- ___90523 :素数
- _____523 :素数
- ______23:素数
- _______3:素数
このように左から順に数字を取り除いていったときにそのすべての数が素数になります。
※取り除いた結果最上位桁が0の場合はスキップする
このような数を切り捨て可能素数と言います。
すいません嘘です。上記Wikipediaには、それ自身が素数であるとともに、左から数字を順に取り除いたものが全て素数であり、さらにどの桁も 0 ではないものをいう。
と定義されているので、切り捨て可能素数の亜種ということになります。
今回は「素数日」のうち、切り捨て可能素数(0を含んでもOK)な「切り捨て可能素数日」をPythonで求めてみます。準備
8桁の数を左から切り取って素数判定していくのは多分とてもしんどいので、1桁の素数の左に数を付け加えていって
素数判定を繰り返す方針で行きます。付け加えられる数の候補は各桁で制限されるので、計算量削減のためこれも考慮に入れます。
- 1桁目(日):
[3, 7]
(2,5は素数だが、2桁以上のときそれぞれ2の倍数と5の倍数になる 0の場合も2桁以上で2の倍数)- 2桁目(日):
[0, 1, 2]
(1桁目に0と1がこないので、3は取り得ない)- 3桁目(月):
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- 4桁目(月):
[1]
(2桁目が0のとき 10月のみ)[0,1]
(2桁目が1か2のとき 1月/2月/11月/12月)[0]
(それ以外)- 5~8桁目(年):
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
これらの桁に対する入力制限のリストを生成する関数を定義しておきます。
digit_num = {} def DigitNum(i,j): if i == 1: digit_num[i] = [0, 1, 2] elif i == 3: if j == 1 or j == 2: digit_num[i] = [0,1] else: digit_num[i] = [0] else: digit_num[i] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
i
が桁数、j
が一桁前の数になります。
1桁目は簡単なのでコード中にそのまま書きます。
4桁目(i=3)で3桁目が0のときの処理が抜けてますが、どうしてもこの関数に組み込む方法が思いつかなかったので、
コード中の条件分岐で別途生成します。次に、素数の判定をする関数を作ります。
前回記事のコメントで素数判定アルゴリズムや内包表記を教えていただきました。
が、まだ使いこなせるほど理解できていないので、とりあえず思いつくままに書いてみたものになります。def PrimeCheck(num): for i in range(3, int(math.sqrt(num))+1, 2): #平方根まで調べれば良いと教えていただきました そらそうだわ if num % i == 0: return 0 break else: if i == int(math.sqrt(num)) or i == int(math.sqrt(num))-1: return 1 else: continue実装したコード
import math prime = {} for i in range(1, 8): #切り取り可能素数日を各桁ごとに格納する prime[i] = [] digit_num = {} prime[0] = [3, 7] #1桁目候補 def DigitNum(i,j): if i == 1: digit_num[i] = [0, 1, 2] elif i == 3: if j == 1 or j == 2: digit_num[i] = [0,1] else: digit_num[i] = [0] else: digit_num[i] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] def PrimeCheck(num): for i in range(3, int(math.sqrt(num))+1, 2): if num % i == 0: return 0 break else: if i == int(math.sqrt(num)) or i == int(math.sqrt(num))-1: return 1 else: continue for i in range(1,8): for j in prime[i-1]: if i == 3 and len(str(j)) <= 2: #4桁目候補の数を生成 digit_num[i] = [1] else: DigitNum(i,int(str(j)[0])) for k in digit_num[i]: if k == 0: #付け加えた数が0のときの処理 prime[i].append(j) else: date = k*(10**i) + j if PrimeCheck(date) == 1: prime[i].append(date) else: continue prime[7].sort() zerofill_prime = [] for i in prime[7]: zerofill_prime.append(str(i).zfill(8)) print('西暦0年~9999年のうち切り取り可能素数日は' + str(len(zerofill_prime)) + '日') print(zerofill_prime)上記コードを実行すると、今回は1秒ほどで結果が帰ってきました。
西暦0年~9999年のうち切り取り可能素数日は832日 ['00000103', '00000107', '00000113', '00000223', '00000307', '00000313', '00000317', '00000503', '00000523', '00000607', '00000613', '00000617', '00000823', '00000907', '00001013', '00001103', '00001223', '00010103', '00010223', '00010313'] ['00010607', '00010613', '00020107', '00020113', '00021013', '00030103', '00030113', '00030223', '00030307', '00030313', '00031013', '00031223', '00040823', '00050503', '00060103', '00060107', '00060223', '00060317', '00060607', '00060617'] ['00061223', '00070223', '00070313', '00070607', '00070823', '00080107', '00080317', '00081013', '00081223', '00090107', '00090313', '00090523', '00090617', '00090823', '00090907', '00100103', '00100313', '00100523', '00100613', '00100823'] ['00100907', '00121013', '00130223', '00130307', '00150503', '00180317', '00190313', '00190523', '00190823', '00231223', '00260317', '00261223', '00270223', '00290107', '00290617', '00300317', '00300823', '00301013', '00310223', '00310313'] ['00320107', '00320113', '00330103', '00330313', '00331013', '00350503', '00360223', '00360317', '00361223', '00381223', '00390107', '00400307', '00400313', '00400523', '00400607', '00400823', '00450503', '00480107', '00480317', '00490313'] ['00500107', '00500113', '00500317', '00501013', '00501103', '00501223', '00510613', '00540823', '00560107', '00560317', '00560617', '00600307', '00600317', '00600823', '00621013', '00630307', '00631013', '00631223', '00660103', '00660607'] ['00660617', '00670223', '00670823', '00680107', '00700103', '00700223', '00700307', '00700523', '00700907', '00721013', '00760103', '00760607', '00790523', '00800113', '00801103', '00810223', '00840823', '00860107', '00860317', '00870223'] ['00870823', '00890107', '00900103', '00900307', '00900607', '00901013', '00910103', '00920107', '00921013', '00930113', '00931013', '00970313', '00980107', '00990313', '00990523', '01000313', '01000907', '01020113', '01030307', '01050503'] ['01060223', '01260317', '01261223', '01320107', '01320113', '01330103', '01330313', '01360223', '01500113', '01501223', '01540823', '01660103', '01870223', '01890107', '01900607', '01921013', '01990523', '02000107', '02000113', '02000503'] ['02010103', '02031223', '02070823', '02100313', '02100523', '02130307', '02190523', '02190823', '02300317', '02310223', '02600317', '02670223', '02721013', '02930113', '02970313', '03000103', '03000223', '03000317', '03000523', '03000607'] ['03000617', '03001223', '03010313', '03030113', '03040823', '03060107', '03080107', '03081223', '03090313', '03090523', '03100313', '03260317', '03290107', '03300823', '03360223', '03381223', '03400823', '03510613', '03560107', '03600307'] ['03660607', '03660617', '03700523', '03760103', '03800113', '03860107', '03860317', '03900307', '03901013', '03970313', '04000523', '04000823', '04000907', '04021013', '04050503', '04081013', '04090907', '04260317', '04261223', '04270223'] ['04290107', '04300823', '04330103', '04350503', '04500317', '04501223', '04800113', '04900307', '04990313', '05000113', '05000503', '05010613', '05060317', '05060617', '05070223', '05070823', '05310313', '05400523', '05400823', '05450503'] ['05490313', '05631013', '05670823', '05700307', '05721013', '05760103', '06000103', '06000307', '06000317', '06000503', '06000823', '06001013', '06030103', '06030113', '06030313', '06050503', '06070223', '06070313', '06081013', '06090523'] ['06090823', '06100613', '06100823', '06100907', '06150503', '06190313', '06190823', '06231223', '06290617', '06300823', '06320113', '06360317', '06390107', '06400607', '06450503', '06480107', '06490313', '06500113', '06500317', '06510613'] ['06600823', '06631223', '06660103', '06790523', '06800113', '06860317', '06910103', '06930113', '06931013', '07000313', '07000523', '07020107', '07020113', '07030313', '07060223', '07080107', '07080317', '07500113', '07501103', '07540823'] ['07560107', '07660607', '07800113', '07810223', '07840823', '07860107', '07870823', '07900103', '07921013', '08010313', '08060317', '08061223', '08090107', '08121013', '08150503', '08190823', '08300317', '08400823', '08480107', '08760607'] ['08910103', '09000223', '09000317', '09000907', '09010103', '09020107', '09020113', '09030313', '09060223', '09060607', '09060617', '09061223', '09070223', '09080107', '09081223', '09100103', '09100313', '09100523', '09100613', '09330103'] ['09331013', '09360317', '09400823', '09500107', '09500317', '09501013', '09660617', '09670223', '09670823', '09700307', '09700907', '09721013', '09800113', '09980107', '10000103', '10000223', '10020107', '10030103', '10030313', '10080107'] ['10081013', '10081223', '10090313', '10090523', '10090823', '10260317', '10290617', '10320113', '10350503', '10381223', '10500107', '10501013', '10560317', '10560617', '10810223', '10870823', '10900103', '12310223', '12670223', '13081223'] ['13360223', '13800113', '15310313', '15400523', '15490313', '15631013', '15760103', '16000307', '16320113', '16660103', '16860317', '18010313', '18061223', '19080107', '20000107', '20000503', '20010223', '20010313', '20031223', '20060107'] ['20070823', '20100907', '20130223', '20190523', '20190823', '20300317', '20360317', '20400307', '20400823', '20480107', '20600317', '20660617', '20700103', '20700223', '20700307', '20700523', '20721013', '20910103', '20930113', '21000313'] ['21000907', '21050503', '21320107', '21330313', '21360223', '21870223', '21890107', '21990523', '23000617', '23010313', '23100313', '23970313', '24021013', '24050503', '24090907', '24270223', '24350503', '24501223', '24900307', '26001013'] ['26070313', '26150503', '26190313', '26931013', '27020113', '27080107', '29331013', '30000307', '30000317', '30010103', '30030307', '30031223', '30061223', '30070823', '30080107', '30080317', '30090107', '30090617', '30301013', '30360223'] ['30400523', '30450503', '30500317', '30501223', '30560617', '30630307', '30660103', '30670823', '30680107', '30800113', '30810223', '30870223', '30890107', '30900607', '30921013', '30990313', '30990523', '31000313', '31060223', '31500113'] ['31540823', '31921013', '32000113', '32190523', '32970313', '33000103', '33000223', '33060107', '33100313', '33290107', '33300823', '33381223', '33400823', '33510613', '33660607', '33901013', '34000907', '34081013', '34090907', '34330103'] ['34501223', '34990313', '35060317', '35070823', '36000317', '36000823', '36100613', '36100907', '36190313', '36450503', '36480107', '36510613', '36631223', '37860107', '37870823', '38480107', '38910103', '39000223', '39060607', '39070223'] ['39660617', '39670823', '40000223', '40000313', '40000523', '40030103', '40030313', '40080107', '40080317', '40320113', '40330313', '40500107', '40540823', '40800113', '40920107', '42000107', '42000503', '42070823', '42190523', '42930113'] ['42970313', '43000523', '43081223', '43381223', '43510613', '43560107', '43860317', '45700307', '45760103', '46000103', '46000307', '46290617', '46500317', '48121013', '48190823', '48400823', '49000223', '49020113', '49080107', '49501013'] ['50000617', '50010313', '50031013', '50060107', '50061223', '50070607', '50100907', '50130307', '50400307', '50400607', '50450503', '50670223', '51260317', '51360223', '51501223', '51890107', '53700523', '53901013', '54021013', '54260317'] ['54330103', '54800113', '56390107', '56480107', '57000523', '57030313', '57660607', '57860107', '57900103', '57921013', '59010103', '59670223', '59700307', '60000103', '60000113', '60000313', '60000607', '60001223', '60060103', '60060223'] ['60070607', '60081223', '60090313', '60100823', '60100907', '60290617', '60320107', '60350503', '60400313', '60501223', '60600307', '60670223', '60670823', '60680107', '60700223', '60900607', '60920107', '60930113', '61500113', '61660103'] ['61870223', '62000503', '62010103', '62190523', '62721013', '63000103', '63081223', '63090523', '63290107', '63360223', '63381223', '63660617', '64000907', '64990313', '65310313', '65670823', '65700307', '66100613', '66100823', '66190823'] ['66360317', '66600823', '66631223', '66660103', '66860317', '66931013', '67000523', '67080107', '67870823', '68061223', '68121013', '68150503', '68190823', '68400823', '69070223', '69081223', '69100523', '69500107', '69700907', '69980107'] ['70000103', '70000613', '70000823', '70030313', '70050503', '70080317', '70090313', '70090523', '70270223', '70290107', '70300823', '70330313', '70540823', '70621013', '70660103', '70680107', '70800113', '70860107', '70990313', '72000503'] ['72190523', '72600317', '72721013', '73000607', '73860317', '75000113', '75000503', '75060617', '75070823', '75400823', '75760103', '76030313', '76081013', '76090823', '76500113', '76860317', '78010313', '78060317', '78061223', '78121013'] ['78910103', '79000907', '79060607', '79501013', '80000617', '80010607', '80030113', '80040823', '80070223', '80090107', '80090617', '80400823', '80631013', '80700523', '80760103', '80970313', '81330313', '81870223', '83000317', '83010313'] ['83030113', '83040823', '84000823', '84050503', '84081013', '84260317', '84261223', '86070223', '86100613', '86100823', '86450503', '87000313', '87020107', '87030313', '87501103', '87810223', '87870823', '87921013', '89061223', '89100313'] ['89360317', '89660617', '90000103', '90000107', '90000607', '90001013', '90010103', '90010313', '90020107', '90021013', '90030223', '90050503', '90060107', '90060317', '90070313', '90080317', '90090823', '90100103', '90121013', '90190523'] ['90270223', '90400307', '90480107', '90510613', '90540823', '90560317', '90631223', '90660617', '90700223', '90801103', '90920107', '90921013', '91000313', '91060223', '91260317', '91360223', '91921013', '92190523', '92190823', '92310223'] ['92930113', '92970313', '93000317', '93290107', '93560107', '93600307', '93660607', '93660617', '93860317', '94000523', '94260317', '94270223', '94300823', '95070223', '95631013', '95700307', '96001013', '96090823', '96150503', '96190313'] ['96300823', '96480107', '96910103', '97020107', '97080107', '97860107', '98910103', '99010103', '99081223', '99331013', '99670223', '99700907']というわけで、次の切り取り可能素数日は2019年8月23日だそうです。
最後に
CPUファンを大切に。
- 投稿日:2019-06-25T21:10:29+09:00
python bigquery and MySQLからpandas dataframe作成。dataframeから bigquery and Google Cloud Storage as csv
内容
bigquery, MySQLからpandas dataframeを作る関数と、dataframeからBigqueryへ保存とGCSへのCSV保存をやりたく、ついにまとめたので、ちと記事作成。
コード
sample.pyimport pandas as pd import os import pymysql import dsclient # init client with project id and creadential client = dsclient.Client( "YOUR_GCP_PROJECT_NAME", "/hogehoge/hogehoge/credentials.json" ) def bq2df(query): # read data with big query return client.query(query) def mysql2df(query): # read data from MySQL with Google Cloud SQL connection = pymysql.connect( host='XXXXXXX', user='YOUR_USERNAME', password='YOUR_PASSWORD', db='YOUR_DBNAME', charset='utf8', cursorclass=pymysql.cursors.DictCursor ) return pd.read_sql(sql, connection) def df2bq(df, dataset, table): # store data with big query tb_name = dataset + "." + table client.load(df, tb_name) def df2gcs(df, folder, file_name, bucket="gs://hogehoge/"): # store data to Google Cloud Storage as csv buket_name = os.path.join(bucket, folder, file_name) client.write_csv(df, buket_name) if __name__ == "__main__": df = pd.DataFrame([i for i in range(100)], columns=["test"]) folder = "write_test" file_name = "test1.csv" df2gcs(df, folder, file_name)英語のコメントアウトは気にしないでちょ
各hogehoge等を変更してガムバッテクレ
これ超便利。参考サイト
- 投稿日:2019-06-25T20:09:51+09:00
[Python]文字列型を1要素のリスト型にする方法
Pythonで文字列を1要素のリスト型にする時に以外と苦戦したので、その方法を書いておこうと思います。
訂正 (2019 06/26)
ご指摘頂いたのでですが、無駄に複雑な方法で文字列型をリスト型に変換していました。。。
こちらの方法で十分でした。。。test = 'hogehoge' #文字列型をそのままリスト型に変換 test_list = [test] print(test_list) #['hogehoge']なので、下記の方法は悪い例です。皆さん上記の方法で普通にリスト型にしましょう。
文字列型を1要素のリスト型にする
今回は、文字列を任意の文字で区切り、リスト化する事ができるsplit関数を使います。
test = 'hogehoge' #split関数は、第1引数に区切りたい文字、第2引数に区切る回数を指定 test_list = test.split(None,0) print(test_list) #['hogehoge']split関数は、第1引数に区切りたい文字列、第2引数に区切る回数を指定する事で、区切り文字で区切られたリストを得る事ができます。
今回は区切りたくないので、第2引数を0にしています。第1引数はNoneにしていますが、恐らくなんでも問題ないと思います。
これで、文字列型を1要素のリスト型にする事ができました!!参考文献
- 投稿日:2019-06-25T20:03:18+09:00
Open jij導入失敗(2)
Open jij導入失敗
https://qiita.com/kaizen_nagoya/items/11cb393d5b8ce9019cd6ではdocker の anacondaで始めた。
apt update, apt -y apgradeしてないことに気が付いた。
cmakeが入っていないとまずいことが途中でわかった。
今回は素のubuntuで初めて見る。macOS$ docker run -it ubuntu /bin/bashdocker# apt update; apt -y upgrade Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB] Get:3 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [5436 B] Get:4 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [557 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:6 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [719 kB] Get:7 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4169 B] Get:8 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB] Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [7239 B] Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1226 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [10.8 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [861 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2496 B] Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [3927 B] Fetched 16.8 MB in 17s (977 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 12 packages can be upgraded. Run 'apt list --upgradable' to see them. Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: apt bash debconf gcc-8-base libapt-pkg5.0 libdb5.3 libgcc1 libgnutls30 libseccomp2 libstdc++6 libsystemd0 libudev1 12 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 4784 kB of archives. After this operation, 20.5 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 bash amd64 4.4.18-2ubuntu1.1 [615 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-8-base amd64 8.3.0-6ubuntu1~18.04.1 [18.7 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc1 amd64 1:8.3.0-6ubuntu1~18.04.1 [40.7 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libstdc++6 amd64 8.3.0-6ubuntu1~18.04.1 [400 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsystemd0 amd64 237-3ubuntu10.23 [204 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libudev1 amd64 237-3ubuntu10.23 [53.6 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapt-pkg5.0 amd64 1.6.11 [806 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgnutls30 amd64 3.5.18-1ubuntu1.1 [645 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libseccomp2 amd64 2.4.1-0ubuntu0.18.04.2 [39.1 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 apt amd64 1.6.11 [1166 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 debconf all 1.5.66ubuntu1 [124 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdb5.3 amd64 5.3.28-13.1ubuntu1.1 [672 kB] Fetched 4784 kB in 4s (1132 kB/s) debconf: delaying package configuration, since apt-utils is not installed (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../bash_4.4.18-2ubuntu1.1_amd64.deb ... Unpacking bash (4.4.18-2ubuntu1.1) over (4.4.18-2ubuntu1) ... Setting up bash (4.4.18-2ubuntu1.1) ... update-alternatives: error: alternative path /usr/share/man/man7/bash-builtins.7.gz doesn't exist (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../gcc-8-base_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking gcc-8-base:amd64 (8.3.0-6ubuntu1~18.04.1) over (8.3.0-6ubuntu1~18.04) ... Setting up gcc-8-base:amd64 (8.3.0-6ubuntu1~18.04.1) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libgcc1_1%3a8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libgcc1:amd64 (1:8.3.0-6ubuntu1~18.04.1) over (1:8.3.0-6ubuntu1~18.04) ... Setting up libgcc1:amd64 (1:8.3.0-6ubuntu1~18.04.1) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libstdc++6_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libstdc++6:amd64 (8.3.0-6ubuntu1~18.04.1) over (8.3.0-6ubuntu1~18.04) ... Setting up libstdc++6:amd64 (8.3.0-6ubuntu1~18.04.1) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libsystemd0_237-3ubuntu10.23_amd64.deb ... Unpacking libsystemd0:amd64 (237-3ubuntu10.23) over (237-3ubuntu10.21) ... Setting up libsystemd0:amd64 (237-3ubuntu10.23) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libudev1_237-3ubuntu10.23_amd64.deb ... Unpacking libudev1:amd64 (237-3ubuntu10.23) over (237-3ubuntu10.21) ... Setting up libudev1:amd64 (237-3ubuntu10.23) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libapt-pkg5.0_1.6.11_amd64.deb ... Unpacking libapt-pkg5.0:amd64 (1.6.11) over (1.6.10) ... Setting up libapt-pkg5.0:amd64 (1.6.11) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libgnutls30_3.5.18-1ubuntu1.1_amd64.deb ... Unpacking libgnutls30:amd64 (3.5.18-1ubuntu1.1) over (3.5.18-1ubuntu1) ... Setting up libgnutls30:amd64 (3.5.18-1ubuntu1.1) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libseccomp2_2.4.1-0ubuntu0.18.04.2_amd64.deb ... Unpacking libseccomp2:amd64 (2.4.1-0ubuntu0.18.04.2) over (2.3.1-2.1ubuntu4.1) ... Setting up libseccomp2:amd64 (2.4.1-0ubuntu0.18.04.2) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../archives/apt_1.6.11_amd64.deb ... Unpacking apt (1.6.11) over (1.6.10) ... Setting up apt (1.6.11) ... Installing new version of config file /etc/apt/apt.conf.d/01autoremove ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../debconf_1.5.66ubuntu1_all.deb ... Unpacking debconf (1.5.66ubuntu1) over (1.5.66) ... Setting up debconf (1.5.66ubuntu1) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libdb5.3_5.3.28-13.1ubuntu1.1_amd64.deb ... Unpacking libdb5.3:amd64 (5.3.28-13.1ubuntu1.1) over (5.3.28-13.1ubuntu1) ... Setting up libdb5.3:amd64 (5.3.28-13.1ubuntu1.1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... root@02b32b9272ce:/# apt install python3 Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: file libexpat1 libmagic-mgc libmagic1 libmpdec2 libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libreadline7 libsqlite3-0 libssl1.1 mime-support python3-minimal python3.6 python3.6-minimal readline-common xz-utils Suggested packages: python3-doc python3-tk python3-venv python3.6-venv python3.6-doc binutils binfmt-support readline-doc The following NEW packages will be installed: file libexpat1 libmagic-mgc libmagic1 libmpdec2 libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libreadline7 libsqlite3-0 libssl1.1 mime-support python3 python3-minimal python3.6 python3.6-minimal readline-common xz-utils 0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded. Need to get 6670 kB of archives. After this operation, 34.1 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl1.1 amd64 1.1.1-1ubuntu2.1~18.04.3 [1295 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-minimal amd64 3.6.8-1~18.04.1 [533 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libexpat1 amd64 2.2.5-3 [80.2 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-minimal amd64 3.6.8-1~18.04.1 [1620 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-minimal amd64 3.6.7-1~18.04 [23.7 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 mime-support all 3.60ubuntu1 [30.1 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpdec2 amd64 2.4.2-1ubuntu1 [84.1 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 readline-common all 7.0-3 [52.9 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 libreadline7 amd64 7.0-3 [124 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsqlite3-0 amd64 3.22.0-1ubuntu0.1 [497 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-stdlib amd64 3.6.8-1~18.04.1 [1715 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6 amd64 3.6.8-1~18.04.1 [202 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3-stdlib amd64 3.6.7-1~18.04 [7240 B] Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3 amd64 3.6.7-1~18.04 [47.2 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic-mgc amd64 1:5.32-2ubuntu0.2 [184 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic1 amd64 1:5.32-2ubuntu0.2 [68.5 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 file amd64 1:5.32-2ubuntu0.2 [22.1 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic/main amd64 xz-utils amd64 5.2.2-1.3 [83.8 kB] Fetched 6670 kB in 5s (1272 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libssl1.1:amd64. (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libssl1.1_1.1.1-1ubuntu2.1~18.04.3_amd64.deb ... Unpacking libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.3) ... Selecting previously unselected package libpython3.6-minimal:amd64. Preparing to unpack .../libpython3.6-minimal_3.6.8-1~18.04.1_amd64.deb ... Unpacking libpython3.6-minimal:amd64 (3.6.8-1~18.04.1) ... Selecting previously unselected package libexpat1:amd64. Preparing to unpack .../libexpat1_2.2.5-3_amd64.deb ... Unpacking libexpat1:amd64 (2.2.5-3) ... Selecting previously unselected package python3.6-minimal. Preparing to unpack .../python3.6-minimal_3.6.8-1~18.04.1_amd64.deb ... Unpacking python3.6-minimal (3.6.8-1~18.04.1) ... Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.3) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Setting up libpython3.6-minimal:amd64 (3.6.8-1~18.04.1) ... Setting up libexpat1:amd64 (2.2.5-3) ... Setting up python3.6-minimal (3.6.8-1~18.04.1) ... Selecting previously unselected package python3-minimal. (Reading database ... 4297 files and directories currently installed.) Preparing to unpack .../0-python3-minimal_3.6.7-1~18.04_amd64.deb ... Unpacking python3-minimal (3.6.7-1~18.04) ... Selecting previously unselected package mime-support. Preparing to unpack .../1-mime-support_3.60ubuntu1_all.deb ... Unpacking mime-support (3.60ubuntu1) ... Selecting previously unselected package libmpdec2:amd64. Preparing to unpack .../2-libmpdec2_2.4.2-1ubuntu1_amd64.deb ... Unpacking libmpdec2:amd64 (2.4.2-1ubuntu1) ... Selecting previously unselected package readline-common. Preparing to unpack .../3-readline-common_7.0-3_all.deb ... Unpacking readline-common (7.0-3) ... Selecting previously unselected package libreadline7:amd64. Preparing to unpack .../4-libreadline7_7.0-3_amd64.deb ... Unpacking libreadline7:amd64 (7.0-3) ... Selecting previously unselected package libsqlite3-0:amd64. Preparing to unpack .../5-libsqlite3-0_3.22.0-1ubuntu0.1_amd64.deb ... Unpacking libsqlite3-0:amd64 (3.22.0-1ubuntu0.1) ... Selecting previously unselected package libpython3.6-stdlib:amd64. Preparing to unpack .../6-libpython3.6-stdlib_3.6.8-1~18.04.1_amd64.deb ... Unpacking libpython3.6-stdlib:amd64 (3.6.8-1~18.04.1) ... Selecting previously unselected package python3.6. Preparing to unpack .../7-python3.6_3.6.8-1~18.04.1_amd64.deb ... Unpacking python3.6 (3.6.8-1~18.04.1) ... Selecting previously unselected package libpython3-stdlib:amd64. Preparing to unpack .../8-libpython3-stdlib_3.6.7-1~18.04_amd64.deb ... Unpacking libpython3-stdlib:amd64 (3.6.7-1~18.04) ... Setting up python3-minimal (3.6.7-1~18.04) ... Selecting previously unselected package python3. (Reading database ... 4755 files and directories currently installed.) Preparing to unpack .../python3_3.6.7-1~18.04_amd64.deb ... Unpacking python3 (3.6.7-1~18.04) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../libmagic-mgc_1%3a5.32-2ubuntu0.2_amd64.deb ... Unpacking libmagic-mgc (1:5.32-2ubuntu0.2) ... Selecting previously unselected package libmagic1:amd64. Preparing to unpack .../libmagic1_1%3a5.32-2ubuntu0.2_amd64.deb ... Unpacking libmagic1:amd64 (1:5.32-2ubuntu0.2) ... Selecting previously unselected package file. Preparing to unpack .../file_1%3a5.32-2ubuntu0.2_amd64.deb ... Unpacking file (1:5.32-2ubuntu0.2) ... Selecting previously unselected package xz-utils. Preparing to unpack .../xz-utils_5.2.2-1.3_amd64.deb ... Unpacking xz-utils (5.2.2-1.3) ... Setting up readline-common (7.0-3) ... Setting up mime-support (3.60ubuntu1) ... Setting up libreadline7:amd64 (7.0-3) ... Setting up libmagic-mgc (1:5.32-2ubuntu0.2) ... Setting up libmagic1:amd64 (1:5.32-2ubuntu0.2) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up xz-utils (5.2.2-1.3) ... update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode update-alternatives: warning: skip creation of /usr/share/man/man1/lzma.1.gz because associated file /usr/share/man/man1/xz.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/unlzma.1.gz because associated file /usr/share/man/man1/unxz.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzcat.1.gz because associated file /usr/share/man/man1/xzcat.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzmore.1.gz because associated file /usr/share/man/man1/xzmore.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzless.1.gz because associated file /usr/share/man/man1/xzless.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzdiff.1.gz because associated file /usr/share/man/man1/xzdiff.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzcmp.1.gz because associated file /usr/share/man/man1/xzcmp.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzgrep.1.gz because associated file /usr/share/man/man1/xzgrep.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzegrep.1.gz because associated file /usr/share/man/man1/xzegrep.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzfgrep.1.gz because associated file /usr/share/man/man1/xzfgrep.1.gz (of link group lzma) doesn't exist Setting up libsqlite3-0:amd64 (3.22.0-1ubuntu0.1) ... Setting up libmpdec2:amd64 (2.4.2-1ubuntu1) ... Setting up libpython3.6-stdlib:amd64 (3.6.8-1~18.04.1) ... Setting up python3.6 (3.6.8-1~18.04.1) ... Setting up file (1:5.32-2ubuntu0.2) ... Setting up libpython3-stdlib:amd64 (3.6.7-1~18.04) ... Setting up python3 (3.6.7-1~18.04) ... running python rtupdate hooks for python3.6... running python post-rtupdate hooks for python3.6... Processing triggers for libc-bin (2.27-3ubuntu1) ... root@02b32b9272ce:/# apt install pip Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package pip root@02b32b9272ce:/# apt install cmake Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: binutils binutils-common binutils-x86-64-linux-gnu ca-certificates cmake-data cpp cpp-7 gcc gcc-7 gcc-7-base krb5-locales libarchive13 libasan4 libasn1-8-heimdal libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libcurl4 libgcc-7-dev libgomp1 libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libicu60 libisl19 libitm1 libjsoncpp1 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common liblsan0 liblzo2-2 libmpc3 libmpfr6 libmpx2 libnghttp2-14 libpsl5 libquadmath0 librhash0 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libtsan0 libubsan0 libuv1 libwind0-heimdal libxml2 linux-libc-dev make manpages manpages-dev multiarch-support openssl publicsuffix Suggested packages: binutils-doc cmake-doc ninja-build cpp-doc gcc-7-locales gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-7-multilib gcc-7-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg lrzip glibc-doc krb5-doc krb5-user libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql make-doc man-browser The following NEW packages will be installed: binutils binutils-common binutils-x86-64-linux-gnu ca-certificates cmake cmake-data cpp cpp-7 gcc gcc-7 gcc-7-base krb5-locales libarchive13 libasan4 libasn1-8-heimdal libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libcurl4 libgcc-7-dev libgomp1 libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libicu60 libisl19 libitm1 libjsoncpp1 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common liblsan0 liblzo2-2 libmpc3 libmpfr6 libmpx2 libnghttp2-14 libpsl5 libquadmath0 librhash0 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libtsan0 libubsan0 libuv1 libwind0-heimdal libxml2 linux-libc-dev make manpages manpages-dev multiarch-support openssl publicsuffix 0 upgraded, 67 newly installed, 0 to remove and 0 not upgraded. Need to get 45.2 MB of archives. After this operation, 187 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 multiarch-support amd64 2.27-3ubuntu1 [6916 B] Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 liblzo2-2 amd64 2.08-1.2 [48.7 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssl amd64 1.1.1-1ubuntu2.1~18.04.3 [614 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 ca-certificates all 20180409 [151 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 libicu60 amd64 60.2-3ubuntu3 [8054 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxml2 amd64 2.9.4+dfsg1-6.1ubuntu1.2 [663 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 krb5-locales all 1.16-2ubuntu0.1 [13.5 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libkrb5support0 amd64 1.16-2ubuntu0.1 [30.9 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libk5crypto3 amd64 1.16-2ubuntu0.1 [85.6 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic/main amd64 libkeyutils1 amd64 1.5.9-9.2ubuntu2 [8720 B] Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libkrb5-3 amd64 1.16-2ubuntu0.1 [279 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgssapi-krb5-2 amd64 1.16-2ubuntu0.1 [122 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpsl5 amd64 0.19.1-5build1 [41.8 kB] Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 manpages all 4.15-1 [1234 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic/main amd64 publicsuffix all 20180223.1310-1 [97.6 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-21ubuntu1~18.04.2 [193 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libbinutils amd64 2.30-21ubuntu1~18.04.2 [503 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.30-21ubuntu1~18.04.2 [1856 kB] Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils amd64 2.30-21ubuntu1~18.04.2 [3396 B] Get:20 http://archive.ubuntu.com/ubuntu bionic/main amd64 cmake-data all 3.10.2-1ubuntu2 [1331 kB] Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libarchive13 amd64 3.2.2-3.1ubuntu0.3 [288 kB] Get:22 http://archive.ubuntu.com/ubuntu bionic/main amd64 libroken18-heimdal amd64 7.5.0+dfsg-1 [41.3 kB] Get:23 http://archive.ubuntu.com/ubuntu bionic/main amd64 libasn1-8-heimdal amd64 7.5.0+dfsg-1 [175 kB] Get:24 http://archive.ubuntu.com/ubuntu bionic/main amd64 libheimbase1-heimdal amd64 7.5.0+dfsg-1 [29.3 kB] Get:25 http://archive.ubuntu.com/ubuntu bionic/main amd64 libhcrypto4-heimdal amd64 7.5.0+dfsg-1 [85.9 kB] Get:26 http://archive.ubuntu.com/ubuntu bionic/main amd64 libwind0-heimdal amd64 7.5.0+dfsg-1 [47.8 kB] Get:27 http://archive.ubuntu.com/ubuntu bionic/main amd64 libhx509-5-heimdal amd64 7.5.0+dfsg-1 [107 kB] Get:28 http://archive.ubuntu.com/ubuntu bionic/main amd64 libkrb5-26-heimdal amd64 7.5.0+dfsg-1 [206 kB] Get:29 http://archive.ubuntu.com/ubuntu bionic/main amd64 libheimntlm0-heimdal amd64 7.5.0+dfsg-1 [14.8 kB] Get:30 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgssapi3-heimdal amd64 7.5.0+dfsg-1 [96.5 kB] Get:31 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsasl2-modules-db amd64 2.1.27~101-g0780600+dfsg-3ubuntu2 [14.8 kB] Get:32 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsasl2-2 amd64 2.1.27~101-g0780600+dfsg-3ubuntu2 [49.2 kB] Get:33 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libldap-common all 2.4.45+dfsg-1ubuntu1.2 [16.7 kB] Get:34 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libldap-2.4-2 amd64 2.4.45+dfsg-1ubuntu1.2 [155 kB] Get:35 http://archive.ubuntu.com/ubuntu bionic/main amd64 libnghttp2-14 amd64 1.30.0-1ubuntu1 [77.8 kB] Get:36 http://archive.ubuntu.com/ubuntu bionic/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-1 [54.2 kB] Get:37 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.7 [214 kB] Get:38 http://archive.ubuntu.com/ubuntu bionic/main amd64 libjsoncpp1 amd64 1.7.4-3 [73.6 kB] Get:39 http://archive.ubuntu.com/ubuntu bionic/main amd64 librhash0 amd64 1.3.6-2 [78.1 kB] Get:40 http://archive.ubuntu.com/ubuntu bionic/main amd64 libuv1 amd64 1.18.0-3 [64.4 kB] Get:41 http://archive.ubuntu.com/ubuntu bionic/main amd64 cmake amd64 3.10.2-1ubuntu2 [3138 kB] Get:42 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7-base amd64 7.4.0-1ubuntu1~18.04.1 [18.9 kB] Get:43 http://archive.ubuntu.com/ubuntu bionic/main amd64 libisl19 amd64 0.19-1 [551 kB] Get:44 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpfr6 amd64 4.0.1-1 [243 kB] Get:45 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpc3 amd64 1.1.0-1 [40.8 kB] Get:46 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cpp-7 amd64 7.4.0-1ubuntu1~18.04.1 [6742 kB] Get:47 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cpp amd64 4:7.4.0-1ubuntu2.3 [27.7 kB] Get:48 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcc1-0 amd64 8.3.0-6ubuntu1~18.04.1 [47.4 kB] Get:49 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgomp1 amd64 8.3.0-6ubuntu1~18.04.1 [76.4 kB] Get:50 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libitm1 amd64 8.3.0-6ubuntu1~18.04.1 [28.0 kB] Get:51 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libatomic1 amd64 8.3.0-6ubuntu1~18.04.1 [9184 B] Get:52 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libasan4 amd64 7.4.0-1ubuntu1~18.04.1 [359 kB] Get:53 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 liblsan0 amd64 8.3.0-6ubuntu1~18.04.1 [133 kB] Get:54 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libtsan0 amd64 8.3.0-6ubuntu1~18.04.1 [288 kB] Get:55 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libubsan0 amd64 7.4.0-1ubuntu1~18.04.1 [126 kB] Get:56 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcilkrts5 amd64 7.4.0-1ubuntu1~18.04.1 [42.5 kB] Get:57 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmpx2 amd64 8.3.0-6ubuntu1~18.04.1 [11.6 kB] Get:58 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libquadmath0 amd64 8.3.0-6ubuntu1~18.04.1 [133 kB] Get:59 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc-7-dev amd64 7.4.0-1ubuntu1~18.04.1 [2381 kB] Get:60 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7 amd64 7.4.0-1ubuntu1~18.04.1 [7463 kB] Get:61 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc amd64 4:7.4.0-1ubuntu2.3 [5184 B] Get:62 http://archive.ubuntu.com/ubuntu bionic/main amd64 libc-dev-bin amd64 2.27-3ubuntu1 [71.8 kB] Get:63 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-52.56 [1004 kB] Get:64 http://archive.ubuntu.com/ubuntu bionic/main amd64 libc6-dev amd64 2.27-3ubuntu1 [2587 kB] Get:65 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsasl2-modules amd64 2.1.27~101-g0780600+dfsg-3ubuntu2 [48.7 kB] Get:66 http://archive.ubuntu.com/ubuntu bionic/main amd64 make amd64 4.1-9.1ubuntu1 [154 kB] Get:67 http://archive.ubuntu.com/ubuntu bionic/main amd64 manpages-dev all 4.15-1 [2217 kB] Fetched 45.2 MB in 13s (3366 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package multiarch-support. (Reading database ... 4859 files and directories currently installed.) Preparing to unpack .../multiarch-support_2.27-3ubuntu1_amd64.deb ... Unpacking multiarch-support (2.27-3ubuntu1) ... Setting up multiarch-support (2.27-3ubuntu1) ... Selecting previously unselected package liblzo2-2:amd64. (Reading database ... 4862 files and directories currently installed.) Preparing to unpack .../00-liblzo2-2_2.08-1.2_amd64.deb ... Unpacking liblzo2-2:amd64 (2.08-1.2) ... Selecting previously unselected package openssl. Preparing to unpack .../01-openssl_1.1.1-1ubuntu2.1~18.04.3_amd64.deb ... Unpacking openssl (1.1.1-1ubuntu2.1~18.04.3) ... Selecting previously unselected package ca-certificates. Preparing to unpack .../02-ca-certificates_20180409_all.deb ... Unpacking ca-certificates (20180409) ... Selecting previously unselected package libicu60:amd64. Preparing to unpack .../03-libicu60_60.2-3ubuntu3_amd64.deb ... Unpacking libicu60:amd64 (60.2-3ubuntu3) ... Selecting previously unselected package libxml2:amd64. Preparing to unpack .../04-libxml2_2.9.4+dfsg1-6.1ubuntu1.2_amd64.deb ... Unpacking libxml2:amd64 (2.9.4+dfsg1-6.1ubuntu1.2) ... Selecting previously unselected package krb5-locales. Preparing to unpack .../05-krb5-locales_1.16-2ubuntu0.1_all.deb ... Unpacking krb5-locales (1.16-2ubuntu0.1) ... Selecting previously unselected package libkrb5support0:amd64. Preparing to unpack .../06-libkrb5support0_1.16-2ubuntu0.1_amd64.deb ... Unpacking libkrb5support0:amd64 (1.16-2ubuntu0.1) ... Selecting previously unselected package libk5crypto3:amd64. Preparing to unpack .../07-libk5crypto3_1.16-2ubuntu0.1_amd64.deb ... Unpacking libk5crypto3:amd64 (1.16-2ubuntu0.1) ... Selecting previously unselected package libkeyutils1:amd64. Preparing to unpack .../08-libkeyutils1_1.5.9-9.2ubuntu2_amd64.deb ... Unpacking libkeyutils1:amd64 (1.5.9-9.2ubuntu2) ... Selecting previously unselected package libkrb5-3:amd64. Preparing to unpack .../09-libkrb5-3_1.16-2ubuntu0.1_amd64.deb ... Unpacking libkrb5-3:amd64 (1.16-2ubuntu0.1) ... Selecting previously unselected package libgssapi-krb5-2:amd64. Preparing to unpack .../10-libgssapi-krb5-2_1.16-2ubuntu0.1_amd64.deb ... Unpacking libgssapi-krb5-2:amd64 (1.16-2ubuntu0.1) ... Selecting previously unselected package libpsl5:amd64. Preparing to unpack .../11-libpsl5_0.19.1-5build1_amd64.deb ... Unpacking libpsl5:amd64 (0.19.1-5build1) ... Selecting previously unselected package manpages. Preparing to unpack .../12-manpages_4.15-1_all.deb ... Unpacking manpages (4.15-1) ... Selecting previously unselected package publicsuffix. Preparing to unpack .../13-publicsuffix_20180223.1310-1_all.deb ... Unpacking publicsuffix (20180223.1310-1) ... Selecting previously unselected package binutils-common:amd64. Preparing to unpack .../14-binutils-common_2.30-21ubuntu1~18.04.2_amd64.deb ... Unpacking binutils-common:amd64 (2.30-21ubuntu1~18.04.2) ... Selecting previously unselected package libbinutils:amd64. Preparing to unpack .../15-libbinutils_2.30-21ubuntu1~18.04.2_amd64.deb ... Unpacking libbinutils:amd64 (2.30-21ubuntu1~18.04.2) ... Selecting previously unselected package binutils-x86-64-linux-gnu. Preparing to unpack .../16-binutils-x86-64-linux-gnu_2.30-21ubuntu1~18.04.2_amd64.deb ... Unpacking binutils-x86-64-linux-gnu (2.30-21ubuntu1~18.04.2) ... Selecting previously unselected package binutils. Preparing to unpack .../17-binutils_2.30-21ubuntu1~18.04.2_amd64.deb ... Unpacking binutils (2.30-21ubuntu1~18.04.2) ... Selecting previously unselected package cmake-data. Preparing to unpack .../18-cmake-data_3.10.2-1ubuntu2_all.deb ... Unpacking cmake-data (3.10.2-1ubuntu2) ... Selecting previously unselected package libarchive13:amd64. Preparing to unpack .../19-libarchive13_3.2.2-3.1ubuntu0.3_amd64.deb ... Unpacking libarchive13:amd64 (3.2.2-3.1ubuntu0.3) ... Selecting previously unselected package libroken18-heimdal:amd64. Preparing to unpack .../20-libroken18-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libroken18-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libasn1-8-heimdal:amd64. Preparing to unpack .../21-libasn1-8-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libasn1-8-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libheimbase1-heimdal:amd64. Preparing to unpack .../22-libheimbase1-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libheimbase1-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libhcrypto4-heimdal:amd64. Preparing to unpack .../23-libhcrypto4-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libhcrypto4-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libwind0-heimdal:amd64. Preparing to unpack .../24-libwind0-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libwind0-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libhx509-5-heimdal:amd64. Preparing to unpack .../25-libhx509-5-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libhx509-5-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libkrb5-26-heimdal:amd64. Preparing to unpack .../26-libkrb5-26-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libkrb5-26-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libheimntlm0-heimdal:amd64. Preparing to unpack .../27-libheimntlm0-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libheimntlm0-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libgssapi3-heimdal:amd64. Preparing to unpack .../28-libgssapi3-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libgssapi3-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libsasl2-modules-db:amd64. Preparing to unpack .../29-libsasl2-modules-db_2.1.27~101-g0780600+dfsg-3ubuntu2_amd64.deb ... Unpacking libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Selecting previously unselected package libsasl2-2:amd64. Preparing to unpack .../30-libsasl2-2_2.1.27~101-g0780600+dfsg-3ubuntu2_amd64.deb ... Unpacking libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Selecting previously unselected package libldap-common. Preparing to unpack .../31-libldap-common_2.4.45+dfsg-1ubuntu1.2_all.deb ... Unpacking libldap-common (2.4.45+dfsg-1ubuntu1.2) ... Selecting previously unselected package libldap-2.4-2:amd64. Preparing to unpack .../32-libldap-2.4-2_2.4.45+dfsg-1ubuntu1.2_amd64.deb ... Unpacking libldap-2.4-2:amd64 (2.4.45+dfsg-1ubuntu1.2) ... Selecting previously unselected package libnghttp2-14:amd64. Preparing to unpack .../33-libnghttp2-14_1.30.0-1ubuntu1_amd64.deb ... Unpacking libnghttp2-14:amd64 (1.30.0-1ubuntu1) ... Selecting previously unselected package librtmp1:amd64. Preparing to unpack .../34-librtmp1_2.4+20151223.gitfa8646d.1-1_amd64.deb ... Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1) ... Selecting previously unselected package libcurl4:amd64. Preparing to unpack .../35-libcurl4_7.58.0-2ubuntu3.7_amd64.deb ... Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.7) ... Selecting previously unselected package libjsoncpp1:amd64. Preparing to unpack .../36-libjsoncpp1_1.7.4-3_amd64.deb ... Unpacking libjsoncpp1:amd64 (1.7.4-3) ... Selecting previously unselected package librhash0:amd64. Preparing to unpack .../37-librhash0_1.3.6-2_amd64.deb ... Unpacking librhash0:amd64 (1.3.6-2) ... Selecting previously unselected package libuv1:amd64. Preparing to unpack .../38-libuv1_1.18.0-3_amd64.deb ... Unpacking libuv1:amd64 (1.18.0-3) ... Selecting previously unselected package cmake. Preparing to unpack .../39-cmake_3.10.2-1ubuntu2_amd64.deb ... Unpacking cmake (3.10.2-1ubuntu2) ... Selecting previously unselected package gcc-7-base:amd64. Preparing to unpack .../40-gcc-7-base_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking gcc-7-base:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package libisl19:amd64. Preparing to unpack .../41-libisl19_0.19-1_amd64.deb ... Unpacking libisl19:amd64 (0.19-1) ... Selecting previously unselected package libmpfr6:amd64. Preparing to unpack .../42-libmpfr6_4.0.1-1_amd64.deb ... Unpacking libmpfr6:amd64 (4.0.1-1) ... Selecting previously unselected package libmpc3:amd64. Preparing to unpack .../43-libmpc3_1.1.0-1_amd64.deb ... Unpacking libmpc3:amd64 (1.1.0-1) ... Selecting previously unselected package cpp-7. Preparing to unpack .../44-cpp-7_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking cpp-7 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package cpp. Preparing to unpack .../45-cpp_4%3a7.4.0-1ubuntu2.3_amd64.deb ... Unpacking cpp (4:7.4.0-1ubuntu2.3) ... Selecting previously unselected package libcc1-0:amd64. Preparing to unpack .../46-libcc1-0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libcc1-0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libgomp1:amd64. Preparing to unpack .../47-libgomp1_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libgomp1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libitm1:amd64. Preparing to unpack .../48-libitm1_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libitm1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libatomic1:amd64. Preparing to unpack .../49-libatomic1_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libatomic1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libasan4:amd64. Preparing to unpack .../50-libasan4_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libasan4:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package liblsan0:amd64. Preparing to unpack .../51-liblsan0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking liblsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libtsan0:amd64. Preparing to unpack .../52-libtsan0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libtsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libubsan0:amd64. Preparing to unpack .../53-libubsan0_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libubsan0:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package libcilkrts5:amd64. Preparing to unpack .../54-libcilkrts5_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libcilkrts5:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package libmpx2:amd64. Preparing to unpack .../55-libmpx2_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libmpx2:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libquadmath0:amd64. Preparing to unpack .../56-libquadmath0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libquadmath0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libgcc-7-dev:amd64. Preparing to unpack .../57-libgcc-7-dev_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libgcc-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package gcc-7. Preparing to unpack .../58-gcc-7_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking gcc-7 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package gcc. Preparing to unpack .../59-gcc_4%3a7.4.0-1ubuntu2.3_amd64.deb ... Unpacking gcc (4:7.4.0-1ubuntu2.3) ... Selecting previously unselected package libc-dev-bin. Preparing to unpack .../60-libc-dev-bin_2.27-3ubuntu1_amd64.deb ... Unpacking libc-dev-bin (2.27-3ubuntu1) ... Selecting previously unselected package linux-libc-dev:amd64. Preparing to unpack .../61-linux-libc-dev_4.15.0-52.56_amd64.deb ... Unpacking linux-libc-dev:amd64 (4.15.0-52.56) ... Selecting previously unselected package libc6-dev:amd64. Preparing to unpack .../62-libc6-dev_2.27-3ubuntu1_amd64.deb ... Unpacking libc6-dev:amd64 (2.27-3ubuntu1) ... Selecting previously unselected package libsasl2-modules:amd64. Preparing to unpack .../63-libsasl2-modules_2.1.27~101-g0780600+dfsg-3ubuntu2_amd64.deb ... Unpacking libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Selecting previously unselected package make. Preparing to unpack .../64-make_4.1-9.1ubuntu1_amd64.deb ... Unpacking make (4.1-9.1ubuntu1) ... Selecting previously unselected package manpages-dev. Preparing to unpack .../65-manpages-dev_4.15-1_all.deb ... Unpacking manpages-dev (4.15-1) ... Setting up libquadmath0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up libgomp1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up libatomic1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up manpages (4.15-1) ... Setting up libicu60:amd64 (60.2-3ubuntu3) ... Setting up libcc1-0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up make (4.1-9.1ubuntu1) ... Setting up libnghttp2-14:amd64 (1.30.0-1ubuntu1) ... Setting up libldap-common (2.4.45+dfsg-1ubuntu1.2) ... Setting up libuv1:amd64 (1.18.0-3) ... Setting up libpsl5:amd64 (0.19.1-5build1) ... Setting up libtsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Setting up linux-libc-dev:amd64 (4.15.0-52.56) ... Setting up libmpfr6:amd64 (4.0.1-1) ... Setting up libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Setting up cmake-data (3.10.2-1ubuntu2) ... Setting up libroken18-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1) ... Setting up libkrb5support0:amd64 (1.16-2ubuntu0.1) ... Setting up libxml2:amd64 (2.9.4+dfsg1-6.1ubuntu1.2) ... Setting up librhash0:amd64 (1.3.6-2) ... Setting up liblsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up gcc-7-base:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up binutils-common:amd64 (2.30-21ubuntu1~18.04.2) ... Setting up libmpx2:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up krb5-locales (1.16-2ubuntu0.1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up publicsuffix (20180223.1310-1) ... Setting up libheimbase1-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up openssl (1.1.1-1ubuntu2.1~18.04.3) ... Setting up libmpc3:amd64 (1.1.0-1) ... Setting up libc-dev-bin (2.27-3ubuntu1) ... Setting up libkeyutils1:amd64 (1.5.9-9.2ubuntu2) ... Setting up libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Setting up ca-certificates (20180409) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Updating certificates in /etc/ssl/certs... 133 added, 0 removed; done. Setting up manpages-dev (4.15-1) ... Setting up libc6-dev:amd64 (2.27-3ubuntu1) ... Setting up libitm1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up liblzo2-2:amd64 (2.08-1.2) ... Setting up libisl19:amd64 (0.19-1) ... Setting up libjsoncpp1:amd64 (1.7.4-3) ... Setting up libk5crypto3:amd64 (1.16-2ubuntu0.1) ... Setting up libwind0-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libasan4:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libbinutils:amd64 (2.30-21ubuntu1~18.04.2) ... Setting up libarchive13:amd64 (3.2.2-3.1ubuntu0.3) ... Setting up libcilkrts5:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libasn1-8-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libubsan0:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libhcrypto4-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libhx509-5-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libgcc-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up cpp-7 (7.4.0-1ubuntu1~18.04.1) ... Setting up libkrb5-3:amd64 (1.16-2ubuntu0.1) ... Setting up libkrb5-26-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libheimntlm0-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up binutils-x86-64-linux-gnu (2.30-21ubuntu1~18.04.2) ... Setting up cpp (4:7.4.0-1ubuntu2.3) ... Setting up libgssapi-krb5-2:amd64 (1.16-2ubuntu0.1) ... Setting up binutils (2.30-21ubuntu1~18.04.2) ... Setting up libgssapi3-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up gcc-7 (7.4.0-1ubuntu1~18.04.1) ... Setting up gcc (4:7.4.0-1ubuntu2.3) ... Setting up libldap-2.4-2:amd64 (2.4.45+dfsg-1ubuntu1.2) ... Setting up libcurl4:amd64 (7.58.0-2ubuntu3.7) ... Setting up cmake (3.10.2-1ubuntu2) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Processing triggers for ca-certificates (20180409) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. root@02b32b9272ce:/# apt install python3-pip Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: build-essential dbus dh-python dirmngr dpkg-dev fakeroot g++ g++-7 gir1.2-glib-2.0 gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapparmor1 libassuan0 libdbus-1-3 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgdbm-compat4 libgdbm5 libgirepository-1.0-1 libglib2.0-0 libglib2.0-data libksba8 liblocale-gettext-perl libnpth0 libperl5.26 libpython3-dev libpython3.6 libpython3.6-dev libstdc++-7-dev netbase patch perl perl-modules-5.26 pinentry-curses python-pip-whl python3-asn1crypto python3-cffi-backend python3-crypto python3-cryptography python3-dbus python3-dev python3-distutils python3-gi python3-idna python3-keyring python3-keyrings.alt python3-lib2to3 python3-pkg-resources python3-secretstorage python3-setuptools python3-six python3-wheel python3-xdg python3.6-dev shared-mime-info xdg-user-dirs Suggested packages: default-dbus-session-bus | dbus-session-bus dbus-user-session libpam-systemd pinentry-gnome3 tor debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg parcimonie xloadimage scdaemon git bzr gdbm-l10n libstdc++-7-doc ed diffutils-doc perl-doc libterm-readline-gnu-perl | libterm-readline-perl-perl pinentry-doc python-crypto-doc python-cryptography-doc python3-cryptography-vectors python-dbus-doc python3-dbus-dbg gnome-keyring libkf5wallet-bin gir1.2-gnomekeyring-1.0 python-secretstorage-doc python-setuptools-doc The following NEW packages will be installed: build-essential dbus dh-python dirmngr dpkg-dev fakeroot g++ g++-7 gir1.2-glib-2.0 gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapparmor1 libassuan0 libdbus-1-3 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgdbm-compat4 libgdbm5 libgirepository-1.0-1 libglib2.0-0 libglib2.0-data libksba8 liblocale-gettext-perl libnpth0 libperl5.26 libpython3-dev libpython3.6 libpython3.6-dev libstdc++-7-dev netbase patch perl perl-modules-5.26 pinentry-curses python-pip-whl python3-asn1crypto python3-cffi-backend python3-crypto python3-cryptography python3-dbus python3-dev python3-distutils python3-gi python3-idna python3-keyring python3-keyrings.alt python3-lib2to3 python3-pip python3-pkg-resources python3-secretstorage python3-setuptools python3-six python3-wheel python3-xdg python3.6-dev shared-mime-info xdg-user-dirs 0 upgraded, 69 newly installed, 0 to remove and 0 not upgraded. Need to get 71.4 MB of archives. After this operation, 198 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 liblocale-gettext-perl amd64 1.07-3build2 [16.6 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 perl-modules-5.26 all 5.26.1-6ubuntu0.3 [2763 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgdbm5 amd64 1.14.1-6 [26.0 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgdbm-compat4 amd64 1.14.1-6 [6084 B] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libperl5.26 amd64 5.26.1-6ubuntu0.3 [3527 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 perl amd64 5.26.1-6ubuntu0.3 [201 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapparmor1 amd64 2.12-4ubuntu5.1 [31.3 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdbus-1-3 amd64 1.12.2-1ubuntu1.1 [175 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dbus amd64 1.12.2-1ubuntu1.1 [150 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglib2.0-0 amd64 2.56.4-0ubuntu0.18.04.3 [1169 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgirepository-1.0-1 amd64 1.56.1-1 [82.0 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 gir1.2-glib-2.0 amd64 1.56.1-1 [131 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglib2.0-data all 2.56.4-0ubuntu0.18.04.3 [4608 B] Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 netbase all 5.4 [12.7 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-dbus amd64 1.2.6-1 [89.9 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-gi amd64 3.26.1-2ubuntu1 [153 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic/main amd64 shared-mime-info amd64 1.9-2 [426 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic/main amd64 xdg-user-dirs amd64 0.17-1ubuntu1 [48.0 kB] Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libstdc++-7-dev amd64 7.4.0-1ubuntu1~18.04.1 [1468 kB] Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 g++-7 amd64 7.4.0-1ubuntu1~18.04.1 [7574 kB] Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 g++ amd64 4:7.4.0-1ubuntu2.3 [1568 B] Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdpkg-perl all 1.19.0.5ubuntu2.1 [211 kB] Get:23 http://archive.ubuntu.com/ubuntu bionic/main amd64 patch amd64 2.7.6-2ubuntu1 [102 kB] Get:24 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dpkg-dev all 1.19.0.5ubuntu2.1 [608 kB] Get:25 http://archive.ubuntu.com/ubuntu bionic/main amd64 build-essential amd64 12.4ubuntu1 [4758 B] Get:26 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-lib2to3 all 3.6.8-1~18.04 [76.5 kB] Get:27 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-distutils all 3.6.8-1~18.04 [141 kB] Get:28 http://archive.ubuntu.com/ubuntu bionic/main amd64 dh-python all 3.20180325ubuntu2 [89.2 kB] Get:29 http://archive.ubuntu.com/ubuntu bionic/main amd64 libassuan0 amd64 2.5.1-2 [35.0 kB] Get:30 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpgconf amd64 2.2.4-1ubuntu1.2 [123 kB] Get:31 http://archive.ubuntu.com/ubuntu bionic/main amd64 libksba8 amd64 1.3.5-2 [92.6 kB] Get:32 http://archive.ubuntu.com/ubuntu bionic/main amd64 libnpth0 amd64 1.5-3 [7668 B] Get:33 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dirmngr amd64 2.2.4-1ubuntu1.2 [316 kB] Get:34 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfakeroot amd64 1.22-2ubuntu1 [25.9 kB] Get:35 http://archive.ubuntu.com/ubuntu bionic/main amd64 fakeroot amd64 1.22-2ubuntu1 [62.3 kB] Get:36 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnupg-l10n all 2.2.4-1ubuntu1.2 [49.6 kB] Get:37 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnupg-utils amd64 2.2.4-1ubuntu1.2 [127 kB] Get:38 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg amd64 2.2.4-1ubuntu1.2 [467 kB] Get:39 http://archive.ubuntu.com/ubuntu bionic/main amd64 pinentry-curses amd64 1.1.0-1 [35.8 kB] Get:40 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg-agent amd64 2.2.4-1ubuntu1.2 [227 kB] Get:41 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg-wks-client amd64 2.2.4-1ubuntu1.2 [91.9 kB] Get:42 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg-wks-server amd64 2.2.4-1ubuntu1.2 [84.9 kB] Get:43 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpgsm amd64 2.2.4-1ubuntu1.2 [215 kB] Get:44 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnupg amd64 2.2.4-1ubuntu1.2 [249 kB] Get:45 http://archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB] Get:46 http://archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-diff-xs-perl amd64 0.04-5 [11.1 kB] Get:47 http://archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB] Get:48 http://archive.ubuntu.com/ubuntu bionic/main amd64 libexpat1-dev amd64 2.2.5-3 [122 kB] Get:49 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfile-fcntllock-perl amd64 0.22-3build2 [33.2 kB] Get:50 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6 amd64 3.6.8-1~18.04.1 [1418 kB] Get:51 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-dev amd64 3.6.8-1~18.04.1 [44.8 MB] Get:52 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3-dev amd64 3.6.7-1~18.04 [7328 B] Get:53 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python-pip-whl all 9.0.1-2.3~ubuntu1.18.04.1 [1653 kB] Get:54 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-asn1crypto all 0.24.0-1 [72.8 kB] Get:55 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-cffi-backend amd64 1.11.5-1 [64.6 kB] Get:56 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-crypto amd64 2.6.1-8ubuntu2 [244 kB] Get:57 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-idna all 2.6-1 [32.5 kB] Get:58 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-six all 1.11.0-2 [11.4 kB] Get:59 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-cryptography amd64 2.1.4-1ubuntu1.3 [221 kB] Get:60 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-dev amd64 3.6.8-1~18.04.1 [508 kB] Get:61 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-dev amd64 3.6.7-1~18.04 [1288 B] Get:62 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-secretstorage all 2.3.1-2 [12.1 kB] Get:63 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-keyring all 10.6.0-1 [26.7 kB] Get:64 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-keyrings.alt all 3.0-1 [16.6 kB] Get:65 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python3-pip all 9.0.1-2.3~ubuntu1.18.04.1 [114 kB] Get:66 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-pkg-resources all 39.0.1-2 [98.8 kB] Get:67 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-setuptools all 39.0.1-2 [248 kB] Get:68 http://archive.ubuntu.com/ubuntu bionic/universe amd64 python3-wheel all 0.30.0-0.2 [36.5 kB] Get:69 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-xdg all 0.25-4ubuntu1 [31.4 kB] Fetched 71.4 MB in 22s (3203 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package liblocale-gettext-perl. (Reading database ... 12277 files and directories currently installed.) Preparing to unpack .../00-liblocale-gettext-perl_1.07-3build2_amd64.deb ... Unpacking liblocale-gettext-perl (1.07-3build2) ... Selecting previously unselected package perl-modules-5.26. Preparing to unpack .../01-perl-modules-5.26_5.26.1-6ubuntu0.3_all.deb ... Unpacking perl-modules-5.26 (5.26.1-6ubuntu0.3) ... Selecting previously unselected package libgdbm5:amd64. Preparing to unpack .../02-libgdbm5_1.14.1-6_amd64.deb ... Unpacking libgdbm5:amd64 (1.14.1-6) ... Selecting previously unselected package libgdbm-compat4:amd64. Preparing to unpack .../03-libgdbm-compat4_1.14.1-6_amd64.deb ... Unpacking libgdbm-compat4:amd64 (1.14.1-6) ... Selecting previously unselected package libperl5.26:amd64. Preparing to unpack .../04-libperl5.26_5.26.1-6ubuntu0.3_amd64.deb ... Unpacking libperl5.26:amd64 (5.26.1-6ubuntu0.3) ... Selecting previously unselected package perl. Preparing to unpack .../05-perl_5.26.1-6ubuntu0.3_amd64.deb ... Unpacking perl (5.26.1-6ubuntu0.3) ... Selecting previously unselected package libapparmor1:amd64. Preparing to unpack .../06-libapparmor1_2.12-4ubuntu5.1_amd64.deb ... Unpacking libapparmor1:amd64 (2.12-4ubuntu5.1) ... Selecting previously unselected package libdbus-1-3:amd64. Preparing to unpack .../07-libdbus-1-3_1.12.2-1ubuntu1.1_amd64.deb ... Unpacking libdbus-1-3:amd64 (1.12.2-1ubuntu1.1) ... Selecting previously unselected package dbus. Preparing to unpack .../08-dbus_1.12.2-1ubuntu1.1_amd64.deb ... Unpacking dbus (1.12.2-1ubuntu1.1) ... Selecting previously unselected package libglib2.0-0:amd64. Preparing to unpack .../09-libglib2.0-0_2.56.4-0ubuntu0.18.04.3_amd64.deb ... Unpacking libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.3) ... Selecting previously unselected package libgirepository-1.0-1:amd64. Preparing to unpack .../10-libgirepository-1.0-1_1.56.1-1_amd64.deb ... Unpacking libgirepository-1.0-1:amd64 (1.56.1-1) ... Selecting previously unselected package gir1.2-glib-2.0:amd64. Preparing to unpack .../11-gir1.2-glib-2.0_1.56.1-1_amd64.deb ... Unpacking gir1.2-glib-2.0:amd64 (1.56.1-1) ... Selecting previously unselected package libglib2.0-data. Preparing to unpack .../12-libglib2.0-data_2.56.4-0ubuntu0.18.04.3_all.deb ... Unpacking libglib2.0-data (2.56.4-0ubuntu0.18.04.3) ... Selecting previously unselected package netbase. Preparing to unpack .../13-netbase_5.4_all.deb ... Unpacking netbase (5.4) ... Selecting previously unselected package python3-dbus. Preparing to unpack .../14-python3-dbus_1.2.6-1_amd64.deb ... Unpacking python3-dbus (1.2.6-1) ... Selecting previously unselected package python3-gi. Preparing to unpack .../15-python3-gi_3.26.1-2ubuntu1_amd64.deb ... Unpacking python3-gi (3.26.1-2ubuntu1) ... Selecting previously unselected package shared-mime-info. Preparing to unpack .../16-shared-mime-info_1.9-2_amd64.deb ... Unpacking shared-mime-info (1.9-2) ... Selecting previously unselected package xdg-user-dirs. Preparing to unpack .../17-xdg-user-dirs_0.17-1ubuntu1_amd64.deb ... Unpacking xdg-user-dirs (0.17-1ubuntu1) ... Selecting previously unselected package libstdc++-7-dev:amd64. Preparing to unpack .../18-libstdc++-7-dev_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libstdc++-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package g++-7. Preparing to unpack .../19-g++-7_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking g++-7 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package g++. Preparing to unpack .../20-g++_4%3a7.4.0-1ubuntu2.3_amd64.deb ... Unpacking g++ (4:7.4.0-1ubuntu2.3) ... Selecting previously unselected package libdpkg-perl. Preparing to unpack .../21-libdpkg-perl_1.19.0.5ubuntu2.1_all.deb ... Unpacking libdpkg-perl (1.19.0.5ubuntu2.1) ... Selecting previously unselected package patch. Preparing to unpack .../22-patch_2.7.6-2ubuntu1_amd64.deb ... Unpacking patch (2.7.6-2ubuntu1) ... Selecting previously unselected package dpkg-dev. Preparing to unpack .../23-dpkg-dev_1.19.0.5ubuntu2.1_all.deb ... Unpacking dpkg-dev (1.19.0.5ubuntu2.1) ... Selecting previously unselected package build-essential. Preparing to unpack .../24-build-essential_12.4ubuntu1_amd64.deb ... Unpacking build-essential (12.4ubuntu1) ... Selecting previously unselected package python3-lib2to3. Preparing to unpack .../25-python3-lib2to3_3.6.8-1~18.04_all.deb ... Unpacking python3-lib2to3 (3.6.8-1~18.04) ... Selecting previously unselected package python3-distutils. Preparing to unpack .../26-python3-distutils_3.6.8-1~18.04_all.deb ... Unpacking python3-distutils (3.6.8-1~18.04) ... Selecting previously unselected package dh-python. Preparing to unpack .../27-dh-python_3.20180325ubuntu2_all.deb ... Unpacking dh-python (3.20180325ubuntu2) ... Selecting previously unselected package libassuan0:amd64. Preparing to unpack .../28-libassuan0_2.5.1-2_amd64.deb ... Unpacking libassuan0:amd64 (2.5.1-2) ... Selecting previously unselected package gpgconf. Preparing to unpack .../29-gpgconf_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpgconf (2.2.4-1ubuntu1.2) ... Selecting previously unselected package libksba8:amd64. Preparing to unpack .../30-libksba8_1.3.5-2_amd64.deb ... Unpacking libksba8:amd64 (1.3.5-2) ... Selecting previously unselected package libnpth0:amd64. Preparing to unpack .../31-libnpth0_1.5-3_amd64.deb ... Unpacking libnpth0:amd64 (1.5-3) ... Selecting previously unselected package dirmngr. Preparing to unpack .../32-dirmngr_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking dirmngr (2.2.4-1ubuntu1.2) ... Selecting previously unselected package libfakeroot:amd64. Preparing to unpack .../33-libfakeroot_1.22-2ubuntu1_amd64.deb ... Unpacking libfakeroot:amd64 (1.22-2ubuntu1) ... Selecting previously unselected package fakeroot. Preparing to unpack .../34-fakeroot_1.22-2ubuntu1_amd64.deb ... Unpacking fakeroot (1.22-2ubuntu1) ... Selecting previously unselected package gnupg-l10n. Preparing to unpack .../35-gnupg-l10n_2.2.4-1ubuntu1.2_all.deb ... Unpacking gnupg-l10n (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gnupg-utils. Preparing to unpack .../36-gnupg-utils_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gnupg-utils (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gpg. Preparing to unpack .../37-gpg_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpg (2.2.4-1ubuntu1.2) ... Selecting previously unselected package pinentry-curses. Preparing to unpack .../38-pinentry-curses_1.1.0-1_amd64.deb ... Unpacking pinentry-curses (1.1.0-1) ... Selecting previously unselected package gpg-agent. Preparing to unpack .../39-gpg-agent_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpg-agent (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gpg-wks-client. Preparing to unpack .../40-gpg-wks-client_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpg-wks-client (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gpg-wks-server. Preparing to unpack .../41-gpg-wks-server_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpg-wks-server (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gpgsm. Preparing to unpack .../42-gpgsm_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpgsm (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gnupg. Preparing to unpack .../43-gnupg_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gnupg (2.2.4-1ubuntu1.2) ... Selecting previously unselected package libalgorithm-diff-perl. Preparing to unpack .../44-libalgorithm-diff-perl_1.19.03-1_all.deb ... Unpacking libalgorithm-diff-perl (1.19.03-1) ... Selecting previously unselected package libalgorithm-diff-xs-perl. Preparing to unpack .../45-libalgorithm-diff-xs-perl_0.04-5_amd64.deb ... Unpacking libalgorithm-diff-xs-perl (0.04-5) ... Selecting previously unselected package libalgorithm-merge-perl. Preparing to unpack .../46-libalgorithm-merge-perl_0.08-3_all.deb ... Unpacking libalgorithm-merge-perl (0.08-3) ... Selecting previously unselected package libexpat1-dev:amd64. Preparing to unpack .../47-libexpat1-dev_2.2.5-3_amd64.deb ... Unpacking libexpat1-dev:amd64 (2.2.5-3) ... Selecting previously unselected package libfile-fcntllock-perl. Preparing to unpack .../48-libfile-fcntllock-perl_0.22-3build2_amd64.deb ... Unpacking libfile-fcntllock-perl (0.22-3build2) ... Selecting previously unselected package libpython3.6:amd64. Preparing to unpack .../49-libpython3.6_3.6.8-1~18.04.1_amd64.deb ... Unpacking libpython3.6:amd64 (3.6.8-1~18.04.1) ... Selecting previously unselected package libpython3.6-dev:amd64. Preparing to unpack .../50-libpython3.6-dev_3.6.8-1~18.04.1_amd64.deb ... Unpacking libpython3.6-dev:amd64 (3.6.8-1~18.04.1) ... Selecting previously unselected package libpython3-dev:amd64. Preparing to unpack .../51-libpython3-dev_3.6.7-1~18.04_amd64.deb ... Unpacking libpython3-dev:amd64 (3.6.7-1~18.04) ... Selecting previously unselected package python-pip-whl. Preparing to unpack .../52-python-pip-whl_9.0.1-2.3~ubuntu1.18.04.1_all.deb ... Unpacking python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1) ... Selecting previously unselected package python3-asn1crypto. Preparing to unpack .../53-python3-asn1crypto_0.24.0-1_all.deb ... Unpacking python3-asn1crypto (0.24.0-1) ... Selecting previously unselected package python3-cffi-backend. Preparing to unpack .../54-python3-cffi-backend_1.11.5-1_amd64.deb ... Unpacking python3-cffi-backend (1.11.5-1) ... Selecting previously unselected package python3-crypto. Preparing to unpack .../55-python3-crypto_2.6.1-8ubuntu2_amd64.deb ... Unpacking python3-crypto (2.6.1-8ubuntu2) ... Selecting previously unselected package python3-idna. Preparing to unpack .../56-python3-idna_2.6-1_all.deb ... Unpacking python3-idna (2.6-1) ... Selecting previously unselected package python3-six. Preparing to unpack .../57-python3-six_1.11.0-2_all.deb ... Unpacking python3-six (1.11.0-2) ... Selecting previously unselected package python3-cryptography. Preparing to unpack .../58-python3-cryptography_2.1.4-1ubuntu1.3_amd64.deb ... Unpacking python3-cryptography (2.1.4-1ubuntu1.3) ... Selecting previously unselected package python3.6-dev. Preparing to unpack .../59-python3.6-dev_3.6.8-1~18.04.1_amd64.deb ... Unpacking python3.6-dev (3.6.8-1~18.04.1) ... Selecting previously unselected package python3-dev. Preparing to unpack .../60-python3-dev_3.6.7-1~18.04_amd64.deb ... Unpacking python3-dev (3.6.7-1~18.04) ... Selecting previously unselected package python3-secretstorage. Preparing to unpack .../61-python3-secretstorage_2.3.1-2_all.deb ... Unpacking python3-secretstorage (2.3.1-2) ... Selecting previously unselected package python3-keyring. Preparing to unpack .../62-python3-keyring_10.6.0-1_all.deb ... Unpacking python3-keyring (10.6.0-1) ... Selecting previously unselected package python3-keyrings.alt. Preparing to unpack .../63-python3-keyrings.alt_3.0-1_all.deb ... Unpacking python3-keyrings.alt (3.0-1) ... Selecting previously unselected package python3-pip. Preparing to unpack .../64-python3-pip_9.0.1-2.3~ubuntu1.18.04.1_all.deb ... Unpacking python3-pip (9.0.1-2.3~ubuntu1.18.04.1) ... Selecting previously unselected package python3-pkg-resources. Preparing to unpack .../65-python3-pkg-resources_39.0.1-2_all.deb ... Unpacking python3-pkg-resources (39.0.1-2) ... Selecting previously unselected package python3-setuptools. Preparing to unpack .../66-python3-setuptools_39.0.1-2_all.deb ... Unpacking python3-setuptools (39.0.1-2) ... Selecting previously unselected package python3-wheel. Preparing to unpack .../67-python3-wheel_0.30.0-0.2_all.deb ... Unpacking python3-wheel (0.30.0-0.2) ... Selecting previously unselected package python3-xdg. Preparing to unpack .../68-python3-xdg_0.25-4ubuntu1_all.deb ... Unpacking python3-xdg (0.25-4ubuntu1) ... Setting up libnpth0:amd64 (1.5-3) ... Setting up python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1) ... Setting up python3-cffi-backend (1.11.5-1) ... Setting up python3-crypto (2.6.1-8ubuntu2) ... Setting up libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.3) ... No schema files found: doing nothing. Setting up python3-idna (2.6-1) ... Setting up python3-xdg (0.25-4ubuntu1) ... Setting up python3-six (1.11.0-2) ... Setting up libksba8:amd64 (1.3.5-2) ... Setting up python3-wheel (0.30.0-0.2) ... Setting up perl-modules-5.26 (5.26.1-6ubuntu0.3) ... Setting up python3-pkg-resources (39.0.1-2) ... Setting up libgdbm5:amd64 (1.14.1-6) ... Setting up libgirepository-1.0-1:amd64 (1.56.1-1) ... Setting up gnupg-l10n (2.2.4-1ubuntu1.2) ... Setting up libstdc++-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up python3-asn1crypto (0.24.0-1) ... Setting up gir1.2-glib-2.0:amd64 (1.56.1-1) ... Setting up patch (2.7.6-2ubuntu1) ... Setting up libglib2.0-data (2.56.4-0ubuntu0.18.04.3) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up libapparmor1:amd64 (2.12-4ubuntu5.1) ... Setting up libfakeroot:amd64 (1.22-2ubuntu1) ... Setting up liblocale-gettext-perl (1.07-3build2) ... Setting up libexpat1-dev:amd64 (2.2.5-3) ... Setting up shared-mime-info (1.9-2) ... Setting up libgdbm-compat4:amd64 (1.14.1-6) ... Setting up python3-lib2to3 (3.6.8-1~18.04) ... Setting up libassuan0:amd64 (2.5.1-2) ... Setting up xdg-user-dirs (0.17-1ubuntu1) ... Setting up python3-distutils (3.6.8-1~18.04) ... Setting up libdbus-1-3:amd64 (1.12.2-1ubuntu1.1) ... Setting up libpython3.6:amd64 (3.6.8-1~18.04.1) ... Setting up netbase (5.4) ... Setting up python3-cryptography (2.1.4-1ubuntu1.3) ... Setting up python3-dbus (1.2.6-1) ... Setting up g++-7 (7.4.0-1ubuntu1~18.04.1) ... Setting up gpgconf (2.2.4-1ubuntu1.2) ... Setting up python3-keyrings.alt (3.0-1) ... Setting up python3-gi (3.26.1-2ubuntu1) ... Setting up fakeroot (1.22-2ubuntu1) ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode update-alternatives: warning: skip creation of /usr/share/man/man1/fakeroot.1.gz because associated file /usr/share/man/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/faked.1.gz because associated file /usr/share/man/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/es/man1/fakeroot.1.gz because associated file /usr/share/man/es/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/es/man1/faked.1.gz because associated file /usr/share/man/es/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/fr/man1/fakeroot.1.gz because associated file /usr/share/man/fr/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/fr/man1/faked.1.gz because associated file /usr/share/man/fr/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/sv/man1/fakeroot.1.gz because associated file /usr/share/man/sv/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/sv/man1/faked.1.gz because associated file /usr/share/man/sv/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist Setting up libpython3.6-dev:amd64 (3.6.8-1~18.04.1) ... Setting up libperl5.26:amd64 (5.26.1-6ubuntu0.3) ... Setting up gpgsm (2.2.4-1ubuntu1.2) ... Setting up python3-pip (9.0.1-2.3~ubuntu1.18.04.1) ... Setting up gnupg-utils (2.2.4-1ubuntu1.2) ... Setting up g++ (4:7.4.0-1ubuntu2.3) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode update-alternatives: warning: skip creation of /usr/share/man/man1/c++.1.gz because associated file /usr/share/man/man1/g++.1.gz (of link group c++) doesn't exist Setting up pinentry-curses (1.1.0-1) ... Setting up dbus (1.12.2-1ubuntu1.1) ... Setting up python3-setuptools (39.0.1-2) ... Setting up python3.6-dev (3.6.8-1~18.04.1) ... Setting up python3-secretstorage (2.3.1-2) ... Setting up dirmngr (2.2.4-1ubuntu1.2) ... Setting up dh-python (3.20180325ubuntu2) ... Setting up gpg (2.2.4-1ubuntu1.2) ... Setting up libpython3-dev:amd64 (3.6.7-1~18.04) ... Setting up python3-keyring (10.6.0-1) ... Setting up gpg-agent (2.2.4-1ubuntu1.2) ... Setting up python3-dev (3.6.7-1~18.04) ... Setting up gpg-wks-server (2.2.4-1ubuntu1.2) ... Setting up gpg-wks-client (2.2.4-1ubuntu1.2) ... Setting up perl (5.26.1-6ubuntu0.3) ... Setting up libfile-fcntllock-perl (0.22-3build2) ... Setting up libalgorithm-diff-perl (1.19.03-1) ... Setting up gnupg (2.2.4-1ubuntu1.2) ... Setting up libdpkg-perl (1.19.0.5ubuntu2.1) ... Setting up libalgorithm-merge-perl (0.08-3) ... Setting up dpkg-dev (1.19.0.5ubuntu2.1) ... Setting up libalgorithm-diff-xs-perl (0.04-5) ... Setting up build-essential (12.4ubuntu1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... root@02b32b9272ce:/# pip install numpy openjij bash: pip: command not found root@02b32b9272ce:/# pip3 install numpy openjij Collecting numpy Downloading https://files.pythonhosted.org/packages/87/2d/e4656149cbadd3a8a0369fcd1a9c7d61cc7b87b3903b85389c70c989a696/numpy-1.16.4-cp36-cp36m-manylinux1_x86_64.whl (17.3MB) 100% |################################| 17.3MB 90kB/s Collecting openjij Downloading https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz (80kB) 100% |################################| 81kB 4.4MB/s Collecting requests (from openjij) Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB) 100% |################################| 61kB 4.7MB/s Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->openjij) Downloading https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl (150kB) 100% |################################| 153kB 8.2MB/s Collecting chardet<3.1.0,>=3.0.2 (from requests->openjij) Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB) 100% |################################| 143kB 3.9MB/s Collecting certifi>=2017.4.17 (from requests->openjij) Downloading https://files.pythonhosted.org/packages/69/1b/b853c7a9d4f6a6d00749e94eb6f3a041e342a885b87340b79c1ef73e3a78/certifi-2019.6.16-py2.py3-none-any.whl (157kB) 100% |################################| 163kB 8.2MB/s Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests->openjij) Building wheels for collected packages: openjij Running setup.py bdist_wheel for openjij ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yn5j75hx/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpgiwgl9yypip-wheel- --python-tag cp36: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.6/openjij creating build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.6/openjij/model creating build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.6/openjij/sampler running build_ext <__main__.CMakeExtension('cxxjij') at 0x7f94c27fd400> cxxjij CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.11 or higher is required. You are running version 3.10.2 -- Configuring incomplete, errors occurred! Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 126, in <module> zip_safe=False File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 42, in run self.build_extension(ext) File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 69, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_kwargs, cwd=self.build_temp, env=env) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-yn5j75hx/openjij', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-yn5j75hx/openjij/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Failed building wheel for openjij Running setup.py clean for openjij Failed to build openjij Installing collected packages: numpy, urllib3, chardet, certifi, requests, openjij Running setup.py install for openjij ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yn5j75hx/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jop77n9c-record/install-record.txt --single-version-externally-managed --compile: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.6/openjij creating build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.6/openjij/model creating build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.6/openjij/sampler running build_ext <__main__.CMakeExtension('cxxjij') at 0x7f69320b9898> cxxjij CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.11 or higher is required. You are running version 3.10.2 -- Configuring incomplete, errors occurred! Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 126, in <module> zip_safe=False File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 42, in run self.build_extension(ext) File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 69, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_kwargs, cwd=self.build_temp, env=env) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-yn5j75hx/openjij', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-yn5j75hx/openjij/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yn5j75hx/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jop77n9c-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-yn5j75hx/openjij/CMake 3.11 or higher is required. You are running version 3.10.2
cmake 3.14を入れてみた。
# pip3 install openjij Collecting openjij Using cached https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from openjij) Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from openjij) Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests->openjij) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Building wheels for collected packages: openjij Running setup.py bdist_wheel for openjij ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-48h2_juh/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpajpqijjspip-wheel- --python-tag cp36: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.6/openjij creating build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.6/openjij/model creating build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.6/openjij/sampler running build_ext <__main__.CMakeExtension('cxxjij') at 0x7f514ecb28d0> cxxjij -- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is GNU 7.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Fetch googletest for C++ testing CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/ExternalProject.cmake:2427 (message): error: could not find git for clone of googletest-populate Call Stack (most recent call first): /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/ExternalProject.cmake:3211 (_ep_add_download_command) CMakeLists.txt:13 (ExternalProject_Add) -- Configuring incomplete, errors occurred! See also "/tmp/pip-build-48h2_juh/openjij/build/temp.linux-x86_64-3.6/_deps/googletest-subbuild/CMakeFiles/CMakeOutput.log". CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FetchContent.cmake:903 (message): CMake step for googletest failed: 1 Call Stack (most recent call first): /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate) CMakeLists.txt:21 (FetchContent_Populate) -- Configuring incomplete, errors occurred! See also "/tmp/pip-build-48h2_juh/openjij/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 126, in <module> zip_safe=False File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 42, in run self.build_extension(ext) File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 69, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_kwargs, cwd=self.build_temp, env=env) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-48h2_juh/openjij', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-48h2_juh/openjij/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Failed building wheel for openjij Running setup.py clean for openjij Failed to build openjij Installing collected packages: openjij Running setup.py install for openjij ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-48h2_juh/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-vichorhz-record/install-record.txt --single-version-externally-managed --compile: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.6/openjij creating build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.6/openjij/model creating build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.6/openjij/sampler running build_ext <__main__.CMakeExtension('cxxjij') at 0x7fa61d106898> cxxjij -- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is GNU 7.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Fetch googletest for C++ testing CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/ExternalProject.cmake:2427 (message): error: could not find git for clone of googletest-populate Call Stack (most recent call first): /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/ExternalProject.cmake:3211 (_ep_add_download_command) CMakeLists.txt:13 (ExternalProject_Add) -- Configuring incomplete, errors occurred! See also "/tmp/pip-build-48h2_juh/openjij/build/temp.linux-x86_64-3.6/_deps/googletest-subbuild/CMakeFiles/CMakeOutput.log". CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FetchContent.cmake:903 (message): CMake step for googletest failed: 1 Call Stack (most recent call first): /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate) CMakeLists.txt:21 (FetchContent_Populate) -- Configuring incomplete, errors occurred! See also "/tmp/pip-build-48h2_juh/openjij/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 126, in <module> zip_safe=False File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 42, in run self.build_extension(ext) File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 69, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_kwargs, cwd=self.build_temp, env=env) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-48h2_juh/openjij', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-48h2_juh/openjij/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-48h2_juh/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-vichorhz-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-48h2_juh/openjij/git がないらしい。
# apt install git Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: cmake-data libarchive13 libcurl4 libjsoncpp1 liblzo2-2 librhash0 libuv1 Use 'apt autoremove' to remove them. The following additional packages will be installed: git-man less libbsd0 libcurl3-gnutls libedit2 liberror-perl libssl1.0.0 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 openssh-client xauth Suggested packages: gettext-base git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn keychain libpam-ssh monkeysphere ssh-askpass The following NEW packages will be installed: git git-man less libbsd0 libcurl3-gnutls libedit2 liberror-perl libssl1.0.0 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 openssh-client xauth 0 upgraded, 17 newly installed, 0 to remove and 0 not upgraded. Need to get 7688 kB of archives. After this operation, 46.3 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxau6 amd64 1:1.0.8-1 [8376 B] Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libbsd0 amd64 0.8.7-1 [41.5 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxdmcp6 amd64 1:1.1.2-3 [10.7 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxcb1 amd64 1.13-2~ubuntu18.04 [45.5 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libx11-data all 2:1.6.4-3ubuntu0.2 [113 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libx11-6 amd64 2:1.6.4-3ubuntu0.2 [569 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxext6 amd64 2:1.3.3-1 [29.4 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 less amd64 487-0.1 [112 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 libedit2 amd64 3.1-20170329-1 [76.9 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl1.0.0 amd64 1.0.2n-1ubuntu5.3 [1088 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxmuu1 amd64 2:1.1.2-2 [9674 B] Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssh-client amd64 1:7.6p1-4ubuntu0.3 [614 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic/main amd64 xauth amd64 1:1.0.10-1 [24.6 kB] Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl3-gnutls amd64 7.58.0-2ubuntu3.7 [212 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic/main amd64 liberror-perl all 0.17025-1 [22.8 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 git-man all 1:2.17.1-1ubuntu0.4 [803 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 git amd64 1:2.17.1-1ubuntu0.4 [3907 kB] Fetched 7688 kB in 4s (2069 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libxau6:amd64. (Reading database ... 17340 files and directories currently installed.) Preparing to unpack .../00-libxau6_1%3a1.0.8-1_amd64.deb ... Unpacking libxau6:amd64 (1:1.0.8-1) ... Selecting previously unselected package libbsd0:amd64. Preparing to unpack .../01-libbsd0_0.8.7-1_amd64.deb ... Unpacking libbsd0:amd64 (0.8.7-1) ... Selecting previously unselected package libxdmcp6:amd64. Preparing to unpack .../02-libxdmcp6_1%3a1.1.2-3_amd64.deb ... Unpacking libxdmcp6:amd64 (1:1.1.2-3) ... Selecting previously unselected package libxcb1:amd64. Preparing to unpack .../03-libxcb1_1.13-2~ubuntu18.04_amd64.deb ... Unpacking libxcb1:amd64 (1.13-2~ubuntu18.04) ... Selecting previously unselected package libx11-data. Preparing to unpack .../04-libx11-data_2%3a1.6.4-3ubuntu0.2_all.deb ... Unpacking libx11-data (2:1.6.4-3ubuntu0.2) ... Selecting previously unselected package libx11-6:amd64. Preparing to unpack .../05-libx11-6_2%3a1.6.4-3ubuntu0.2_amd64.deb ... Unpacking libx11-6:amd64 (2:1.6.4-3ubuntu0.2) ... Selecting previously unselected package libxext6:amd64. Preparing to unpack .../06-libxext6_2%3a1.3.3-1_amd64.deb ... Unpacking libxext6:amd64 (2:1.3.3-1) ... Selecting previously unselected package less. Preparing to unpack .../07-less_487-0.1_amd64.deb ... Unpacking less (487-0.1) ... Selecting previously unselected package libedit2:amd64. Preparing to unpack .../08-libedit2_3.1-20170329-1_amd64.deb ... Unpacking libedit2:amd64 (3.1-20170329-1) ... Selecting previously unselected package libssl1.0.0:amd64. Preparing to unpack .../09-libssl1.0.0_1.0.2n-1ubuntu5.3_amd64.deb ... Unpacking libssl1.0.0:amd64 (1.0.2n-1ubuntu5.3) ... Selecting previously unselected package libxmuu1:amd64. Preparing to unpack .../10-libxmuu1_2%3a1.1.2-2_amd64.deb ... Unpacking libxmuu1:amd64 (2:1.1.2-2) ... Selecting previously unselected package openssh-client. Preparing to unpack .../11-openssh-client_1%3a7.6p1-4ubuntu0.3_amd64.deb ... Unpacking openssh-client (1:7.6p1-4ubuntu0.3) ... Selecting previously unselected package xauth. Preparing to unpack .../12-xauth_1%3a1.0.10-1_amd64.deb ... Unpacking xauth (1:1.0.10-1) ... Selecting previously unselected package libcurl3-gnutls:amd64. Preparing to unpack .../13-libcurl3-gnutls_7.58.0-2ubuntu3.7_amd64.deb ... Unpacking libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.7) ... Selecting previously unselected package liberror-perl. Preparing to unpack .../14-liberror-perl_0.17025-1_all.deb ... Unpacking liberror-perl (0.17025-1) ... Selecting previously unselected package git-man. Preparing to unpack .../15-git-man_1%3a2.17.1-1ubuntu0.4_all.deb ... Unpacking git-man (1:2.17.1-1ubuntu0.4) ... Selecting previously unselected package git. Preparing to unpack .../16-git_1%3a2.17.1-1ubuntu0.4_amd64.deb ... Unpacking git (1:2.17.1-1ubuntu0.4) ... Setting up libedit2:amd64 (3.1-20170329-1) ... Setting up git-man (1:2.17.1-1ubuntu0.4) ... Setting up less (487-0.1) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Setting up libssl1.0.0:amd64 (1.0.2n-1ubuntu5.3) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Processing triggers for mime-support (3.60ubuntu1) ... Setting up liberror-perl (0.17025-1) ... Setting up libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.7) ... Setting up libbsd0:amd64 (0.8.7-1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up libxdmcp6:amd64 (1:1.1.2-3) ... Setting up openssh-client (1:7.6p1-4ubuntu0.3) ... Setting up git (1:2.17.1-1ubuntu0.4) ... Setting up libx11-data (2:1.6.4-3ubuntu0.2) ... Setting up libxau6:amd64 (1:1.0.8-1) ... Setting up libxcb1:amd64 (1.13-2~ubuntu18.04) ... Setting up libx11-6:amd64 (2:1.6.4-3ubuntu0.2) ... Setting up libxmuu1:amd64 (2:1.1.2-2) ... Setting up libxext6:amd64 (2:1.3.3-1) ... Setting up xauth (1:1.0.10-1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ...そして
root@02b32b9272ce:/# pip3 install openjij Collecting openjij Using cached https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from openjij) Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from openjij) Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests->openjij) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Building wheels for collected packages: openjij Running setup.py bdist_wheel for openjij ... done Stored in directory: /root/.cache/pip/wheels/bf/8d/f6/04623fb4b2e90c961fc7b531fb6ab26825b3bef6ae1ef350e6 Successfully built openjij Installing collected packages: openjij Successfully installed openjij-0.0.7ということは、
git
CMake 3.11 or higher is required.
python3
pip
numpyが必要だということ。
dockerでは
apt update, apt -y upgrade
apt -y vim wget
していること。では、1からやってみる。
- 投稿日:2019-06-25T20:03:18+09:00
Open jij導入失敗(2)何度もやりなおし成功
Open jij導入失敗
https://qiita.com/kaizen_nagoya/items/11cb393d5b8ce9019cd6ではdocker の anacondaで始めた。
apt update, apt -y apgradeしてないことに気が付いた。
cmakeが入っていないとまずいことが途中でわかった。
今回は素のubuntuで初めて見る。macOS$ docker run -it ubuntu /bin/bashdocker# apt update; apt -y upgrade Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB] Get:3 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [5436 B] Get:4 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [557 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:6 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [719 kB] Get:7 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4169 B] Get:8 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB] Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [7239 B] Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1226 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [10.8 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [861 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2496 B] Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [3927 B] Fetched 16.8 MB in 17s (977 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 12 packages can be upgraded. Run 'apt list --upgradable' to see them. Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: apt bash debconf gcc-8-base libapt-pkg5.0 libdb5.3 libgcc1 libgnutls30 libseccomp2 libstdc++6 libsystemd0 libudev1 12 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 4784 kB of archives. After this operation, 20.5 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 bash amd64 4.4.18-2ubuntu1.1 [615 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-8-base amd64 8.3.0-6ubuntu1~18.04.1 [18.7 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc1 amd64 1:8.3.0-6ubuntu1~18.04.1 [40.7 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libstdc++6 amd64 8.3.0-6ubuntu1~18.04.1 [400 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsystemd0 amd64 237-3ubuntu10.23 [204 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libudev1 amd64 237-3ubuntu10.23 [53.6 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapt-pkg5.0 amd64 1.6.11 [806 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgnutls30 amd64 3.5.18-1ubuntu1.1 [645 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libseccomp2 amd64 2.4.1-0ubuntu0.18.04.2 [39.1 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 apt amd64 1.6.11 [1166 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 debconf all 1.5.66ubuntu1 [124 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdb5.3 amd64 5.3.28-13.1ubuntu1.1 [672 kB] Fetched 4784 kB in 4s (1132 kB/s) debconf: delaying package configuration, since apt-utils is not installed (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../bash_4.4.18-2ubuntu1.1_amd64.deb ... Unpacking bash (4.4.18-2ubuntu1.1) over (4.4.18-2ubuntu1) ... Setting up bash (4.4.18-2ubuntu1.1) ... update-alternatives: error: alternative path /usr/share/man/man7/bash-builtins.7.gz doesn't exist (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../gcc-8-base_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking gcc-8-base:amd64 (8.3.0-6ubuntu1~18.04.1) over (8.3.0-6ubuntu1~18.04) ... Setting up gcc-8-base:amd64 (8.3.0-6ubuntu1~18.04.1) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libgcc1_1%3a8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libgcc1:amd64 (1:8.3.0-6ubuntu1~18.04.1) over (1:8.3.0-6ubuntu1~18.04) ... Setting up libgcc1:amd64 (1:8.3.0-6ubuntu1~18.04.1) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libstdc++6_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libstdc++6:amd64 (8.3.0-6ubuntu1~18.04.1) over (8.3.0-6ubuntu1~18.04) ... Setting up libstdc++6:amd64 (8.3.0-6ubuntu1~18.04.1) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libsystemd0_237-3ubuntu10.23_amd64.deb ... Unpacking libsystemd0:amd64 (237-3ubuntu10.23) over (237-3ubuntu10.21) ... Setting up libsystemd0:amd64 (237-3ubuntu10.23) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libudev1_237-3ubuntu10.23_amd64.deb ... Unpacking libudev1:amd64 (237-3ubuntu10.23) over (237-3ubuntu10.21) ... Setting up libudev1:amd64 (237-3ubuntu10.23) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libapt-pkg5.0_1.6.11_amd64.deb ... Unpacking libapt-pkg5.0:amd64 (1.6.11) over (1.6.10) ... Setting up libapt-pkg5.0:amd64 (1.6.11) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libgnutls30_3.5.18-1ubuntu1.1_amd64.deb ... Unpacking libgnutls30:amd64 (3.5.18-1ubuntu1.1) over (3.5.18-1ubuntu1) ... Setting up libgnutls30:amd64 (3.5.18-1ubuntu1.1) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libseccomp2_2.4.1-0ubuntu0.18.04.2_amd64.deb ... Unpacking libseccomp2:amd64 (2.4.1-0ubuntu0.18.04.2) over (2.3.1-2.1ubuntu4.1) ... Setting up libseccomp2:amd64 (2.4.1-0ubuntu0.18.04.2) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../archives/apt_1.6.11_amd64.deb ... Unpacking apt (1.6.11) over (1.6.10) ... Setting up apt (1.6.11) ... Installing new version of config file /etc/apt/apt.conf.d/01autoremove ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../debconf_1.5.66ubuntu1_all.deb ... Unpacking debconf (1.5.66ubuntu1) over (1.5.66) ... Setting up debconf (1.5.66ubuntu1) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libdb5.3_5.3.28-13.1ubuntu1.1_amd64.deb ... Unpacking libdb5.3:amd64 (5.3.28-13.1ubuntu1.1) over (5.3.28-13.1ubuntu1) ... Setting up libdb5.3:amd64 (5.3.28-13.1ubuntu1.1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... root@02b32b9272ce:/# apt install python3 Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: file libexpat1 libmagic-mgc libmagic1 libmpdec2 libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libreadline7 libsqlite3-0 libssl1.1 mime-support python3-minimal python3.6 python3.6-minimal readline-common xz-utils Suggested packages: python3-doc python3-tk python3-venv python3.6-venv python3.6-doc binutils binfmt-support readline-doc The following NEW packages will be installed: file libexpat1 libmagic-mgc libmagic1 libmpdec2 libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libreadline7 libsqlite3-0 libssl1.1 mime-support python3 python3-minimal python3.6 python3.6-minimal readline-common xz-utils 0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded. Need to get 6670 kB of archives. After this operation, 34.1 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl1.1 amd64 1.1.1-1ubuntu2.1~18.04.3 [1295 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-minimal amd64 3.6.8-1~18.04.1 [533 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libexpat1 amd64 2.2.5-3 [80.2 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-minimal amd64 3.6.8-1~18.04.1 [1620 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-minimal amd64 3.6.7-1~18.04 [23.7 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 mime-support all 3.60ubuntu1 [30.1 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpdec2 amd64 2.4.2-1ubuntu1 [84.1 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 readline-common all 7.0-3 [52.9 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 libreadline7 amd64 7.0-3 [124 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsqlite3-0 amd64 3.22.0-1ubuntu0.1 [497 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-stdlib amd64 3.6.8-1~18.04.1 [1715 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6 amd64 3.6.8-1~18.04.1 [202 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3-stdlib amd64 3.6.7-1~18.04 [7240 B] Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3 amd64 3.6.7-1~18.04 [47.2 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic-mgc amd64 1:5.32-2ubuntu0.2 [184 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic1 amd64 1:5.32-2ubuntu0.2 [68.5 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 file amd64 1:5.32-2ubuntu0.2 [22.1 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic/main amd64 xz-utils amd64 5.2.2-1.3 [83.8 kB] Fetched 6670 kB in 5s (1272 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libssl1.1:amd64. (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libssl1.1_1.1.1-1ubuntu2.1~18.04.3_amd64.deb ... Unpacking libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.3) ... Selecting previously unselected package libpython3.6-minimal:amd64. Preparing to unpack .../libpython3.6-minimal_3.6.8-1~18.04.1_amd64.deb ... Unpacking libpython3.6-minimal:amd64 (3.6.8-1~18.04.1) ... Selecting previously unselected package libexpat1:amd64. Preparing to unpack .../libexpat1_2.2.5-3_amd64.deb ... Unpacking libexpat1:amd64 (2.2.5-3) ... Selecting previously unselected package python3.6-minimal. Preparing to unpack .../python3.6-minimal_3.6.8-1~18.04.1_amd64.deb ... Unpacking python3.6-minimal (3.6.8-1~18.04.1) ... Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.3) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Setting up libpython3.6-minimal:amd64 (3.6.8-1~18.04.1) ... Setting up libexpat1:amd64 (2.2.5-3) ... Setting up python3.6-minimal (3.6.8-1~18.04.1) ... Selecting previously unselected package python3-minimal. (Reading database ... 4297 files and directories currently installed.) Preparing to unpack .../0-python3-minimal_3.6.7-1~18.04_amd64.deb ... Unpacking python3-minimal (3.6.7-1~18.04) ... Selecting previously unselected package mime-support. Preparing to unpack .../1-mime-support_3.60ubuntu1_all.deb ... Unpacking mime-support (3.60ubuntu1) ... Selecting previously unselected package libmpdec2:amd64. Preparing to unpack .../2-libmpdec2_2.4.2-1ubuntu1_amd64.deb ... Unpacking libmpdec2:amd64 (2.4.2-1ubuntu1) ... Selecting previously unselected package readline-common. Preparing to unpack .../3-readline-common_7.0-3_all.deb ... Unpacking readline-common (7.0-3) ... Selecting previously unselected package libreadline7:amd64. Preparing to unpack .../4-libreadline7_7.0-3_amd64.deb ... Unpacking libreadline7:amd64 (7.0-3) ... Selecting previously unselected package libsqlite3-0:amd64. Preparing to unpack .../5-libsqlite3-0_3.22.0-1ubuntu0.1_amd64.deb ... Unpacking libsqlite3-0:amd64 (3.22.0-1ubuntu0.1) ... Selecting previously unselected package libpython3.6-stdlib:amd64. Preparing to unpack .../6-libpython3.6-stdlib_3.6.8-1~18.04.1_amd64.deb ... Unpacking libpython3.6-stdlib:amd64 (3.6.8-1~18.04.1) ... Selecting previously unselected package python3.6. Preparing to unpack .../7-python3.6_3.6.8-1~18.04.1_amd64.deb ... Unpacking python3.6 (3.6.8-1~18.04.1) ... Selecting previously unselected package libpython3-stdlib:amd64. Preparing to unpack .../8-libpython3-stdlib_3.6.7-1~18.04_amd64.deb ... Unpacking libpython3-stdlib:amd64 (3.6.7-1~18.04) ... Setting up python3-minimal (3.6.7-1~18.04) ... Selecting previously unselected package python3. (Reading database ... 4755 files and directories currently installed.) Preparing to unpack .../python3_3.6.7-1~18.04_amd64.deb ... Unpacking python3 (3.6.7-1~18.04) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../libmagic-mgc_1%3a5.32-2ubuntu0.2_amd64.deb ... Unpacking libmagic-mgc (1:5.32-2ubuntu0.2) ... Selecting previously unselected package libmagic1:amd64. Preparing to unpack .../libmagic1_1%3a5.32-2ubuntu0.2_amd64.deb ... Unpacking libmagic1:amd64 (1:5.32-2ubuntu0.2) ... Selecting previously unselected package file. Preparing to unpack .../file_1%3a5.32-2ubuntu0.2_amd64.deb ... Unpacking file (1:5.32-2ubuntu0.2) ... Selecting previously unselected package xz-utils. Preparing to unpack .../xz-utils_5.2.2-1.3_amd64.deb ... Unpacking xz-utils (5.2.2-1.3) ... Setting up readline-common (7.0-3) ... Setting up mime-support (3.60ubuntu1) ... Setting up libreadline7:amd64 (7.0-3) ... Setting up libmagic-mgc (1:5.32-2ubuntu0.2) ... Setting up libmagic1:amd64 (1:5.32-2ubuntu0.2) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up xz-utils (5.2.2-1.3) ... update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode update-alternatives: warning: skip creation of /usr/share/man/man1/lzma.1.gz because associated file /usr/share/man/man1/xz.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/unlzma.1.gz because associated file /usr/share/man/man1/unxz.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzcat.1.gz because associated file /usr/share/man/man1/xzcat.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzmore.1.gz because associated file /usr/share/man/man1/xzmore.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzless.1.gz because associated file /usr/share/man/man1/xzless.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzdiff.1.gz because associated file /usr/share/man/man1/xzdiff.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzcmp.1.gz because associated file /usr/share/man/man1/xzcmp.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzgrep.1.gz because associated file /usr/share/man/man1/xzgrep.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzegrep.1.gz because associated file /usr/share/man/man1/xzegrep.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzfgrep.1.gz because associated file /usr/share/man/man1/xzfgrep.1.gz (of link group lzma) doesn't exist Setting up libsqlite3-0:amd64 (3.22.0-1ubuntu0.1) ... Setting up libmpdec2:amd64 (2.4.2-1ubuntu1) ... Setting up libpython3.6-stdlib:amd64 (3.6.8-1~18.04.1) ... Setting up python3.6 (3.6.8-1~18.04.1) ... Setting up file (1:5.32-2ubuntu0.2) ... Setting up libpython3-stdlib:amd64 (3.6.7-1~18.04) ... Setting up python3 (3.6.7-1~18.04) ... running python rtupdate hooks for python3.6... running python post-rtupdate hooks for python3.6... Processing triggers for libc-bin (2.27-3ubuntu1) ... root@02b32b9272ce:/# apt install pip Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package pip root@02b32b9272ce:/# apt install cmake Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: binutils binutils-common binutils-x86-64-linux-gnu ca-certificates cmake-data cpp cpp-7 gcc gcc-7 gcc-7-base krb5-locales libarchive13 libasan4 libasn1-8-heimdal libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libcurl4 libgcc-7-dev libgomp1 libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libicu60 libisl19 libitm1 libjsoncpp1 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common liblsan0 liblzo2-2 libmpc3 libmpfr6 libmpx2 libnghttp2-14 libpsl5 libquadmath0 librhash0 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libtsan0 libubsan0 libuv1 libwind0-heimdal libxml2 linux-libc-dev make manpages manpages-dev multiarch-support openssl publicsuffix Suggested packages: binutils-doc cmake-doc ninja-build cpp-doc gcc-7-locales gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-7-multilib gcc-7-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg lrzip glibc-doc krb5-doc krb5-user libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql make-doc man-browser The following NEW packages will be installed: binutils binutils-common binutils-x86-64-linux-gnu ca-certificates cmake cmake-data cpp cpp-7 gcc gcc-7 gcc-7-base krb5-locales libarchive13 libasan4 libasn1-8-heimdal libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libcurl4 libgcc-7-dev libgomp1 libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libicu60 libisl19 libitm1 libjsoncpp1 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common liblsan0 liblzo2-2 libmpc3 libmpfr6 libmpx2 libnghttp2-14 libpsl5 libquadmath0 librhash0 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libtsan0 libubsan0 libuv1 libwind0-heimdal libxml2 linux-libc-dev make manpages manpages-dev multiarch-support openssl publicsuffix 0 upgraded, 67 newly installed, 0 to remove and 0 not upgraded. Need to get 45.2 MB of archives. After this operation, 187 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 multiarch-support amd64 2.27-3ubuntu1 [6916 B] Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 liblzo2-2 amd64 2.08-1.2 [48.7 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssl amd64 1.1.1-1ubuntu2.1~18.04.3 [614 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 ca-certificates all 20180409 [151 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 libicu60 amd64 60.2-3ubuntu3 [8054 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxml2 amd64 2.9.4+dfsg1-6.1ubuntu1.2 [663 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 krb5-locales all 1.16-2ubuntu0.1 [13.5 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libkrb5support0 amd64 1.16-2ubuntu0.1 [30.9 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libk5crypto3 amd64 1.16-2ubuntu0.1 [85.6 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic/main amd64 libkeyutils1 amd64 1.5.9-9.2ubuntu2 [8720 B] Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libkrb5-3 amd64 1.16-2ubuntu0.1 [279 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgssapi-krb5-2 amd64 1.16-2ubuntu0.1 [122 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpsl5 amd64 0.19.1-5build1 [41.8 kB] Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 manpages all 4.15-1 [1234 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic/main amd64 publicsuffix all 20180223.1310-1 [97.6 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-21ubuntu1~18.04.2 [193 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libbinutils amd64 2.30-21ubuntu1~18.04.2 [503 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.30-21ubuntu1~18.04.2 [1856 kB] Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils amd64 2.30-21ubuntu1~18.04.2 [3396 B] Get:20 http://archive.ubuntu.com/ubuntu bionic/main amd64 cmake-data all 3.10.2-1ubuntu2 [1331 kB] Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libarchive13 amd64 3.2.2-3.1ubuntu0.3 [288 kB] Get:22 http://archive.ubuntu.com/ubuntu bionic/main amd64 libroken18-heimdal amd64 7.5.0+dfsg-1 [41.3 kB] Get:23 http://archive.ubuntu.com/ubuntu bionic/main amd64 libasn1-8-heimdal amd64 7.5.0+dfsg-1 [175 kB] Get:24 http://archive.ubuntu.com/ubuntu bionic/main amd64 libheimbase1-heimdal amd64 7.5.0+dfsg-1 [29.3 kB] Get:25 http://archive.ubuntu.com/ubuntu bionic/main amd64 libhcrypto4-heimdal amd64 7.5.0+dfsg-1 [85.9 kB] Get:26 http://archive.ubuntu.com/ubuntu bionic/main amd64 libwind0-heimdal amd64 7.5.0+dfsg-1 [47.8 kB] Get:27 http://archive.ubuntu.com/ubuntu bionic/main amd64 libhx509-5-heimdal amd64 7.5.0+dfsg-1 [107 kB] Get:28 http://archive.ubuntu.com/ubuntu bionic/main amd64 libkrb5-26-heimdal amd64 7.5.0+dfsg-1 [206 kB] Get:29 http://archive.ubuntu.com/ubuntu bionic/main amd64 libheimntlm0-heimdal amd64 7.5.0+dfsg-1 [14.8 kB] Get:30 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgssapi3-heimdal amd64 7.5.0+dfsg-1 [96.5 kB] Get:31 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsasl2-modules-db amd64 2.1.27~101-g0780600+dfsg-3ubuntu2 [14.8 kB] Get:32 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsasl2-2 amd64 2.1.27~101-g0780600+dfsg-3ubuntu2 [49.2 kB] Get:33 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libldap-common all 2.4.45+dfsg-1ubuntu1.2 [16.7 kB] Get:34 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libldap-2.4-2 amd64 2.4.45+dfsg-1ubuntu1.2 [155 kB] Get:35 http://archive.ubuntu.com/ubuntu bionic/main amd64 libnghttp2-14 amd64 1.30.0-1ubuntu1 [77.8 kB] Get:36 http://archive.ubuntu.com/ubuntu bionic/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-1 [54.2 kB] Get:37 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.7 [214 kB] Get:38 http://archive.ubuntu.com/ubuntu bionic/main amd64 libjsoncpp1 amd64 1.7.4-3 [73.6 kB] Get:39 http://archive.ubuntu.com/ubuntu bionic/main amd64 librhash0 amd64 1.3.6-2 [78.1 kB] Get:40 http://archive.ubuntu.com/ubuntu bionic/main amd64 libuv1 amd64 1.18.0-3 [64.4 kB] Get:41 http://archive.ubuntu.com/ubuntu bionic/main amd64 cmake amd64 3.10.2-1ubuntu2 [3138 kB] Get:42 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7-base amd64 7.4.0-1ubuntu1~18.04.1 [18.9 kB] Get:43 http://archive.ubuntu.com/ubuntu bionic/main amd64 libisl19 amd64 0.19-1 [551 kB] Get:44 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpfr6 amd64 4.0.1-1 [243 kB] Get:45 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpc3 amd64 1.1.0-1 [40.8 kB] Get:46 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cpp-7 amd64 7.4.0-1ubuntu1~18.04.1 [6742 kB] Get:47 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cpp amd64 4:7.4.0-1ubuntu2.3 [27.7 kB] Get:48 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcc1-0 amd64 8.3.0-6ubuntu1~18.04.1 [47.4 kB] Get:49 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgomp1 amd64 8.3.0-6ubuntu1~18.04.1 [76.4 kB] Get:50 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libitm1 amd64 8.3.0-6ubuntu1~18.04.1 [28.0 kB] Get:51 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libatomic1 amd64 8.3.0-6ubuntu1~18.04.1 [9184 B] Get:52 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libasan4 amd64 7.4.0-1ubuntu1~18.04.1 [359 kB] Get:53 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 liblsan0 amd64 8.3.0-6ubuntu1~18.04.1 [133 kB] Get:54 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libtsan0 amd64 8.3.0-6ubuntu1~18.04.1 [288 kB] Get:55 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libubsan0 amd64 7.4.0-1ubuntu1~18.04.1 [126 kB] Get:56 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcilkrts5 amd64 7.4.0-1ubuntu1~18.04.1 [42.5 kB] Get:57 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmpx2 amd64 8.3.0-6ubuntu1~18.04.1 [11.6 kB] Get:58 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libquadmath0 amd64 8.3.0-6ubuntu1~18.04.1 [133 kB] Get:59 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc-7-dev amd64 7.4.0-1ubuntu1~18.04.1 [2381 kB] Get:60 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7 amd64 7.4.0-1ubuntu1~18.04.1 [7463 kB] Get:61 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc amd64 4:7.4.0-1ubuntu2.3 [5184 B] Get:62 http://archive.ubuntu.com/ubuntu bionic/main amd64 libc-dev-bin amd64 2.27-3ubuntu1 [71.8 kB] Get:63 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-52.56 [1004 kB] Get:64 http://archive.ubuntu.com/ubuntu bionic/main amd64 libc6-dev amd64 2.27-3ubuntu1 [2587 kB] Get:65 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsasl2-modules amd64 2.1.27~101-g0780600+dfsg-3ubuntu2 [48.7 kB] Get:66 http://archive.ubuntu.com/ubuntu bionic/main amd64 make amd64 4.1-9.1ubuntu1 [154 kB] Get:67 http://archive.ubuntu.com/ubuntu bionic/main amd64 manpages-dev all 4.15-1 [2217 kB] Fetched 45.2 MB in 13s (3366 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package multiarch-support. (Reading database ... 4859 files and directories currently installed.) Preparing to unpack .../multiarch-support_2.27-3ubuntu1_amd64.deb ... Unpacking multiarch-support (2.27-3ubuntu1) ... Setting up multiarch-support (2.27-3ubuntu1) ... Selecting previously unselected package liblzo2-2:amd64. (Reading database ... 4862 files and directories currently installed.) Preparing to unpack .../00-liblzo2-2_2.08-1.2_amd64.deb ... Unpacking liblzo2-2:amd64 (2.08-1.2) ... Selecting previously unselected package openssl. Preparing to unpack .../01-openssl_1.1.1-1ubuntu2.1~18.04.3_amd64.deb ... Unpacking openssl (1.1.1-1ubuntu2.1~18.04.3) ... Selecting previously unselected package ca-certificates. Preparing to unpack .../02-ca-certificates_20180409_all.deb ... Unpacking ca-certificates (20180409) ... Selecting previously unselected package libicu60:amd64. Preparing to unpack .../03-libicu60_60.2-3ubuntu3_amd64.deb ... Unpacking libicu60:amd64 (60.2-3ubuntu3) ... Selecting previously unselected package libxml2:amd64. Preparing to unpack .../04-libxml2_2.9.4+dfsg1-6.1ubuntu1.2_amd64.deb ... Unpacking libxml2:amd64 (2.9.4+dfsg1-6.1ubuntu1.2) ... Selecting previously unselected package krb5-locales. Preparing to unpack .../05-krb5-locales_1.16-2ubuntu0.1_all.deb ... Unpacking krb5-locales (1.16-2ubuntu0.1) ... Selecting previously unselected package libkrb5support0:amd64. Preparing to unpack .../06-libkrb5support0_1.16-2ubuntu0.1_amd64.deb ... Unpacking libkrb5support0:amd64 (1.16-2ubuntu0.1) ... Selecting previously unselected package libk5crypto3:amd64. Preparing to unpack .../07-libk5crypto3_1.16-2ubuntu0.1_amd64.deb ... Unpacking libk5crypto3:amd64 (1.16-2ubuntu0.1) ... Selecting previously unselected package libkeyutils1:amd64. Preparing to unpack .../08-libkeyutils1_1.5.9-9.2ubuntu2_amd64.deb ... Unpacking libkeyutils1:amd64 (1.5.9-9.2ubuntu2) ... Selecting previously unselected package libkrb5-3:amd64. Preparing to unpack .../09-libkrb5-3_1.16-2ubuntu0.1_amd64.deb ... Unpacking libkrb5-3:amd64 (1.16-2ubuntu0.1) ... Selecting previously unselected package libgssapi-krb5-2:amd64. Preparing to unpack .../10-libgssapi-krb5-2_1.16-2ubuntu0.1_amd64.deb ... Unpacking libgssapi-krb5-2:amd64 (1.16-2ubuntu0.1) ... Selecting previously unselected package libpsl5:amd64. Preparing to unpack .../11-libpsl5_0.19.1-5build1_amd64.deb ... Unpacking libpsl5:amd64 (0.19.1-5build1) ... Selecting previously unselected package manpages. Preparing to unpack .../12-manpages_4.15-1_all.deb ... Unpacking manpages (4.15-1) ... Selecting previously unselected package publicsuffix. Preparing to unpack .../13-publicsuffix_20180223.1310-1_all.deb ... Unpacking publicsuffix (20180223.1310-1) ... Selecting previously unselected package binutils-common:amd64. Preparing to unpack .../14-binutils-common_2.30-21ubuntu1~18.04.2_amd64.deb ... Unpacking binutils-common:amd64 (2.30-21ubuntu1~18.04.2) ... Selecting previously unselected package libbinutils:amd64. Preparing to unpack .../15-libbinutils_2.30-21ubuntu1~18.04.2_amd64.deb ... Unpacking libbinutils:amd64 (2.30-21ubuntu1~18.04.2) ... Selecting previously unselected package binutils-x86-64-linux-gnu. Preparing to unpack .../16-binutils-x86-64-linux-gnu_2.30-21ubuntu1~18.04.2_amd64.deb ... Unpacking binutils-x86-64-linux-gnu (2.30-21ubuntu1~18.04.2) ... Selecting previously unselected package binutils. Preparing to unpack .../17-binutils_2.30-21ubuntu1~18.04.2_amd64.deb ... Unpacking binutils (2.30-21ubuntu1~18.04.2) ... Selecting previously unselected package cmake-data. Preparing to unpack .../18-cmake-data_3.10.2-1ubuntu2_all.deb ... Unpacking cmake-data (3.10.2-1ubuntu2) ... Selecting previously unselected package libarchive13:amd64. Preparing to unpack .../19-libarchive13_3.2.2-3.1ubuntu0.3_amd64.deb ... Unpacking libarchive13:amd64 (3.2.2-3.1ubuntu0.3) ... Selecting previously unselected package libroken18-heimdal:amd64. Preparing to unpack .../20-libroken18-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libroken18-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libasn1-8-heimdal:amd64. Preparing to unpack .../21-libasn1-8-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libasn1-8-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libheimbase1-heimdal:amd64. Preparing to unpack .../22-libheimbase1-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libheimbase1-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libhcrypto4-heimdal:amd64. Preparing to unpack .../23-libhcrypto4-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libhcrypto4-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libwind0-heimdal:amd64. Preparing to unpack .../24-libwind0-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libwind0-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libhx509-5-heimdal:amd64. Preparing to unpack .../25-libhx509-5-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libhx509-5-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libkrb5-26-heimdal:amd64. Preparing to unpack .../26-libkrb5-26-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libkrb5-26-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libheimntlm0-heimdal:amd64. Preparing to unpack .../27-libheimntlm0-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libheimntlm0-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libgssapi3-heimdal:amd64. Preparing to unpack .../28-libgssapi3-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libgssapi3-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libsasl2-modules-db:amd64. Preparing to unpack .../29-libsasl2-modules-db_2.1.27~101-g0780600+dfsg-3ubuntu2_amd64.deb ... Unpacking libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Selecting previously unselected package libsasl2-2:amd64. Preparing to unpack .../30-libsasl2-2_2.1.27~101-g0780600+dfsg-3ubuntu2_amd64.deb ... Unpacking libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Selecting previously unselected package libldap-common. Preparing to unpack .../31-libldap-common_2.4.45+dfsg-1ubuntu1.2_all.deb ... Unpacking libldap-common (2.4.45+dfsg-1ubuntu1.2) ... Selecting previously unselected package libldap-2.4-2:amd64. Preparing to unpack .../32-libldap-2.4-2_2.4.45+dfsg-1ubuntu1.2_amd64.deb ... Unpacking libldap-2.4-2:amd64 (2.4.45+dfsg-1ubuntu1.2) ... Selecting previously unselected package libnghttp2-14:amd64. Preparing to unpack .../33-libnghttp2-14_1.30.0-1ubuntu1_amd64.deb ... Unpacking libnghttp2-14:amd64 (1.30.0-1ubuntu1) ... Selecting previously unselected package librtmp1:amd64. Preparing to unpack .../34-librtmp1_2.4+20151223.gitfa8646d.1-1_amd64.deb ... Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1) ... Selecting previously unselected package libcurl4:amd64. Preparing to unpack .../35-libcurl4_7.58.0-2ubuntu3.7_amd64.deb ... Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.7) ... Selecting previously unselected package libjsoncpp1:amd64. Preparing to unpack .../36-libjsoncpp1_1.7.4-3_amd64.deb ... Unpacking libjsoncpp1:amd64 (1.7.4-3) ... Selecting previously unselected package librhash0:amd64. Preparing to unpack .../37-librhash0_1.3.6-2_amd64.deb ... Unpacking librhash0:amd64 (1.3.6-2) ... Selecting previously unselected package libuv1:amd64. Preparing to unpack .../38-libuv1_1.18.0-3_amd64.deb ... Unpacking libuv1:amd64 (1.18.0-3) ... Selecting previously unselected package cmake. Preparing to unpack .../39-cmake_3.10.2-1ubuntu2_amd64.deb ... Unpacking cmake (3.10.2-1ubuntu2) ... Selecting previously unselected package gcc-7-base:amd64. Preparing to unpack .../40-gcc-7-base_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking gcc-7-base:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package libisl19:amd64. Preparing to unpack .../41-libisl19_0.19-1_amd64.deb ... Unpacking libisl19:amd64 (0.19-1) ... Selecting previously unselected package libmpfr6:amd64. Preparing to unpack .../42-libmpfr6_4.0.1-1_amd64.deb ... Unpacking libmpfr6:amd64 (4.0.1-1) ... Selecting previously unselected package libmpc3:amd64. Preparing to unpack .../43-libmpc3_1.1.0-1_amd64.deb ... Unpacking libmpc3:amd64 (1.1.0-1) ... Selecting previously unselected package cpp-7. Preparing to unpack .../44-cpp-7_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking cpp-7 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package cpp. Preparing to unpack .../45-cpp_4%3a7.4.0-1ubuntu2.3_amd64.deb ... Unpacking cpp (4:7.4.0-1ubuntu2.3) ... Selecting previously unselected package libcc1-0:amd64. Preparing to unpack .../46-libcc1-0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libcc1-0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libgomp1:amd64. Preparing to unpack .../47-libgomp1_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libgomp1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libitm1:amd64. Preparing to unpack .../48-libitm1_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libitm1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libatomic1:amd64. Preparing to unpack .../49-libatomic1_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libatomic1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libasan4:amd64. Preparing to unpack .../50-libasan4_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libasan4:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package liblsan0:amd64. Preparing to unpack .../51-liblsan0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking liblsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libtsan0:amd64. Preparing to unpack .../52-libtsan0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libtsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libubsan0:amd64. Preparing to unpack .../53-libubsan0_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libubsan0:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package libcilkrts5:amd64. Preparing to unpack .../54-libcilkrts5_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libcilkrts5:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package libmpx2:amd64. Preparing to unpack .../55-libmpx2_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libmpx2:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libquadmath0:amd64. Preparing to unpack .../56-libquadmath0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libquadmath0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libgcc-7-dev:amd64. Preparing to unpack .../57-libgcc-7-dev_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libgcc-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package gcc-7. Preparing to unpack .../58-gcc-7_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking gcc-7 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package gcc. Preparing to unpack .../59-gcc_4%3a7.4.0-1ubuntu2.3_amd64.deb ... Unpacking gcc (4:7.4.0-1ubuntu2.3) ... Selecting previously unselected package libc-dev-bin. Preparing to unpack .../60-libc-dev-bin_2.27-3ubuntu1_amd64.deb ... Unpacking libc-dev-bin (2.27-3ubuntu1) ... Selecting previously unselected package linux-libc-dev:amd64. Preparing to unpack .../61-linux-libc-dev_4.15.0-52.56_amd64.deb ... Unpacking linux-libc-dev:amd64 (4.15.0-52.56) ... Selecting previously unselected package libc6-dev:amd64. Preparing to unpack .../62-libc6-dev_2.27-3ubuntu1_amd64.deb ... Unpacking libc6-dev:amd64 (2.27-3ubuntu1) ... Selecting previously unselected package libsasl2-modules:amd64. Preparing to unpack .../63-libsasl2-modules_2.1.27~101-g0780600+dfsg-3ubuntu2_amd64.deb ... Unpacking libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Selecting previously unselected package make. Preparing to unpack .../64-make_4.1-9.1ubuntu1_amd64.deb ... Unpacking make (4.1-9.1ubuntu1) ... Selecting previously unselected package manpages-dev. Preparing to unpack .../65-manpages-dev_4.15-1_all.deb ... Unpacking manpages-dev (4.15-1) ... Setting up libquadmath0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up libgomp1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up libatomic1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up manpages (4.15-1) ... Setting up libicu60:amd64 (60.2-3ubuntu3) ... Setting up libcc1-0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up make (4.1-9.1ubuntu1) ... Setting up libnghttp2-14:amd64 (1.30.0-1ubuntu1) ... Setting up libldap-common (2.4.45+dfsg-1ubuntu1.2) ... Setting up libuv1:amd64 (1.18.0-3) ... Setting up libpsl5:amd64 (0.19.1-5build1) ... Setting up libtsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Setting up linux-libc-dev:amd64 (4.15.0-52.56) ... Setting up libmpfr6:amd64 (4.0.1-1) ... Setting up libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Setting up cmake-data (3.10.2-1ubuntu2) ... Setting up libroken18-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1) ... Setting up libkrb5support0:amd64 (1.16-2ubuntu0.1) ... Setting up libxml2:amd64 (2.9.4+dfsg1-6.1ubuntu1.2) ... Setting up librhash0:amd64 (1.3.6-2) ... Setting up liblsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up gcc-7-base:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up binutils-common:amd64 (2.30-21ubuntu1~18.04.2) ... Setting up libmpx2:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up krb5-locales (1.16-2ubuntu0.1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up publicsuffix (20180223.1310-1) ... Setting up libheimbase1-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up openssl (1.1.1-1ubuntu2.1~18.04.3) ... Setting up libmpc3:amd64 (1.1.0-1) ... Setting up libc-dev-bin (2.27-3ubuntu1) ... Setting up libkeyutils1:amd64 (1.5.9-9.2ubuntu2) ... Setting up libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Setting up ca-certificates (20180409) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Updating certificates in /etc/ssl/certs... 133 added, 0 removed; done. Setting up manpages-dev (4.15-1) ... Setting up libc6-dev:amd64 (2.27-3ubuntu1) ... Setting up libitm1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up liblzo2-2:amd64 (2.08-1.2) ... Setting up libisl19:amd64 (0.19-1) ... Setting up libjsoncpp1:amd64 (1.7.4-3) ... Setting up libk5crypto3:amd64 (1.16-2ubuntu0.1) ... Setting up libwind0-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libasan4:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libbinutils:amd64 (2.30-21ubuntu1~18.04.2) ... Setting up libarchive13:amd64 (3.2.2-3.1ubuntu0.3) ... Setting up libcilkrts5:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libasn1-8-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libubsan0:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libhcrypto4-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libhx509-5-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libgcc-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up cpp-7 (7.4.0-1ubuntu1~18.04.1) ... Setting up libkrb5-3:amd64 (1.16-2ubuntu0.1) ... Setting up libkrb5-26-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libheimntlm0-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up binutils-x86-64-linux-gnu (2.30-21ubuntu1~18.04.2) ... Setting up cpp (4:7.4.0-1ubuntu2.3) ... Setting up libgssapi-krb5-2:amd64 (1.16-2ubuntu0.1) ... Setting up binutils (2.30-21ubuntu1~18.04.2) ... Setting up libgssapi3-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up gcc-7 (7.4.0-1ubuntu1~18.04.1) ... Setting up gcc (4:7.4.0-1ubuntu2.3) ... Setting up libldap-2.4-2:amd64 (2.4.45+dfsg-1ubuntu1.2) ... Setting up libcurl4:amd64 (7.58.0-2ubuntu3.7) ... Setting up cmake (3.10.2-1ubuntu2) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Processing triggers for ca-certificates (20180409) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. root@02b32b9272ce:/# apt install python3-pip Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: build-essential dbus dh-python dirmngr dpkg-dev fakeroot g++ g++-7 gir1.2-glib-2.0 gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapparmor1 libassuan0 libdbus-1-3 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgdbm-compat4 libgdbm5 libgirepository-1.0-1 libglib2.0-0 libglib2.0-data libksba8 liblocale-gettext-perl libnpth0 libperl5.26 libpython3-dev libpython3.6 libpython3.6-dev libstdc++-7-dev netbase patch perl perl-modules-5.26 pinentry-curses python-pip-whl python3-asn1crypto python3-cffi-backend python3-crypto python3-cryptography python3-dbus python3-dev python3-distutils python3-gi python3-idna python3-keyring python3-keyrings.alt python3-lib2to3 python3-pkg-resources python3-secretstorage python3-setuptools python3-six python3-wheel python3-xdg python3.6-dev shared-mime-info xdg-user-dirs Suggested packages: default-dbus-session-bus | dbus-session-bus dbus-user-session libpam-systemd pinentry-gnome3 tor debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg parcimonie xloadimage scdaemon git bzr gdbm-l10n libstdc++-7-doc ed diffutils-doc perl-doc libterm-readline-gnu-perl | libterm-readline-perl-perl pinentry-doc python-crypto-doc python-cryptography-doc python3-cryptography-vectors python-dbus-doc python3-dbus-dbg gnome-keyring libkf5wallet-bin gir1.2-gnomekeyring-1.0 python-secretstorage-doc python-setuptools-doc The following NEW packages will be installed: build-essential dbus dh-python dirmngr dpkg-dev fakeroot g++ g++-7 gir1.2-glib-2.0 gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapparmor1 libassuan0 libdbus-1-3 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgdbm-compat4 libgdbm5 libgirepository-1.0-1 libglib2.0-0 libglib2.0-data libksba8 liblocale-gettext-perl libnpth0 libperl5.26 libpython3-dev libpython3.6 libpython3.6-dev libstdc++-7-dev netbase patch perl perl-modules-5.26 pinentry-curses python-pip-whl python3-asn1crypto python3-cffi-backend python3-crypto python3-cryptography python3-dbus python3-dev python3-distutils python3-gi python3-idna python3-keyring python3-keyrings.alt python3-lib2to3 python3-pip python3-pkg-resources python3-secretstorage python3-setuptools python3-six python3-wheel python3-xdg python3.6-dev shared-mime-info xdg-user-dirs 0 upgraded, 69 newly installed, 0 to remove and 0 not upgraded. Need to get 71.4 MB of archives. After this operation, 198 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 liblocale-gettext-perl amd64 1.07-3build2 [16.6 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 perl-modules-5.26 all 5.26.1-6ubuntu0.3 [2763 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgdbm5 amd64 1.14.1-6 [26.0 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgdbm-compat4 amd64 1.14.1-6 [6084 B] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libperl5.26 amd64 5.26.1-6ubuntu0.3 [3527 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 perl amd64 5.26.1-6ubuntu0.3 [201 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapparmor1 amd64 2.12-4ubuntu5.1 [31.3 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdbus-1-3 amd64 1.12.2-1ubuntu1.1 [175 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dbus amd64 1.12.2-1ubuntu1.1 [150 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglib2.0-0 amd64 2.56.4-0ubuntu0.18.04.3 [1169 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgirepository-1.0-1 amd64 1.56.1-1 [82.0 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 gir1.2-glib-2.0 amd64 1.56.1-1 [131 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglib2.0-data all 2.56.4-0ubuntu0.18.04.3 [4608 B] Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 netbase all 5.4 [12.7 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-dbus amd64 1.2.6-1 [89.9 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-gi amd64 3.26.1-2ubuntu1 [153 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic/main amd64 shared-mime-info amd64 1.9-2 [426 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic/main amd64 xdg-user-dirs amd64 0.17-1ubuntu1 [48.0 kB] Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libstdc++-7-dev amd64 7.4.0-1ubuntu1~18.04.1 [1468 kB] Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 g++-7 amd64 7.4.0-1ubuntu1~18.04.1 [7574 kB] Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 g++ amd64 4:7.4.0-1ubuntu2.3 [1568 B] Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdpkg-perl all 1.19.0.5ubuntu2.1 [211 kB] Get:23 http://archive.ubuntu.com/ubuntu bionic/main amd64 patch amd64 2.7.6-2ubuntu1 [102 kB] Get:24 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dpkg-dev all 1.19.0.5ubuntu2.1 [608 kB] Get:25 http://archive.ubuntu.com/ubuntu bionic/main amd64 build-essential amd64 12.4ubuntu1 [4758 B] Get:26 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-lib2to3 all 3.6.8-1~18.04 [76.5 kB] Get:27 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-distutils all 3.6.8-1~18.04 [141 kB] Get:28 http://archive.ubuntu.com/ubuntu bionic/main amd64 dh-python all 3.20180325ubuntu2 [89.2 kB] Get:29 http://archive.ubuntu.com/ubuntu bionic/main amd64 libassuan0 amd64 2.5.1-2 [35.0 kB] Get:30 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpgconf amd64 2.2.4-1ubuntu1.2 [123 kB] Get:31 http://archive.ubuntu.com/ubuntu bionic/main amd64 libksba8 amd64 1.3.5-2 [92.6 kB] Get:32 http://archive.ubuntu.com/ubuntu bionic/main amd64 libnpth0 amd64 1.5-3 [7668 B] Get:33 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dirmngr amd64 2.2.4-1ubuntu1.2 [316 kB] Get:34 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfakeroot amd64 1.22-2ubuntu1 [25.9 kB] Get:35 http://archive.ubuntu.com/ubuntu bionic/main amd64 fakeroot amd64 1.22-2ubuntu1 [62.3 kB] Get:36 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnupg-l10n all 2.2.4-1ubuntu1.2 [49.6 kB] Get:37 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnupg-utils amd64 2.2.4-1ubuntu1.2 [127 kB] Get:38 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg amd64 2.2.4-1ubuntu1.2 [467 kB] Get:39 http://archive.ubuntu.com/ubuntu bionic/main amd64 pinentry-curses amd64 1.1.0-1 [35.8 kB] Get:40 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg-agent amd64 2.2.4-1ubuntu1.2 [227 kB] Get:41 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg-wks-client amd64 2.2.4-1ubuntu1.2 [91.9 kB] Get:42 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg-wks-server amd64 2.2.4-1ubuntu1.2 [84.9 kB] Get:43 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpgsm amd64 2.2.4-1ubuntu1.2 [215 kB] Get:44 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnupg amd64 2.2.4-1ubuntu1.2 [249 kB] Get:45 http://archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB] Get:46 http://archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-diff-xs-perl amd64 0.04-5 [11.1 kB] Get:47 http://archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB] Get:48 http://archive.ubuntu.com/ubuntu bionic/main amd64 libexpat1-dev amd64 2.2.5-3 [122 kB] Get:49 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfile-fcntllock-perl amd64 0.22-3build2 [33.2 kB] Get:50 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6 amd64 3.6.8-1~18.04.1 [1418 kB] Get:51 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-dev amd64 3.6.8-1~18.04.1 [44.8 MB] Get:52 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3-dev amd64 3.6.7-1~18.04 [7328 B] Get:53 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python-pip-whl all 9.0.1-2.3~ubuntu1.18.04.1 [1653 kB] Get:54 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-asn1crypto all 0.24.0-1 [72.8 kB] Get:55 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-cffi-backend amd64 1.11.5-1 [64.6 kB] Get:56 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-crypto amd64 2.6.1-8ubuntu2 [244 kB] Get:57 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-idna all 2.6-1 [32.5 kB] Get:58 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-six all 1.11.0-2 [11.4 kB] Get:59 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-cryptography amd64 2.1.4-1ubuntu1.3 [221 kB] Get:60 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-dev amd64 3.6.8-1~18.04.1 [508 kB] Get:61 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-dev amd64 3.6.7-1~18.04 [1288 B] Get:62 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-secretstorage all 2.3.1-2 [12.1 kB] Get:63 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-keyring all 10.6.0-1 [26.7 kB] Get:64 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-keyrings.alt all 3.0-1 [16.6 kB] Get:65 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python3-pip all 9.0.1-2.3~ubuntu1.18.04.1 [114 kB] Get:66 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-pkg-resources all 39.0.1-2 [98.8 kB] Get:67 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-setuptools all 39.0.1-2 [248 kB] Get:68 http://archive.ubuntu.com/ubuntu bionic/universe amd64 python3-wheel all 0.30.0-0.2 [36.5 kB] Get:69 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-xdg all 0.25-4ubuntu1 [31.4 kB] Fetched 71.4 MB in 22s (3203 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package liblocale-gettext-perl. (Reading database ... 12277 files and directories currently installed.) Preparing to unpack .../00-liblocale-gettext-perl_1.07-3build2_amd64.deb ... Unpacking liblocale-gettext-perl (1.07-3build2) ... Selecting previously unselected package perl-modules-5.26. Preparing to unpack .../01-perl-modules-5.26_5.26.1-6ubuntu0.3_all.deb ... Unpacking perl-modules-5.26 (5.26.1-6ubuntu0.3) ... Selecting previously unselected package libgdbm5:amd64. Preparing to unpack .../02-libgdbm5_1.14.1-6_amd64.deb ... Unpacking libgdbm5:amd64 (1.14.1-6) ... Selecting previously unselected package libgdbm-compat4:amd64. Preparing to unpack .../03-libgdbm-compat4_1.14.1-6_amd64.deb ... Unpacking libgdbm-compat4:amd64 (1.14.1-6) ... Selecting previously unselected package libperl5.26:amd64. Preparing to unpack .../04-libperl5.26_5.26.1-6ubuntu0.3_amd64.deb ... Unpacking libperl5.26:amd64 (5.26.1-6ubuntu0.3) ... Selecting previously unselected package perl. Preparing to unpack .../05-perl_5.26.1-6ubuntu0.3_amd64.deb ... Unpacking perl (5.26.1-6ubuntu0.3) ... Selecting previously unselected package libapparmor1:amd64. Preparing to unpack .../06-libapparmor1_2.12-4ubuntu5.1_amd64.deb ... Unpacking libapparmor1:amd64 (2.12-4ubuntu5.1) ... Selecting previously unselected package libdbus-1-3:amd64. Preparing to unpack .../07-libdbus-1-3_1.12.2-1ubuntu1.1_amd64.deb ... Unpacking libdbus-1-3:amd64 (1.12.2-1ubuntu1.1) ... Selecting previously unselected package dbus. Preparing to unpack .../08-dbus_1.12.2-1ubuntu1.1_amd64.deb ... Unpacking dbus (1.12.2-1ubuntu1.1) ... Selecting previously unselected package libglib2.0-0:amd64. Preparing to unpack .../09-libglib2.0-0_2.56.4-0ubuntu0.18.04.3_amd64.deb ... Unpacking libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.3) ... Selecting previously unselected package libgirepository-1.0-1:amd64. Preparing to unpack .../10-libgirepository-1.0-1_1.56.1-1_amd64.deb ... Unpacking libgirepository-1.0-1:amd64 (1.56.1-1) ... Selecting previously unselected package gir1.2-glib-2.0:amd64. Preparing to unpack .../11-gir1.2-glib-2.0_1.56.1-1_amd64.deb ... Unpacking gir1.2-glib-2.0:amd64 (1.56.1-1) ... Selecting previously unselected package libglib2.0-data. Preparing to unpack .../12-libglib2.0-data_2.56.4-0ubuntu0.18.04.3_all.deb ... Unpacking libglib2.0-data (2.56.4-0ubuntu0.18.04.3) ... Selecting previously unselected package netbase. Preparing to unpack .../13-netbase_5.4_all.deb ... Unpacking netbase (5.4) ... Selecting previously unselected package python3-dbus. Preparing to unpack .../14-python3-dbus_1.2.6-1_amd64.deb ... Unpacking python3-dbus (1.2.6-1) ... Selecting previously unselected package python3-gi. Preparing to unpack .../15-python3-gi_3.26.1-2ubuntu1_amd64.deb ... Unpacking python3-gi (3.26.1-2ubuntu1) ... Selecting previously unselected package shared-mime-info. Preparing to unpack .../16-shared-mime-info_1.9-2_amd64.deb ... Unpacking shared-mime-info (1.9-2) ... Selecting previously unselected package xdg-user-dirs. Preparing to unpack .../17-xdg-user-dirs_0.17-1ubuntu1_amd64.deb ... Unpacking xdg-user-dirs (0.17-1ubuntu1) ... Selecting previously unselected package libstdc++-7-dev:amd64. Preparing to unpack .../18-libstdc++-7-dev_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libstdc++-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package g++-7. Preparing to unpack .../19-g++-7_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking g++-7 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package g++. Preparing to unpack .../20-g++_4%3a7.4.0-1ubuntu2.3_amd64.deb ... Unpacking g++ (4:7.4.0-1ubuntu2.3) ... Selecting previously unselected package libdpkg-perl. Preparing to unpack .../21-libdpkg-perl_1.19.0.5ubuntu2.1_all.deb ... Unpacking libdpkg-perl (1.19.0.5ubuntu2.1) ... Selecting previously unselected package patch. Preparing to unpack .../22-patch_2.7.6-2ubuntu1_amd64.deb ... Unpacking patch (2.7.6-2ubuntu1) ... Selecting previously unselected package dpkg-dev. Preparing to unpack .../23-dpkg-dev_1.19.0.5ubuntu2.1_all.deb ... Unpacking dpkg-dev (1.19.0.5ubuntu2.1) ... Selecting previously unselected package build-essential. Preparing to unpack .../24-build-essential_12.4ubuntu1_amd64.deb ... Unpacking build-essential (12.4ubuntu1) ... Selecting previously unselected package python3-lib2to3. Preparing to unpack .../25-python3-lib2to3_3.6.8-1~18.04_all.deb ... Unpacking python3-lib2to3 (3.6.8-1~18.04) ... Selecting previously unselected package python3-distutils. Preparing to unpack .../26-python3-distutils_3.6.8-1~18.04_all.deb ... Unpacking python3-distutils (3.6.8-1~18.04) ... Selecting previously unselected package dh-python. Preparing to unpack .../27-dh-python_3.20180325ubuntu2_all.deb ... Unpacking dh-python (3.20180325ubuntu2) ... Selecting previously unselected package libassuan0:amd64. Preparing to unpack .../28-libassuan0_2.5.1-2_amd64.deb ... Unpacking libassuan0:amd64 (2.5.1-2) ... Selecting previously unselected package gpgconf. Preparing to unpack .../29-gpgconf_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpgconf (2.2.4-1ubuntu1.2) ... Selecting previously unselected package libksba8:amd64. Preparing to unpack .../30-libksba8_1.3.5-2_amd64.deb ... Unpacking libksba8:amd64 (1.3.5-2) ... Selecting previously unselected package libnpth0:amd64. Preparing to unpack .../31-libnpth0_1.5-3_amd64.deb ... Unpacking libnpth0:amd64 (1.5-3) ... Selecting previously unselected package dirmngr. Preparing to unpack .../32-dirmngr_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking dirmngr (2.2.4-1ubuntu1.2) ... Selecting previously unselected package libfakeroot:amd64. Preparing to unpack .../33-libfakeroot_1.22-2ubuntu1_amd64.deb ... Unpacking libfakeroot:amd64 (1.22-2ubuntu1) ... Selecting previously unselected package fakeroot. Preparing to unpack .../34-fakeroot_1.22-2ubuntu1_amd64.deb ... Unpacking fakeroot (1.22-2ubuntu1) ... Selecting previously unselected package gnupg-l10n. Preparing to unpack .../35-gnupg-l10n_2.2.4-1ubuntu1.2_all.deb ... Unpacking gnupg-l10n (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gnupg-utils. Preparing to unpack .../36-gnupg-utils_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gnupg-utils (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gpg. Preparing to unpack .../37-gpg_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpg (2.2.4-1ubuntu1.2) ... Selecting previously unselected package pinentry-curses. Preparing to unpack .../38-pinentry-curses_1.1.0-1_amd64.deb ... Unpacking pinentry-curses (1.1.0-1) ... Selecting previously unselected package gpg-agent. Preparing to unpack .../39-gpg-agent_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpg-agent (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gpg-wks-client. Preparing to unpack .../40-gpg-wks-client_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpg-wks-client (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gpg-wks-server. Preparing to unpack .../41-gpg-wks-server_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpg-wks-server (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gpgsm. Preparing to unpack .../42-gpgsm_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpgsm (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gnupg. Preparing to unpack .../43-gnupg_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gnupg (2.2.4-1ubuntu1.2) ... Selecting previously unselected package libalgorithm-diff-perl. Preparing to unpack .../44-libalgorithm-diff-perl_1.19.03-1_all.deb ... Unpacking libalgorithm-diff-perl (1.19.03-1) ... Selecting previously unselected package libalgorithm-diff-xs-perl. Preparing to unpack .../45-libalgorithm-diff-xs-perl_0.04-5_amd64.deb ... Unpacking libalgorithm-diff-xs-perl (0.04-5) ... Selecting previously unselected package libalgorithm-merge-perl. Preparing to unpack .../46-libalgorithm-merge-perl_0.08-3_all.deb ... Unpacking libalgorithm-merge-perl (0.08-3) ... Selecting previously unselected package libexpat1-dev:amd64. Preparing to unpack .../47-libexpat1-dev_2.2.5-3_amd64.deb ... Unpacking libexpat1-dev:amd64 (2.2.5-3) ... Selecting previously unselected package libfile-fcntllock-perl. Preparing to unpack .../48-libfile-fcntllock-perl_0.22-3build2_amd64.deb ... Unpacking libfile-fcntllock-perl (0.22-3build2) ... Selecting previously unselected package libpython3.6:amd64. Preparing to unpack .../49-libpython3.6_3.6.8-1~18.04.1_amd64.deb ... Unpacking libpython3.6:amd64 (3.6.8-1~18.04.1) ... Selecting previously unselected package libpython3.6-dev:amd64. Preparing to unpack .../50-libpython3.6-dev_3.6.8-1~18.04.1_amd64.deb ... Unpacking libpython3.6-dev:amd64 (3.6.8-1~18.04.1) ... Selecting previously unselected package libpython3-dev:amd64. Preparing to unpack .../51-libpython3-dev_3.6.7-1~18.04_amd64.deb ... Unpacking libpython3-dev:amd64 (3.6.7-1~18.04) ... Selecting previously unselected package python-pip-whl. Preparing to unpack .../52-python-pip-whl_9.0.1-2.3~ubuntu1.18.04.1_all.deb ... Unpacking python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1) ... Selecting previously unselected package python3-asn1crypto. Preparing to unpack .../53-python3-asn1crypto_0.24.0-1_all.deb ... Unpacking python3-asn1crypto (0.24.0-1) ... Selecting previously unselected package python3-cffi-backend. Preparing to unpack .../54-python3-cffi-backend_1.11.5-1_amd64.deb ... Unpacking python3-cffi-backend (1.11.5-1) ... Selecting previously unselected package python3-crypto. Preparing to unpack .../55-python3-crypto_2.6.1-8ubuntu2_amd64.deb ... Unpacking python3-crypto (2.6.1-8ubuntu2) ... Selecting previously unselected package python3-idna. Preparing to unpack .../56-python3-idna_2.6-1_all.deb ... Unpacking python3-idna (2.6-1) ... Selecting previously unselected package python3-six. Preparing to unpack .../57-python3-six_1.11.0-2_all.deb ... Unpacking python3-six (1.11.0-2) ... Selecting previously unselected package python3-cryptography. Preparing to unpack .../58-python3-cryptography_2.1.4-1ubuntu1.3_amd64.deb ... Unpacking python3-cryptography (2.1.4-1ubuntu1.3) ... Selecting previously unselected package python3.6-dev. Preparing to unpack .../59-python3.6-dev_3.6.8-1~18.04.1_amd64.deb ... Unpacking python3.6-dev (3.6.8-1~18.04.1) ... Selecting previously unselected package python3-dev. Preparing to unpack .../60-python3-dev_3.6.7-1~18.04_amd64.deb ... Unpacking python3-dev (3.6.7-1~18.04) ... Selecting previously unselected package python3-secretstorage. Preparing to unpack .../61-python3-secretstorage_2.3.1-2_all.deb ... Unpacking python3-secretstorage (2.3.1-2) ... Selecting previously unselected package python3-keyring. Preparing to unpack .../62-python3-keyring_10.6.0-1_all.deb ... Unpacking python3-keyring (10.6.0-1) ... Selecting previously unselected package python3-keyrings.alt. Preparing to unpack .../63-python3-keyrings.alt_3.0-1_all.deb ... Unpacking python3-keyrings.alt (3.0-1) ... Selecting previously unselected package python3-pip. Preparing to unpack .../64-python3-pip_9.0.1-2.3~ubuntu1.18.04.1_all.deb ... Unpacking python3-pip (9.0.1-2.3~ubuntu1.18.04.1) ... Selecting previously unselected package python3-pkg-resources. Preparing to unpack .../65-python3-pkg-resources_39.0.1-2_all.deb ... Unpacking python3-pkg-resources (39.0.1-2) ... Selecting previously unselected package python3-setuptools. Preparing to unpack .../66-python3-setuptools_39.0.1-2_all.deb ... Unpacking python3-setuptools (39.0.1-2) ... Selecting previously unselected package python3-wheel. Preparing to unpack .../67-python3-wheel_0.30.0-0.2_all.deb ... Unpacking python3-wheel (0.30.0-0.2) ... Selecting previously unselected package python3-xdg. Preparing to unpack .../68-python3-xdg_0.25-4ubuntu1_all.deb ... Unpacking python3-xdg (0.25-4ubuntu1) ... Setting up libnpth0:amd64 (1.5-3) ... Setting up python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1) ... Setting up python3-cffi-backend (1.11.5-1) ... Setting up python3-crypto (2.6.1-8ubuntu2) ... Setting up libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.3) ... No schema files found: doing nothing. Setting up python3-idna (2.6-1) ... Setting up python3-xdg (0.25-4ubuntu1) ... Setting up python3-six (1.11.0-2) ... Setting up libksba8:amd64 (1.3.5-2) ... Setting up python3-wheel (0.30.0-0.2) ... Setting up perl-modules-5.26 (5.26.1-6ubuntu0.3) ... Setting up python3-pkg-resources (39.0.1-2) ... Setting up libgdbm5:amd64 (1.14.1-6) ... Setting up libgirepository-1.0-1:amd64 (1.56.1-1) ... Setting up gnupg-l10n (2.2.4-1ubuntu1.2) ... Setting up libstdc++-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up python3-asn1crypto (0.24.0-1) ... Setting up gir1.2-glib-2.0:amd64 (1.56.1-1) ... Setting up patch (2.7.6-2ubuntu1) ... Setting up libglib2.0-data (2.56.4-0ubuntu0.18.04.3) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up libapparmor1:amd64 (2.12-4ubuntu5.1) ... Setting up libfakeroot:amd64 (1.22-2ubuntu1) ... Setting up liblocale-gettext-perl (1.07-3build2) ... Setting up libexpat1-dev:amd64 (2.2.5-3) ... Setting up shared-mime-info (1.9-2) ... Setting up libgdbm-compat4:amd64 (1.14.1-6) ... Setting up python3-lib2to3 (3.6.8-1~18.04) ... Setting up libassuan0:amd64 (2.5.1-2) ... Setting up xdg-user-dirs (0.17-1ubuntu1) ... Setting up python3-distutils (3.6.8-1~18.04) ... Setting up libdbus-1-3:amd64 (1.12.2-1ubuntu1.1) ... Setting up libpython3.6:amd64 (3.6.8-1~18.04.1) ... Setting up netbase (5.4) ... Setting up python3-cryptography (2.1.4-1ubuntu1.3) ... Setting up python3-dbus (1.2.6-1) ... Setting up g++-7 (7.4.0-1ubuntu1~18.04.1) ... Setting up gpgconf (2.2.4-1ubuntu1.2) ... Setting up python3-keyrings.alt (3.0-1) ... Setting up python3-gi (3.26.1-2ubuntu1) ... Setting up fakeroot (1.22-2ubuntu1) ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode update-alternatives: warning: skip creation of /usr/share/man/man1/fakeroot.1.gz because associated file /usr/share/man/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/faked.1.gz because associated file /usr/share/man/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/es/man1/fakeroot.1.gz because associated file /usr/share/man/es/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/es/man1/faked.1.gz because associated file /usr/share/man/es/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/fr/man1/fakeroot.1.gz because associated file /usr/share/man/fr/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/fr/man1/faked.1.gz because associated file /usr/share/man/fr/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/sv/man1/fakeroot.1.gz because associated file /usr/share/man/sv/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/sv/man1/faked.1.gz because associated file /usr/share/man/sv/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist Setting up libpython3.6-dev:amd64 (3.6.8-1~18.04.1) ... Setting up libperl5.26:amd64 (5.26.1-6ubuntu0.3) ... Setting up gpgsm (2.2.4-1ubuntu1.2) ... Setting up python3-pip (9.0.1-2.3~ubuntu1.18.04.1) ... Setting up gnupg-utils (2.2.4-1ubuntu1.2) ... Setting up g++ (4:7.4.0-1ubuntu2.3) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode update-alternatives: warning: skip creation of /usr/share/man/man1/c++.1.gz because associated file /usr/share/man/man1/g++.1.gz (of link group c++) doesn't exist Setting up pinentry-curses (1.1.0-1) ... Setting up dbus (1.12.2-1ubuntu1.1) ... Setting up python3-setuptools (39.0.1-2) ... Setting up python3.6-dev (3.6.8-1~18.04.1) ... Setting up python3-secretstorage (2.3.1-2) ... Setting up dirmngr (2.2.4-1ubuntu1.2) ... Setting up dh-python (3.20180325ubuntu2) ... Setting up gpg (2.2.4-1ubuntu1.2) ... Setting up libpython3-dev:amd64 (3.6.7-1~18.04) ... Setting up python3-keyring (10.6.0-1) ... Setting up gpg-agent (2.2.4-1ubuntu1.2) ... Setting up python3-dev (3.6.7-1~18.04) ... Setting up gpg-wks-server (2.2.4-1ubuntu1.2) ... Setting up gpg-wks-client (2.2.4-1ubuntu1.2) ... Setting up perl (5.26.1-6ubuntu0.3) ... Setting up libfile-fcntllock-perl (0.22-3build2) ... Setting up libalgorithm-diff-perl (1.19.03-1) ... Setting up gnupg (2.2.4-1ubuntu1.2) ... Setting up libdpkg-perl (1.19.0.5ubuntu2.1) ... Setting up libalgorithm-merge-perl (0.08-3) ... Setting up dpkg-dev (1.19.0.5ubuntu2.1) ... Setting up libalgorithm-diff-xs-perl (0.04-5) ... Setting up build-essential (12.4ubuntu1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... root@02b32b9272ce:/# pip install numpy openjij bash: pip: command not found root@02b32b9272ce:/# pip3 install numpy openjij Collecting numpy Downloading https://files.pythonhosted.org/packages/87/2d/e4656149cbadd3a8a0369fcd1a9c7d61cc7b87b3903b85389c70c989a696/numpy-1.16.4-cp36-cp36m-manylinux1_x86_64.whl (17.3MB) 100% |################################| 17.3MB 90kB/s Collecting openjij Downloading https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz (80kB) 100% |################################| 81kB 4.4MB/s Collecting requests (from openjij) Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB) 100% |################################| 61kB 4.7MB/s Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->openjij) Downloading https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl (150kB) 100% |################################| 153kB 8.2MB/s Collecting chardet<3.1.0,>=3.0.2 (from requests->openjij) Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB) 100% |################################| 143kB 3.9MB/s Collecting certifi>=2017.4.17 (from requests->openjij) Downloading https://files.pythonhosted.org/packages/69/1b/b853c7a9d4f6a6d00749e94eb6f3a041e342a885b87340b79c1ef73e3a78/certifi-2019.6.16-py2.py3-none-any.whl (157kB) 100% |################################| 163kB 8.2MB/s Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests->openjij) Building wheels for collected packages: openjij Running setup.py bdist_wheel for openjij ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yn5j75hx/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpgiwgl9yypip-wheel- --python-tag cp36: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.6/openjij creating build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.6/openjij/model creating build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.6/openjij/sampler running build_ext <__main__.CMakeExtension('cxxjij') at 0x7f94c27fd400> cxxjij CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.11 or higher is required. You are running version 3.10.2 -- Configuring incomplete, errors occurred! Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 126, in <module> zip_safe=False File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 42, in run self.build_extension(ext) File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 69, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_kwargs, cwd=self.build_temp, env=env) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-yn5j75hx/openjij', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-yn5j75hx/openjij/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Failed building wheel for openjij Running setup.py clean for openjij Failed to build openjij Installing collected packages: numpy, urllib3, chardet, certifi, requests, openjij Running setup.py install for openjij ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yn5j75hx/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jop77n9c-record/install-record.txt --single-version-externally-managed --compile: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.6/openjij creating build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.6/openjij/model creating build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.6/openjij/sampler running build_ext <__main__.CMakeExtension('cxxjij') at 0x7f69320b9898> cxxjij CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.11 or higher is required. You are running version 3.10.2 -- Configuring incomplete, errors occurred! Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 126, in <module> zip_safe=False File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 42, in run self.build_extension(ext) File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 69, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_kwargs, cwd=self.build_temp, env=env) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-yn5j75hx/openjij', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-yn5j75hx/openjij/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yn5j75hx/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jop77n9c-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-yn5j75hx/openjij/CMake 3.11 or higher is required. You are running version 3.10.2
cmake 3.14を入れてみた。
# pip3 install openjij Collecting openjij Using cached https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from openjij) Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from openjij) Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests->openjij) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Building wheels for collected packages: openjij Running setup.py bdist_wheel for openjij ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-48h2_juh/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpajpqijjspip-wheel- --python-tag cp36: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.6/openjij creating build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.6/openjij/model creating build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.6/openjij/sampler running build_ext <__main__.CMakeExtension('cxxjij') at 0x7f514ecb28d0> cxxjij -- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is GNU 7.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Fetch googletest for C++ testing CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/ExternalProject.cmake:2427 (message): error: could not find git for clone of googletest-populate Call Stack (most recent call first): /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/ExternalProject.cmake:3211 (_ep_add_download_command) CMakeLists.txt:13 (ExternalProject_Add) -- Configuring incomplete, errors occurred! See also "/tmp/pip-build-48h2_juh/openjij/build/temp.linux-x86_64-3.6/_deps/googletest-subbuild/CMakeFiles/CMakeOutput.log". CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FetchContent.cmake:903 (message): CMake step for googletest failed: 1 Call Stack (most recent call first): /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate) CMakeLists.txt:21 (FetchContent_Populate) -- Configuring incomplete, errors occurred! See also "/tmp/pip-build-48h2_juh/openjij/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 126, in <module> zip_safe=False File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 42, in run self.build_extension(ext) File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 69, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_kwargs, cwd=self.build_temp, env=env) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-48h2_juh/openjij', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-48h2_juh/openjij/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Failed building wheel for openjij Running setup.py clean for openjij Failed to build openjij Installing collected packages: openjij Running setup.py install for openjij ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-48h2_juh/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-vichorhz-record/install-record.txt --single-version-externally-managed --compile: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.6/openjij creating build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.6/openjij/model creating build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.6/openjij/sampler running build_ext <__main__.CMakeExtension('cxxjij') at 0x7fa61d106898> cxxjij -- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is GNU 7.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Fetch googletest for C++ testing CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/ExternalProject.cmake:2427 (message): error: could not find git for clone of googletest-populate Call Stack (most recent call first): /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/ExternalProject.cmake:3211 (_ep_add_download_command) CMakeLists.txt:13 (ExternalProject_Add) -- Configuring incomplete, errors occurred! See also "/tmp/pip-build-48h2_juh/openjij/build/temp.linux-x86_64-3.6/_deps/googletest-subbuild/CMakeFiles/CMakeOutput.log". CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FetchContent.cmake:903 (message): CMake step for googletest failed: 1 Call Stack (most recent call first): /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate) CMakeLists.txt:21 (FetchContent_Populate) -- Configuring incomplete, errors occurred! See also "/tmp/pip-build-48h2_juh/openjij/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 126, in <module> zip_safe=False File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 42, in run self.build_extension(ext) File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 69, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_kwargs, cwd=self.build_temp, env=env) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-48h2_juh/openjij', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-48h2_juh/openjij/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-48h2_juh/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-vichorhz-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-48h2_juh/openjij/git がないらしい。
# apt install git Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: cmake-data libarchive13 libcurl4 libjsoncpp1 liblzo2-2 librhash0 libuv1 Use 'apt autoremove' to remove them. The following additional packages will be installed: git-man less libbsd0 libcurl3-gnutls libedit2 liberror-perl libssl1.0.0 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 openssh-client xauth Suggested packages: gettext-base git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn keychain libpam-ssh monkeysphere ssh-askpass The following NEW packages will be installed: git git-man less libbsd0 libcurl3-gnutls libedit2 liberror-perl libssl1.0.0 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 openssh-client xauth 0 upgraded, 17 newly installed, 0 to remove and 0 not upgraded. Need to get 7688 kB of archives. After this operation, 46.3 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxau6 amd64 1:1.0.8-1 [8376 B] Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libbsd0 amd64 0.8.7-1 [41.5 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxdmcp6 amd64 1:1.1.2-3 [10.7 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxcb1 amd64 1.13-2~ubuntu18.04 [45.5 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libx11-data all 2:1.6.4-3ubuntu0.2 [113 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libx11-6 amd64 2:1.6.4-3ubuntu0.2 [569 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxext6 amd64 2:1.3.3-1 [29.4 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 less amd64 487-0.1 [112 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 libedit2 amd64 3.1-20170329-1 [76.9 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl1.0.0 amd64 1.0.2n-1ubuntu5.3 [1088 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxmuu1 amd64 2:1.1.2-2 [9674 B] Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssh-client amd64 1:7.6p1-4ubuntu0.3 [614 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic/main amd64 xauth amd64 1:1.0.10-1 [24.6 kB] Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl3-gnutls amd64 7.58.0-2ubuntu3.7 [212 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic/main amd64 liberror-perl all 0.17025-1 [22.8 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 git-man all 1:2.17.1-1ubuntu0.4 [803 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 git amd64 1:2.17.1-1ubuntu0.4 [3907 kB] Fetched 7688 kB in 4s (2069 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libxau6:amd64. (Reading database ... 17340 files and directories currently installed.) Preparing to unpack .../00-libxau6_1%3a1.0.8-1_amd64.deb ... Unpacking libxau6:amd64 (1:1.0.8-1) ... Selecting previously unselected package libbsd0:amd64. Preparing to unpack .../01-libbsd0_0.8.7-1_amd64.deb ... Unpacking libbsd0:amd64 (0.8.7-1) ... Selecting previously unselected package libxdmcp6:amd64. Preparing to unpack .../02-libxdmcp6_1%3a1.1.2-3_amd64.deb ... Unpacking libxdmcp6:amd64 (1:1.1.2-3) ... Selecting previously unselected package libxcb1:amd64. Preparing to unpack .../03-libxcb1_1.13-2~ubuntu18.04_amd64.deb ... Unpacking libxcb1:amd64 (1.13-2~ubuntu18.04) ... Selecting previously unselected package libx11-data. Preparing to unpack .../04-libx11-data_2%3a1.6.4-3ubuntu0.2_all.deb ... Unpacking libx11-data (2:1.6.4-3ubuntu0.2) ... Selecting previously unselected package libx11-6:amd64. Preparing to unpack .../05-libx11-6_2%3a1.6.4-3ubuntu0.2_amd64.deb ... Unpacking libx11-6:amd64 (2:1.6.4-3ubuntu0.2) ... Selecting previously unselected package libxext6:amd64. Preparing to unpack .../06-libxext6_2%3a1.3.3-1_amd64.deb ... Unpacking libxext6:amd64 (2:1.3.3-1) ... Selecting previously unselected package less. Preparing to unpack .../07-less_487-0.1_amd64.deb ... Unpacking less (487-0.1) ... Selecting previously unselected package libedit2:amd64. Preparing to unpack .../08-libedit2_3.1-20170329-1_amd64.deb ... Unpacking libedit2:amd64 (3.1-20170329-1) ... Selecting previously unselected package libssl1.0.0:amd64. Preparing to unpack .../09-libssl1.0.0_1.0.2n-1ubuntu5.3_amd64.deb ... Unpacking libssl1.0.0:amd64 (1.0.2n-1ubuntu5.3) ... Selecting previously unselected package libxmuu1:amd64. Preparing to unpack .../10-libxmuu1_2%3a1.1.2-2_amd64.deb ... Unpacking libxmuu1:amd64 (2:1.1.2-2) ... Selecting previously unselected package openssh-client. Preparing to unpack .../11-openssh-client_1%3a7.6p1-4ubuntu0.3_amd64.deb ... Unpacking openssh-client (1:7.6p1-4ubuntu0.3) ... Selecting previously unselected package xauth. Preparing to unpack .../12-xauth_1%3a1.0.10-1_amd64.deb ... Unpacking xauth (1:1.0.10-1) ... Selecting previously unselected package libcurl3-gnutls:amd64. Preparing to unpack .../13-libcurl3-gnutls_7.58.0-2ubuntu3.7_amd64.deb ... Unpacking libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.7) ... Selecting previously unselected package liberror-perl. Preparing to unpack .../14-liberror-perl_0.17025-1_all.deb ... Unpacking liberror-perl (0.17025-1) ... Selecting previously unselected package git-man. Preparing to unpack .../15-git-man_1%3a2.17.1-1ubuntu0.4_all.deb ... Unpacking git-man (1:2.17.1-1ubuntu0.4) ... Selecting previously unselected package git. Preparing to unpack .../16-git_1%3a2.17.1-1ubuntu0.4_amd64.deb ... Unpacking git (1:2.17.1-1ubuntu0.4) ... Setting up libedit2:amd64 (3.1-20170329-1) ... Setting up git-man (1:2.17.1-1ubuntu0.4) ... Setting up less (487-0.1) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Setting up libssl1.0.0:amd64 (1.0.2n-1ubuntu5.3) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Processing triggers for mime-support (3.60ubuntu1) ... Setting up liberror-perl (0.17025-1) ... Setting up libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.7) ... Setting up libbsd0:amd64 (0.8.7-1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up libxdmcp6:amd64 (1:1.1.2-3) ... Setting up openssh-client (1:7.6p1-4ubuntu0.3) ... Setting up git (1:2.17.1-1ubuntu0.4) ... Setting up libx11-data (2:1.6.4-3ubuntu0.2) ... Setting up libxau6:amd64 (1:1.0.8-1) ... Setting up libxcb1:amd64 (1.13-2~ubuntu18.04) ... Setting up libx11-6:amd64 (2:1.6.4-3ubuntu0.2) ... Setting up libxmuu1:amd64 (2:1.1.2-2) ... Setting up libxext6:amd64 (2:1.3.3-1) ... Setting up xauth (1:1.0.10-1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ...そして
root@02b32b9272ce:/# pip3 install openjij Collecting openjij Using cached https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from openjij) Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from openjij) Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests->openjij) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Building wheels for collected packages: openjij Running setup.py bdist_wheel for openjij ... done Stored in directory: /root/.cache/pip/wheels/bf/8d/f6/04623fb4b2e90c961fc7b531fb6ab26825b3bef6ae1ef350e6 Successfully built openjij Installing collected packages: openjij Successfully installed openjij-0.0.7ということは、
git
CMake 3.11 or higher is required.
python3
pip
numpyが必要だということ。
dockerでは
apt update, apt -y upgrade
apt -y vim wget
していること。では、1からやってみる。
その前に動くかためしてみた。
OpenJij チュートリアル
https://openjij.github.io/OpenJijTutorial/_build/html/ja/index.htmlising.pyimport openjij as oj #https://openjij.github.io/OpenJijTutorial/_build/html/ja/index.html # 問題を表す縦磁場と相互作用を作ります。OpenJijでは辞書型で問題を受け付けます。 N = 5 h = {i: -1 for i in range(N)} J = {(i, j): -1 for i in range(N) for j in range(i+1, N)} print('h_i: ', h) print('Jij: ', J)実行してみる。
# pip3 show openjij Name: openjij Version: 0.0.7 Summary: Framework for the Ising model and QUBO Home-page: https://openjij.github.io/OpenJij/ Author: Jij Inc. Author-email: openjij@j-ij.com License: Apache License 2.0 Location: /usr/local/lib/python3.6/dist-packages Requires: numpy, requests root@02b32b9272ce:/# pip install requests bash: pip: command not found root@02b32b9272ce:/# pip3 install requests Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests) root@02b32b9272ce:/# apt install vim Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: cmake-data libarchive13 libcurl4 libjsoncpp1 liblzo2-2 librhash0 libuv1 Use 'apt autoremove' to remove them. The following additional packages will be installed: libgpm2 vim-common vim-runtime xxd Suggested packages: gpm ctags vim-doc vim-scripts The following NEW packages will be installed: libgpm2 vim vim-common vim-runtime xxd 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 6721 kB of archives. After this operation, 32.6 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 xxd amd64 2:8.0.1453-1ubuntu1.1 [49.2 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 vim-common all 2:8.0.1453-1ubuntu1.1 [70.4 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgpm2 amd64 1.20.7-5 [15.1 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 vim-runtime all 2:8.0.1453-1ubuntu1.1 [5435 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 vim amd64 2:8.0.1453-1ubuntu1.1 [1152 kB] Fetched 6721 kB in 5s (1474 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package xxd. (Reading database ... 18648 files and directories currently installed.) Preparing to unpack .../xxd_2%3a8.0.1453-1ubuntu1.1_amd64.deb ... Unpacking xxd (2:8.0.1453-1ubuntu1.1) ... Selecting previously unselected package vim-common. Preparing to unpack .../vim-common_2%3a8.0.1453-1ubuntu1.1_all.deb ... Unpacking vim-common (2:8.0.1453-1ubuntu1.1) ... Selecting previously unselected package libgpm2:amd64. Preparing to unpack .../libgpm2_1.20.7-5_amd64.deb ... Unpacking libgpm2:amd64 (1.20.7-5) ... Selecting previously unselected package vim-runtime. Preparing to unpack .../vim-runtime_2%3a8.0.1453-1ubuntu1.1_all.deb ... Adding 'diversion of /usr/share/vim/vim80/doc/help.txt to /usr/share/vim/vim80/doc/help.txt.vim-tiny by vim-runtime' Adding 'diversion of /usr/share/vim/vim80/doc/tags to /usr/share/vim/vim80/doc/tags.vim-tiny by vim-runtime' Unpacking vim-runtime (2:8.0.1453-1ubuntu1.1) ... Selecting previously unselected package vim. Preparing to unpack .../vim_2%3a8.0.1453-1ubuntu1.1_amd64.deb ... Unpacking vim (2:8.0.1453-1ubuntu1.1) ... Processing triggers for mime-support (3.60ubuntu1) ... Setting up xxd (2:8.0.1453-1ubuntu1.1) ... Setting up libgpm2:amd64 (1.20.7-5) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up vim-common (2:8.0.1453-1ubuntu1.1) ... Setting up vim-runtime (2:8.0.1453-1ubuntu1.1) ... Setting up vim (2:8.0.1453-1ubuntu1.1) ... update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/vi.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/vi.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/vi.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/vi.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/vi.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/vi.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/view.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/view.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/view.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/view.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/view.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/view.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/ex.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/ex.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/ex.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/ex.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/ex.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/ex.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/editor.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/editor.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/editor.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/editor.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/editor.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/editor.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group editor) doesn't exist root@02b32b9272ce:/# vim ijing.py root@02b32b9272ce:/# python ijing.py bash: python: command not found root@02b32b9272ce:/# python3 ijing.py h_i: {0: -1, 1: -1, 2: -1, 3: -1, 4: -1} Jij: {(0, 1): -1, (0, 2): -1, (0, 3): -1, (0, 4): -1, (1, 2): -1, (1, 3): -1, (1, 4): -1, (2, 3): -1, (2, 4): -1, (3, 4): -1}同じ結果が出た。OK。
- 投稿日:2019-06-25T20:03:18+09:00
docker(24) Open jij導入失敗(2)何度もやりなおし成功
Open jij導入失敗
https://qiita.com/kaizen_nagoya/items/11cb393d5b8ce9019cd6ではdocker の anacondaで始めた。
apt update, apt -y apgradeしてないことに気が付いた。
cmakeが入っていないとまずいことが途中でわかった。
今回は素のubuntuで初めて見る。macOS$ docker run -it ubuntu /bin/bashdocker# apt update; apt -y upgrade Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB] Get:3 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [5436 B] Get:4 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [557 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:6 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [719 kB] Get:7 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4169 B] Get:8 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB] Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [7239 B] Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1226 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [10.8 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [861 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2496 B] Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [3927 B] Fetched 16.8 MB in 17s (977 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 12 packages can be upgraded. Run 'apt list --upgradable' to see them. Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: apt bash debconf gcc-8-base libapt-pkg5.0 libdb5.3 libgcc1 libgnutls30 libseccomp2 libstdc++6 libsystemd0 libudev1 12 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 4784 kB of archives. After this operation, 20.5 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 bash amd64 4.4.18-2ubuntu1.1 [615 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-8-base amd64 8.3.0-6ubuntu1~18.04.1 [18.7 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc1 amd64 1:8.3.0-6ubuntu1~18.04.1 [40.7 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libstdc++6 amd64 8.3.0-6ubuntu1~18.04.1 [400 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsystemd0 amd64 237-3ubuntu10.23 [204 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libudev1 amd64 237-3ubuntu10.23 [53.6 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapt-pkg5.0 amd64 1.6.11 [806 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgnutls30 amd64 3.5.18-1ubuntu1.1 [645 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libseccomp2 amd64 2.4.1-0ubuntu0.18.04.2 [39.1 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 apt amd64 1.6.11 [1166 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 debconf all 1.5.66ubuntu1 [124 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdb5.3 amd64 5.3.28-13.1ubuntu1.1 [672 kB] Fetched 4784 kB in 4s (1132 kB/s) debconf: delaying package configuration, since apt-utils is not installed (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../bash_4.4.18-2ubuntu1.1_amd64.deb ... Unpacking bash (4.4.18-2ubuntu1.1) over (4.4.18-2ubuntu1) ... Setting up bash (4.4.18-2ubuntu1.1) ... update-alternatives: error: alternative path /usr/share/man/man7/bash-builtins.7.gz doesn't exist (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../gcc-8-base_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking gcc-8-base:amd64 (8.3.0-6ubuntu1~18.04.1) over (8.3.0-6ubuntu1~18.04) ... Setting up gcc-8-base:amd64 (8.3.0-6ubuntu1~18.04.1) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libgcc1_1%3a8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libgcc1:amd64 (1:8.3.0-6ubuntu1~18.04.1) over (1:8.3.0-6ubuntu1~18.04) ... Setting up libgcc1:amd64 (1:8.3.0-6ubuntu1~18.04.1) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libstdc++6_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libstdc++6:amd64 (8.3.0-6ubuntu1~18.04.1) over (8.3.0-6ubuntu1~18.04) ... Setting up libstdc++6:amd64 (8.3.0-6ubuntu1~18.04.1) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libsystemd0_237-3ubuntu10.23_amd64.deb ... Unpacking libsystemd0:amd64 (237-3ubuntu10.23) over (237-3ubuntu10.21) ... Setting up libsystemd0:amd64 (237-3ubuntu10.23) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libudev1_237-3ubuntu10.23_amd64.deb ... Unpacking libudev1:amd64 (237-3ubuntu10.23) over (237-3ubuntu10.21) ... Setting up libudev1:amd64 (237-3ubuntu10.23) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libapt-pkg5.0_1.6.11_amd64.deb ... Unpacking libapt-pkg5.0:amd64 (1.6.11) over (1.6.10) ... Setting up libapt-pkg5.0:amd64 (1.6.11) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libgnutls30_3.5.18-1ubuntu1.1_amd64.deb ... Unpacking libgnutls30:amd64 (3.5.18-1ubuntu1.1) over (3.5.18-1ubuntu1) ... Setting up libgnutls30:amd64 (3.5.18-1ubuntu1.1) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libseccomp2_2.4.1-0ubuntu0.18.04.2_amd64.deb ... Unpacking libseccomp2:amd64 (2.4.1-0ubuntu0.18.04.2) over (2.3.1-2.1ubuntu4.1) ... Setting up libseccomp2:amd64 (2.4.1-0ubuntu0.18.04.2) ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../archives/apt_1.6.11_amd64.deb ... Unpacking apt (1.6.11) over (1.6.10) ... Setting up apt (1.6.11) ... Installing new version of config file /etc/apt/apt.conf.d/01autoremove ... (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../debconf_1.5.66ubuntu1_all.deb ... Unpacking debconf (1.5.66ubuntu1) over (1.5.66) ... Setting up debconf (1.5.66ubuntu1) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libdb5.3_5.3.28-13.1ubuntu1.1_amd64.deb ... Unpacking libdb5.3:amd64 (5.3.28-13.1ubuntu1.1) over (5.3.28-13.1ubuntu1) ... Setting up libdb5.3:amd64 (5.3.28-13.1ubuntu1.1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... root@02b32b9272ce:/# apt install python3 Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: file libexpat1 libmagic-mgc libmagic1 libmpdec2 libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libreadline7 libsqlite3-0 libssl1.1 mime-support python3-minimal python3.6 python3.6-minimal readline-common xz-utils Suggested packages: python3-doc python3-tk python3-venv python3.6-venv python3.6-doc binutils binfmt-support readline-doc The following NEW packages will be installed: file libexpat1 libmagic-mgc libmagic1 libmpdec2 libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libreadline7 libsqlite3-0 libssl1.1 mime-support python3 python3-minimal python3.6 python3.6-minimal readline-common xz-utils 0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded. Need to get 6670 kB of archives. After this operation, 34.1 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl1.1 amd64 1.1.1-1ubuntu2.1~18.04.3 [1295 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-minimal amd64 3.6.8-1~18.04.1 [533 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libexpat1 amd64 2.2.5-3 [80.2 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-minimal amd64 3.6.8-1~18.04.1 [1620 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-minimal amd64 3.6.7-1~18.04 [23.7 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 mime-support all 3.60ubuntu1 [30.1 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpdec2 amd64 2.4.2-1ubuntu1 [84.1 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 readline-common all 7.0-3 [52.9 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 libreadline7 amd64 7.0-3 [124 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsqlite3-0 amd64 3.22.0-1ubuntu0.1 [497 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-stdlib amd64 3.6.8-1~18.04.1 [1715 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6 amd64 3.6.8-1~18.04.1 [202 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3-stdlib amd64 3.6.7-1~18.04 [7240 B] Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3 amd64 3.6.7-1~18.04 [47.2 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic-mgc amd64 1:5.32-2ubuntu0.2 [184 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic1 amd64 1:5.32-2ubuntu0.2 [68.5 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 file amd64 1:5.32-2ubuntu0.2 [22.1 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic/main amd64 xz-utils amd64 5.2.2-1.3 [83.8 kB] Fetched 6670 kB in 5s (1272 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libssl1.1:amd64. (Reading database ... 4040 files and directories currently installed.) Preparing to unpack .../libssl1.1_1.1.1-1ubuntu2.1~18.04.3_amd64.deb ... Unpacking libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.3) ... Selecting previously unselected package libpython3.6-minimal:amd64. Preparing to unpack .../libpython3.6-minimal_3.6.8-1~18.04.1_amd64.deb ... Unpacking libpython3.6-minimal:amd64 (3.6.8-1~18.04.1) ... Selecting previously unselected package libexpat1:amd64. Preparing to unpack .../libexpat1_2.2.5-3_amd64.deb ... Unpacking libexpat1:amd64 (2.2.5-3) ... Selecting previously unselected package python3.6-minimal. Preparing to unpack .../python3.6-minimal_3.6.8-1~18.04.1_amd64.deb ... Unpacking python3.6-minimal (3.6.8-1~18.04.1) ... Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.3) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Setting up libpython3.6-minimal:amd64 (3.6.8-1~18.04.1) ... Setting up libexpat1:amd64 (2.2.5-3) ... Setting up python3.6-minimal (3.6.8-1~18.04.1) ... Selecting previously unselected package python3-minimal. (Reading database ... 4297 files and directories currently installed.) Preparing to unpack .../0-python3-minimal_3.6.7-1~18.04_amd64.deb ... Unpacking python3-minimal (3.6.7-1~18.04) ... Selecting previously unselected package mime-support. Preparing to unpack .../1-mime-support_3.60ubuntu1_all.deb ... Unpacking mime-support (3.60ubuntu1) ... Selecting previously unselected package libmpdec2:amd64. Preparing to unpack .../2-libmpdec2_2.4.2-1ubuntu1_amd64.deb ... Unpacking libmpdec2:amd64 (2.4.2-1ubuntu1) ... Selecting previously unselected package readline-common. Preparing to unpack .../3-readline-common_7.0-3_all.deb ... Unpacking readline-common (7.0-3) ... Selecting previously unselected package libreadline7:amd64. Preparing to unpack .../4-libreadline7_7.0-3_amd64.deb ... Unpacking libreadline7:amd64 (7.0-3) ... Selecting previously unselected package libsqlite3-0:amd64. Preparing to unpack .../5-libsqlite3-0_3.22.0-1ubuntu0.1_amd64.deb ... Unpacking libsqlite3-0:amd64 (3.22.0-1ubuntu0.1) ... Selecting previously unselected package libpython3.6-stdlib:amd64. Preparing to unpack .../6-libpython3.6-stdlib_3.6.8-1~18.04.1_amd64.deb ... Unpacking libpython3.6-stdlib:amd64 (3.6.8-1~18.04.1) ... Selecting previously unselected package python3.6. Preparing to unpack .../7-python3.6_3.6.8-1~18.04.1_amd64.deb ... Unpacking python3.6 (3.6.8-1~18.04.1) ... Selecting previously unselected package libpython3-stdlib:amd64. Preparing to unpack .../8-libpython3-stdlib_3.6.7-1~18.04_amd64.deb ... Unpacking libpython3-stdlib:amd64 (3.6.7-1~18.04) ... Setting up python3-minimal (3.6.7-1~18.04) ... Selecting previously unselected package python3. (Reading database ... 4755 files and directories currently installed.) Preparing to unpack .../python3_3.6.7-1~18.04_amd64.deb ... Unpacking python3 (3.6.7-1~18.04) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../libmagic-mgc_1%3a5.32-2ubuntu0.2_amd64.deb ... Unpacking libmagic-mgc (1:5.32-2ubuntu0.2) ... Selecting previously unselected package libmagic1:amd64. Preparing to unpack .../libmagic1_1%3a5.32-2ubuntu0.2_amd64.deb ... Unpacking libmagic1:amd64 (1:5.32-2ubuntu0.2) ... Selecting previously unselected package file. Preparing to unpack .../file_1%3a5.32-2ubuntu0.2_amd64.deb ... Unpacking file (1:5.32-2ubuntu0.2) ... Selecting previously unselected package xz-utils. Preparing to unpack .../xz-utils_5.2.2-1.3_amd64.deb ... Unpacking xz-utils (5.2.2-1.3) ... Setting up readline-common (7.0-3) ... Setting up mime-support (3.60ubuntu1) ... Setting up libreadline7:amd64 (7.0-3) ... Setting up libmagic-mgc (1:5.32-2ubuntu0.2) ... Setting up libmagic1:amd64 (1:5.32-2ubuntu0.2) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up xz-utils (5.2.2-1.3) ... update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode update-alternatives: warning: skip creation of /usr/share/man/man1/lzma.1.gz because associated file /usr/share/man/man1/xz.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/unlzma.1.gz because associated file /usr/share/man/man1/unxz.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzcat.1.gz because associated file /usr/share/man/man1/xzcat.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzmore.1.gz because associated file /usr/share/man/man1/xzmore.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzless.1.gz because associated file /usr/share/man/man1/xzless.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzdiff.1.gz because associated file /usr/share/man/man1/xzdiff.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzcmp.1.gz because associated file /usr/share/man/man1/xzcmp.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzgrep.1.gz because associated file /usr/share/man/man1/xzgrep.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzegrep.1.gz because associated file /usr/share/man/man1/xzegrep.1.gz (of link group lzma) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/lzfgrep.1.gz because associated file /usr/share/man/man1/xzfgrep.1.gz (of link group lzma) doesn't exist Setting up libsqlite3-0:amd64 (3.22.0-1ubuntu0.1) ... Setting up libmpdec2:amd64 (2.4.2-1ubuntu1) ... Setting up libpython3.6-stdlib:amd64 (3.6.8-1~18.04.1) ... Setting up python3.6 (3.6.8-1~18.04.1) ... Setting up file (1:5.32-2ubuntu0.2) ... Setting up libpython3-stdlib:amd64 (3.6.7-1~18.04) ... Setting up python3 (3.6.7-1~18.04) ... running python rtupdate hooks for python3.6... running python post-rtupdate hooks for python3.6... Processing triggers for libc-bin (2.27-3ubuntu1) ... root@02b32b9272ce:/# apt install pip Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package pip root@02b32b9272ce:/# apt install cmake Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: binutils binutils-common binutils-x86-64-linux-gnu ca-certificates cmake-data cpp cpp-7 gcc gcc-7 gcc-7-base krb5-locales libarchive13 libasan4 libasn1-8-heimdal libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libcurl4 libgcc-7-dev libgomp1 libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libicu60 libisl19 libitm1 libjsoncpp1 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common liblsan0 liblzo2-2 libmpc3 libmpfr6 libmpx2 libnghttp2-14 libpsl5 libquadmath0 librhash0 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libtsan0 libubsan0 libuv1 libwind0-heimdal libxml2 linux-libc-dev make manpages manpages-dev multiarch-support openssl publicsuffix Suggested packages: binutils-doc cmake-doc ninja-build cpp-doc gcc-7-locales gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-7-multilib gcc-7-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg lrzip glibc-doc krb5-doc krb5-user libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql make-doc man-browser The following NEW packages will be installed: binutils binutils-common binutils-x86-64-linux-gnu ca-certificates cmake cmake-data cpp cpp-7 gcc gcc-7 gcc-7-base krb5-locales libarchive13 libasan4 libasn1-8-heimdal libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libcurl4 libgcc-7-dev libgomp1 libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libicu60 libisl19 libitm1 libjsoncpp1 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common liblsan0 liblzo2-2 libmpc3 libmpfr6 libmpx2 libnghttp2-14 libpsl5 libquadmath0 librhash0 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libtsan0 libubsan0 libuv1 libwind0-heimdal libxml2 linux-libc-dev make manpages manpages-dev multiarch-support openssl publicsuffix 0 upgraded, 67 newly installed, 0 to remove and 0 not upgraded. Need to get 45.2 MB of archives. After this operation, 187 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 multiarch-support amd64 2.27-3ubuntu1 [6916 B] Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 liblzo2-2 amd64 2.08-1.2 [48.7 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssl amd64 1.1.1-1ubuntu2.1~18.04.3 [614 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 ca-certificates all 20180409 [151 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 libicu60 amd64 60.2-3ubuntu3 [8054 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxml2 amd64 2.9.4+dfsg1-6.1ubuntu1.2 [663 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 krb5-locales all 1.16-2ubuntu0.1 [13.5 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libkrb5support0 amd64 1.16-2ubuntu0.1 [30.9 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libk5crypto3 amd64 1.16-2ubuntu0.1 [85.6 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic/main amd64 libkeyutils1 amd64 1.5.9-9.2ubuntu2 [8720 B] Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libkrb5-3 amd64 1.16-2ubuntu0.1 [279 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgssapi-krb5-2 amd64 1.16-2ubuntu0.1 [122 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpsl5 amd64 0.19.1-5build1 [41.8 kB] Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 manpages all 4.15-1 [1234 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic/main amd64 publicsuffix all 20180223.1310-1 [97.6 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-21ubuntu1~18.04.2 [193 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libbinutils amd64 2.30-21ubuntu1~18.04.2 [503 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.30-21ubuntu1~18.04.2 [1856 kB] Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils amd64 2.30-21ubuntu1~18.04.2 [3396 B] Get:20 http://archive.ubuntu.com/ubuntu bionic/main amd64 cmake-data all 3.10.2-1ubuntu2 [1331 kB] Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libarchive13 amd64 3.2.2-3.1ubuntu0.3 [288 kB] Get:22 http://archive.ubuntu.com/ubuntu bionic/main amd64 libroken18-heimdal amd64 7.5.0+dfsg-1 [41.3 kB] Get:23 http://archive.ubuntu.com/ubuntu bionic/main amd64 libasn1-8-heimdal amd64 7.5.0+dfsg-1 [175 kB] Get:24 http://archive.ubuntu.com/ubuntu bionic/main amd64 libheimbase1-heimdal amd64 7.5.0+dfsg-1 [29.3 kB] Get:25 http://archive.ubuntu.com/ubuntu bionic/main amd64 libhcrypto4-heimdal amd64 7.5.0+dfsg-1 [85.9 kB] Get:26 http://archive.ubuntu.com/ubuntu bionic/main amd64 libwind0-heimdal amd64 7.5.0+dfsg-1 [47.8 kB] Get:27 http://archive.ubuntu.com/ubuntu bionic/main amd64 libhx509-5-heimdal amd64 7.5.0+dfsg-1 [107 kB] Get:28 http://archive.ubuntu.com/ubuntu bionic/main amd64 libkrb5-26-heimdal amd64 7.5.0+dfsg-1 [206 kB] Get:29 http://archive.ubuntu.com/ubuntu bionic/main amd64 libheimntlm0-heimdal amd64 7.5.0+dfsg-1 [14.8 kB] Get:30 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgssapi3-heimdal amd64 7.5.0+dfsg-1 [96.5 kB] Get:31 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsasl2-modules-db amd64 2.1.27~101-g0780600+dfsg-3ubuntu2 [14.8 kB] Get:32 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsasl2-2 amd64 2.1.27~101-g0780600+dfsg-3ubuntu2 [49.2 kB] Get:33 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libldap-common all 2.4.45+dfsg-1ubuntu1.2 [16.7 kB] Get:34 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libldap-2.4-2 amd64 2.4.45+dfsg-1ubuntu1.2 [155 kB] Get:35 http://archive.ubuntu.com/ubuntu bionic/main amd64 libnghttp2-14 amd64 1.30.0-1ubuntu1 [77.8 kB] Get:36 http://archive.ubuntu.com/ubuntu bionic/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-1 [54.2 kB] Get:37 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.7 [214 kB] Get:38 http://archive.ubuntu.com/ubuntu bionic/main amd64 libjsoncpp1 amd64 1.7.4-3 [73.6 kB] Get:39 http://archive.ubuntu.com/ubuntu bionic/main amd64 librhash0 amd64 1.3.6-2 [78.1 kB] Get:40 http://archive.ubuntu.com/ubuntu bionic/main amd64 libuv1 amd64 1.18.0-3 [64.4 kB] Get:41 http://archive.ubuntu.com/ubuntu bionic/main amd64 cmake amd64 3.10.2-1ubuntu2 [3138 kB] Get:42 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7-base amd64 7.4.0-1ubuntu1~18.04.1 [18.9 kB] Get:43 http://archive.ubuntu.com/ubuntu bionic/main amd64 libisl19 amd64 0.19-1 [551 kB] Get:44 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpfr6 amd64 4.0.1-1 [243 kB] Get:45 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpc3 amd64 1.1.0-1 [40.8 kB] Get:46 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cpp-7 amd64 7.4.0-1ubuntu1~18.04.1 [6742 kB] Get:47 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 cpp amd64 4:7.4.0-1ubuntu2.3 [27.7 kB] Get:48 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcc1-0 amd64 8.3.0-6ubuntu1~18.04.1 [47.4 kB] Get:49 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgomp1 amd64 8.3.0-6ubuntu1~18.04.1 [76.4 kB] Get:50 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libitm1 amd64 8.3.0-6ubuntu1~18.04.1 [28.0 kB] Get:51 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libatomic1 amd64 8.3.0-6ubuntu1~18.04.1 [9184 B] Get:52 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libasan4 amd64 7.4.0-1ubuntu1~18.04.1 [359 kB] Get:53 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 liblsan0 amd64 8.3.0-6ubuntu1~18.04.1 [133 kB] Get:54 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libtsan0 amd64 8.3.0-6ubuntu1~18.04.1 [288 kB] Get:55 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libubsan0 amd64 7.4.0-1ubuntu1~18.04.1 [126 kB] Get:56 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcilkrts5 amd64 7.4.0-1ubuntu1~18.04.1 [42.5 kB] Get:57 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmpx2 amd64 8.3.0-6ubuntu1~18.04.1 [11.6 kB] Get:58 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libquadmath0 amd64 8.3.0-6ubuntu1~18.04.1 [133 kB] Get:59 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc-7-dev amd64 7.4.0-1ubuntu1~18.04.1 [2381 kB] Get:60 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc-7 amd64 7.4.0-1ubuntu1~18.04.1 [7463 kB] Get:61 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gcc amd64 4:7.4.0-1ubuntu2.3 [5184 B] Get:62 http://archive.ubuntu.com/ubuntu bionic/main amd64 libc-dev-bin amd64 2.27-3ubuntu1 [71.8 kB] Get:63 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-52.56 [1004 kB] Get:64 http://archive.ubuntu.com/ubuntu bionic/main amd64 libc6-dev amd64 2.27-3ubuntu1 [2587 kB] Get:65 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsasl2-modules amd64 2.1.27~101-g0780600+dfsg-3ubuntu2 [48.7 kB] Get:66 http://archive.ubuntu.com/ubuntu bionic/main amd64 make amd64 4.1-9.1ubuntu1 [154 kB] Get:67 http://archive.ubuntu.com/ubuntu bionic/main amd64 manpages-dev all 4.15-1 [2217 kB] Fetched 45.2 MB in 13s (3366 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package multiarch-support. (Reading database ... 4859 files and directories currently installed.) Preparing to unpack .../multiarch-support_2.27-3ubuntu1_amd64.deb ... Unpacking multiarch-support (2.27-3ubuntu1) ... Setting up multiarch-support (2.27-3ubuntu1) ... Selecting previously unselected package liblzo2-2:amd64. (Reading database ... 4862 files and directories currently installed.) Preparing to unpack .../00-liblzo2-2_2.08-1.2_amd64.deb ... Unpacking liblzo2-2:amd64 (2.08-1.2) ... Selecting previously unselected package openssl. Preparing to unpack .../01-openssl_1.1.1-1ubuntu2.1~18.04.3_amd64.deb ... Unpacking openssl (1.1.1-1ubuntu2.1~18.04.3) ... Selecting previously unselected package ca-certificates. Preparing to unpack .../02-ca-certificates_20180409_all.deb ... Unpacking ca-certificates (20180409) ... Selecting previously unselected package libicu60:amd64. Preparing to unpack .../03-libicu60_60.2-3ubuntu3_amd64.deb ... Unpacking libicu60:amd64 (60.2-3ubuntu3) ... Selecting previously unselected package libxml2:amd64. Preparing to unpack .../04-libxml2_2.9.4+dfsg1-6.1ubuntu1.2_amd64.deb ... Unpacking libxml2:amd64 (2.9.4+dfsg1-6.1ubuntu1.2) ... Selecting previously unselected package krb5-locales. Preparing to unpack .../05-krb5-locales_1.16-2ubuntu0.1_all.deb ... Unpacking krb5-locales (1.16-2ubuntu0.1) ... Selecting previously unselected package libkrb5support0:amd64. Preparing to unpack .../06-libkrb5support0_1.16-2ubuntu0.1_amd64.deb ... Unpacking libkrb5support0:amd64 (1.16-2ubuntu0.1) ... Selecting previously unselected package libk5crypto3:amd64. Preparing to unpack .../07-libk5crypto3_1.16-2ubuntu0.1_amd64.deb ... Unpacking libk5crypto3:amd64 (1.16-2ubuntu0.1) ... Selecting previously unselected package libkeyutils1:amd64. Preparing to unpack .../08-libkeyutils1_1.5.9-9.2ubuntu2_amd64.deb ... Unpacking libkeyutils1:amd64 (1.5.9-9.2ubuntu2) ... Selecting previously unselected package libkrb5-3:amd64. Preparing to unpack .../09-libkrb5-3_1.16-2ubuntu0.1_amd64.deb ... Unpacking libkrb5-3:amd64 (1.16-2ubuntu0.1) ... Selecting previously unselected package libgssapi-krb5-2:amd64. Preparing to unpack .../10-libgssapi-krb5-2_1.16-2ubuntu0.1_amd64.deb ... Unpacking libgssapi-krb5-2:amd64 (1.16-2ubuntu0.1) ... Selecting previously unselected package libpsl5:amd64. Preparing to unpack .../11-libpsl5_0.19.1-5build1_amd64.deb ... Unpacking libpsl5:amd64 (0.19.1-5build1) ... Selecting previously unselected package manpages. Preparing to unpack .../12-manpages_4.15-1_all.deb ... Unpacking manpages (4.15-1) ... Selecting previously unselected package publicsuffix. Preparing to unpack .../13-publicsuffix_20180223.1310-1_all.deb ... Unpacking publicsuffix (20180223.1310-1) ... Selecting previously unselected package binutils-common:amd64. Preparing to unpack .../14-binutils-common_2.30-21ubuntu1~18.04.2_amd64.deb ... Unpacking binutils-common:amd64 (2.30-21ubuntu1~18.04.2) ... Selecting previously unselected package libbinutils:amd64. Preparing to unpack .../15-libbinutils_2.30-21ubuntu1~18.04.2_amd64.deb ... Unpacking libbinutils:amd64 (2.30-21ubuntu1~18.04.2) ... Selecting previously unselected package binutils-x86-64-linux-gnu. Preparing to unpack .../16-binutils-x86-64-linux-gnu_2.30-21ubuntu1~18.04.2_amd64.deb ... Unpacking binutils-x86-64-linux-gnu (2.30-21ubuntu1~18.04.2) ... Selecting previously unselected package binutils. Preparing to unpack .../17-binutils_2.30-21ubuntu1~18.04.2_amd64.deb ... Unpacking binutils (2.30-21ubuntu1~18.04.2) ... Selecting previously unselected package cmake-data. Preparing to unpack .../18-cmake-data_3.10.2-1ubuntu2_all.deb ... Unpacking cmake-data (3.10.2-1ubuntu2) ... Selecting previously unselected package libarchive13:amd64. Preparing to unpack .../19-libarchive13_3.2.2-3.1ubuntu0.3_amd64.deb ... Unpacking libarchive13:amd64 (3.2.2-3.1ubuntu0.3) ... Selecting previously unselected package libroken18-heimdal:amd64. Preparing to unpack .../20-libroken18-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libroken18-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libasn1-8-heimdal:amd64. Preparing to unpack .../21-libasn1-8-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libasn1-8-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libheimbase1-heimdal:amd64. Preparing to unpack .../22-libheimbase1-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libheimbase1-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libhcrypto4-heimdal:amd64. Preparing to unpack .../23-libhcrypto4-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libhcrypto4-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libwind0-heimdal:amd64. Preparing to unpack .../24-libwind0-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libwind0-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libhx509-5-heimdal:amd64. Preparing to unpack .../25-libhx509-5-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libhx509-5-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libkrb5-26-heimdal:amd64. Preparing to unpack .../26-libkrb5-26-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libkrb5-26-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libheimntlm0-heimdal:amd64. Preparing to unpack .../27-libheimntlm0-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libheimntlm0-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libgssapi3-heimdal:amd64. Preparing to unpack .../28-libgssapi3-heimdal_7.5.0+dfsg-1_amd64.deb ... Unpacking libgssapi3-heimdal:amd64 (7.5.0+dfsg-1) ... Selecting previously unselected package libsasl2-modules-db:amd64. Preparing to unpack .../29-libsasl2-modules-db_2.1.27~101-g0780600+dfsg-3ubuntu2_amd64.deb ... Unpacking libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Selecting previously unselected package libsasl2-2:amd64. Preparing to unpack .../30-libsasl2-2_2.1.27~101-g0780600+dfsg-3ubuntu2_amd64.deb ... Unpacking libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Selecting previously unselected package libldap-common. Preparing to unpack .../31-libldap-common_2.4.45+dfsg-1ubuntu1.2_all.deb ... Unpacking libldap-common (2.4.45+dfsg-1ubuntu1.2) ... Selecting previously unselected package libldap-2.4-2:amd64. Preparing to unpack .../32-libldap-2.4-2_2.4.45+dfsg-1ubuntu1.2_amd64.deb ... Unpacking libldap-2.4-2:amd64 (2.4.45+dfsg-1ubuntu1.2) ... Selecting previously unselected package libnghttp2-14:amd64. Preparing to unpack .../33-libnghttp2-14_1.30.0-1ubuntu1_amd64.deb ... Unpacking libnghttp2-14:amd64 (1.30.0-1ubuntu1) ... Selecting previously unselected package librtmp1:amd64. Preparing to unpack .../34-librtmp1_2.4+20151223.gitfa8646d.1-1_amd64.deb ... Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1) ... Selecting previously unselected package libcurl4:amd64. Preparing to unpack .../35-libcurl4_7.58.0-2ubuntu3.7_amd64.deb ... Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.7) ... Selecting previously unselected package libjsoncpp1:amd64. Preparing to unpack .../36-libjsoncpp1_1.7.4-3_amd64.deb ... Unpacking libjsoncpp1:amd64 (1.7.4-3) ... Selecting previously unselected package librhash0:amd64. Preparing to unpack .../37-librhash0_1.3.6-2_amd64.deb ... Unpacking librhash0:amd64 (1.3.6-2) ... Selecting previously unselected package libuv1:amd64. Preparing to unpack .../38-libuv1_1.18.0-3_amd64.deb ... Unpacking libuv1:amd64 (1.18.0-3) ... Selecting previously unselected package cmake. Preparing to unpack .../39-cmake_3.10.2-1ubuntu2_amd64.deb ... Unpacking cmake (3.10.2-1ubuntu2) ... Selecting previously unselected package gcc-7-base:amd64. Preparing to unpack .../40-gcc-7-base_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking gcc-7-base:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package libisl19:amd64. Preparing to unpack .../41-libisl19_0.19-1_amd64.deb ... Unpacking libisl19:amd64 (0.19-1) ... Selecting previously unselected package libmpfr6:amd64. Preparing to unpack .../42-libmpfr6_4.0.1-1_amd64.deb ... Unpacking libmpfr6:amd64 (4.0.1-1) ... Selecting previously unselected package libmpc3:amd64. Preparing to unpack .../43-libmpc3_1.1.0-1_amd64.deb ... Unpacking libmpc3:amd64 (1.1.0-1) ... Selecting previously unselected package cpp-7. Preparing to unpack .../44-cpp-7_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking cpp-7 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package cpp. Preparing to unpack .../45-cpp_4%3a7.4.0-1ubuntu2.3_amd64.deb ... Unpacking cpp (4:7.4.0-1ubuntu2.3) ... Selecting previously unselected package libcc1-0:amd64. Preparing to unpack .../46-libcc1-0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libcc1-0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libgomp1:amd64. Preparing to unpack .../47-libgomp1_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libgomp1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libitm1:amd64. Preparing to unpack .../48-libitm1_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libitm1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libatomic1:amd64. Preparing to unpack .../49-libatomic1_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libatomic1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libasan4:amd64. Preparing to unpack .../50-libasan4_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libasan4:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package liblsan0:amd64. Preparing to unpack .../51-liblsan0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking liblsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libtsan0:amd64. Preparing to unpack .../52-libtsan0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libtsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libubsan0:amd64. Preparing to unpack .../53-libubsan0_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libubsan0:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package libcilkrts5:amd64. Preparing to unpack .../54-libcilkrts5_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libcilkrts5:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package libmpx2:amd64. Preparing to unpack .../55-libmpx2_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libmpx2:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libquadmath0:amd64. Preparing to unpack .../56-libquadmath0_8.3.0-6ubuntu1~18.04.1_amd64.deb ... Unpacking libquadmath0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Selecting previously unselected package libgcc-7-dev:amd64. Preparing to unpack .../57-libgcc-7-dev_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libgcc-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package gcc-7. Preparing to unpack .../58-gcc-7_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking gcc-7 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package gcc. Preparing to unpack .../59-gcc_4%3a7.4.0-1ubuntu2.3_amd64.deb ... Unpacking gcc (4:7.4.0-1ubuntu2.3) ... Selecting previously unselected package libc-dev-bin. Preparing to unpack .../60-libc-dev-bin_2.27-3ubuntu1_amd64.deb ... Unpacking libc-dev-bin (2.27-3ubuntu1) ... Selecting previously unselected package linux-libc-dev:amd64. Preparing to unpack .../61-linux-libc-dev_4.15.0-52.56_amd64.deb ... Unpacking linux-libc-dev:amd64 (4.15.0-52.56) ... Selecting previously unselected package libc6-dev:amd64. Preparing to unpack .../62-libc6-dev_2.27-3ubuntu1_amd64.deb ... Unpacking libc6-dev:amd64 (2.27-3ubuntu1) ... Selecting previously unselected package libsasl2-modules:amd64. Preparing to unpack .../63-libsasl2-modules_2.1.27~101-g0780600+dfsg-3ubuntu2_amd64.deb ... Unpacking libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Selecting previously unselected package make. Preparing to unpack .../64-make_4.1-9.1ubuntu1_amd64.deb ... Unpacking make (4.1-9.1ubuntu1) ... Selecting previously unselected package manpages-dev. Preparing to unpack .../65-manpages-dev_4.15-1_all.deb ... Unpacking manpages-dev (4.15-1) ... Setting up libquadmath0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up libgomp1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up libatomic1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up manpages (4.15-1) ... Setting up libicu60:amd64 (60.2-3ubuntu3) ... Setting up libcc1-0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up make (4.1-9.1ubuntu1) ... Setting up libnghttp2-14:amd64 (1.30.0-1ubuntu1) ... Setting up libldap-common (2.4.45+dfsg-1ubuntu1.2) ... Setting up libuv1:amd64 (1.18.0-3) ... Setting up libpsl5:amd64 (0.19.1-5build1) ... Setting up libtsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Setting up linux-libc-dev:amd64 (4.15.0-52.56) ... Setting up libmpfr6:amd64 (4.0.1-1) ... Setting up libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Setting up cmake-data (3.10.2-1ubuntu2) ... Setting up libroken18-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-1) ... Setting up libkrb5support0:amd64 (1.16-2ubuntu0.1) ... Setting up libxml2:amd64 (2.9.4+dfsg1-6.1ubuntu1.2) ... Setting up librhash0:amd64 (1.3.6-2) ... Setting up liblsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up gcc-7-base:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up binutils-common:amd64 (2.30-21ubuntu1~18.04.2) ... Setting up libmpx2:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up krb5-locales (1.16-2ubuntu0.1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up publicsuffix (20180223.1310-1) ... Setting up libheimbase1-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up openssl (1.1.1-1ubuntu2.1~18.04.3) ... Setting up libmpc3:amd64 (1.1.0-1) ... Setting up libc-dev-bin (2.27-3ubuntu1) ... Setting up libkeyutils1:amd64 (1.5.9-9.2ubuntu2) ... Setting up libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-3ubuntu2) ... Setting up ca-certificates (20180409) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Updating certificates in /etc/ssl/certs... 133 added, 0 removed; done. Setting up manpages-dev (4.15-1) ... Setting up libc6-dev:amd64 (2.27-3ubuntu1) ... Setting up libitm1:amd64 (8.3.0-6ubuntu1~18.04.1) ... Setting up liblzo2-2:amd64 (2.08-1.2) ... Setting up libisl19:amd64 (0.19-1) ... Setting up libjsoncpp1:amd64 (1.7.4-3) ... Setting up libk5crypto3:amd64 (1.16-2ubuntu0.1) ... Setting up libwind0-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libasan4:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libbinutils:amd64 (2.30-21ubuntu1~18.04.2) ... Setting up libarchive13:amd64 (3.2.2-3.1ubuntu0.3) ... Setting up libcilkrts5:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libasn1-8-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libubsan0:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up libhcrypto4-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libhx509-5-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libgcc-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up cpp-7 (7.4.0-1ubuntu1~18.04.1) ... Setting up libkrb5-3:amd64 (1.16-2ubuntu0.1) ... Setting up libkrb5-26-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up libheimntlm0-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up binutils-x86-64-linux-gnu (2.30-21ubuntu1~18.04.2) ... Setting up cpp (4:7.4.0-1ubuntu2.3) ... Setting up libgssapi-krb5-2:amd64 (1.16-2ubuntu0.1) ... Setting up binutils (2.30-21ubuntu1~18.04.2) ... Setting up libgssapi3-heimdal:amd64 (7.5.0+dfsg-1) ... Setting up gcc-7 (7.4.0-1ubuntu1~18.04.1) ... Setting up gcc (4:7.4.0-1ubuntu2.3) ... Setting up libldap-2.4-2:amd64 (2.4.45+dfsg-1ubuntu1.2) ... Setting up libcurl4:amd64 (7.58.0-2ubuntu3.7) ... Setting up cmake (3.10.2-1ubuntu2) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Processing triggers for ca-certificates (20180409) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. root@02b32b9272ce:/# apt install python3-pip Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: build-essential dbus dh-python dirmngr dpkg-dev fakeroot g++ g++-7 gir1.2-glib-2.0 gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapparmor1 libassuan0 libdbus-1-3 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgdbm-compat4 libgdbm5 libgirepository-1.0-1 libglib2.0-0 libglib2.0-data libksba8 liblocale-gettext-perl libnpth0 libperl5.26 libpython3-dev libpython3.6 libpython3.6-dev libstdc++-7-dev netbase patch perl perl-modules-5.26 pinentry-curses python-pip-whl python3-asn1crypto python3-cffi-backend python3-crypto python3-cryptography python3-dbus python3-dev python3-distutils python3-gi python3-idna python3-keyring python3-keyrings.alt python3-lib2to3 python3-pkg-resources python3-secretstorage python3-setuptools python3-six python3-wheel python3-xdg python3.6-dev shared-mime-info xdg-user-dirs Suggested packages: default-dbus-session-bus | dbus-session-bus dbus-user-session libpam-systemd pinentry-gnome3 tor debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg parcimonie xloadimage scdaemon git bzr gdbm-l10n libstdc++-7-doc ed diffutils-doc perl-doc libterm-readline-gnu-perl | libterm-readline-perl-perl pinentry-doc python-crypto-doc python-cryptography-doc python3-cryptography-vectors python-dbus-doc python3-dbus-dbg gnome-keyring libkf5wallet-bin gir1.2-gnomekeyring-1.0 python-secretstorage-doc python-setuptools-doc The following NEW packages will be installed: build-essential dbus dh-python dirmngr dpkg-dev fakeroot g++ g++-7 gir1.2-glib-2.0 gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapparmor1 libassuan0 libdbus-1-3 libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libgdbm-compat4 libgdbm5 libgirepository-1.0-1 libglib2.0-0 libglib2.0-data libksba8 liblocale-gettext-perl libnpth0 libperl5.26 libpython3-dev libpython3.6 libpython3.6-dev libstdc++-7-dev netbase patch perl perl-modules-5.26 pinentry-curses python-pip-whl python3-asn1crypto python3-cffi-backend python3-crypto python3-cryptography python3-dbus python3-dev python3-distutils python3-gi python3-idna python3-keyring python3-keyrings.alt python3-lib2to3 python3-pip python3-pkg-resources python3-secretstorage python3-setuptools python3-six python3-wheel python3-xdg python3.6-dev shared-mime-info xdg-user-dirs 0 upgraded, 69 newly installed, 0 to remove and 0 not upgraded. Need to get 71.4 MB of archives. After this operation, 198 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 liblocale-gettext-perl amd64 1.07-3build2 [16.6 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 perl-modules-5.26 all 5.26.1-6ubuntu0.3 [2763 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgdbm5 amd64 1.14.1-6 [26.0 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgdbm-compat4 amd64 1.14.1-6 [6084 B] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libperl5.26 amd64 5.26.1-6ubuntu0.3 [3527 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 perl amd64 5.26.1-6ubuntu0.3 [201 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapparmor1 amd64 2.12-4ubuntu5.1 [31.3 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdbus-1-3 amd64 1.12.2-1ubuntu1.1 [175 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dbus amd64 1.12.2-1ubuntu1.1 [150 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglib2.0-0 amd64 2.56.4-0ubuntu0.18.04.3 [1169 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgirepository-1.0-1 amd64 1.56.1-1 [82.0 kB] Get:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 gir1.2-glib-2.0 amd64 1.56.1-1 [131 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglib2.0-data all 2.56.4-0ubuntu0.18.04.3 [4608 B] Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 netbase all 5.4 [12.7 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-dbus amd64 1.2.6-1 [89.9 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-gi amd64 3.26.1-2ubuntu1 [153 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic/main amd64 shared-mime-info amd64 1.9-2 [426 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic/main amd64 xdg-user-dirs amd64 0.17-1ubuntu1 [48.0 kB] Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libstdc++-7-dev amd64 7.4.0-1ubuntu1~18.04.1 [1468 kB] Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 g++-7 amd64 7.4.0-1ubuntu1~18.04.1 [7574 kB] Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 g++ amd64 4:7.4.0-1ubuntu2.3 [1568 B] Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdpkg-perl all 1.19.0.5ubuntu2.1 [211 kB] Get:23 http://archive.ubuntu.com/ubuntu bionic/main amd64 patch amd64 2.7.6-2ubuntu1 [102 kB] Get:24 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dpkg-dev all 1.19.0.5ubuntu2.1 [608 kB] Get:25 http://archive.ubuntu.com/ubuntu bionic/main amd64 build-essential amd64 12.4ubuntu1 [4758 B] Get:26 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-lib2to3 all 3.6.8-1~18.04 [76.5 kB] Get:27 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-distutils all 3.6.8-1~18.04 [141 kB] Get:28 http://archive.ubuntu.com/ubuntu bionic/main amd64 dh-python all 3.20180325ubuntu2 [89.2 kB] Get:29 http://archive.ubuntu.com/ubuntu bionic/main amd64 libassuan0 amd64 2.5.1-2 [35.0 kB] Get:30 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpgconf amd64 2.2.4-1ubuntu1.2 [123 kB] Get:31 http://archive.ubuntu.com/ubuntu bionic/main amd64 libksba8 amd64 1.3.5-2 [92.6 kB] Get:32 http://archive.ubuntu.com/ubuntu bionic/main amd64 libnpth0 amd64 1.5-3 [7668 B] Get:33 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dirmngr amd64 2.2.4-1ubuntu1.2 [316 kB] Get:34 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfakeroot amd64 1.22-2ubuntu1 [25.9 kB] Get:35 http://archive.ubuntu.com/ubuntu bionic/main amd64 fakeroot amd64 1.22-2ubuntu1 [62.3 kB] Get:36 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnupg-l10n all 2.2.4-1ubuntu1.2 [49.6 kB] Get:37 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnupg-utils amd64 2.2.4-1ubuntu1.2 [127 kB] Get:38 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg amd64 2.2.4-1ubuntu1.2 [467 kB] Get:39 http://archive.ubuntu.com/ubuntu bionic/main amd64 pinentry-curses amd64 1.1.0-1 [35.8 kB] Get:40 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg-agent amd64 2.2.4-1ubuntu1.2 [227 kB] Get:41 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg-wks-client amd64 2.2.4-1ubuntu1.2 [91.9 kB] Get:42 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpg-wks-server amd64 2.2.4-1ubuntu1.2 [84.9 kB] Get:43 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gpgsm amd64 2.2.4-1ubuntu1.2 [215 kB] Get:44 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gnupg amd64 2.2.4-1ubuntu1.2 [249 kB] Get:45 http://archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB] Get:46 http://archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-diff-xs-perl amd64 0.04-5 [11.1 kB] Get:47 http://archive.ubuntu.com/ubuntu bionic/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB] Get:48 http://archive.ubuntu.com/ubuntu bionic/main amd64 libexpat1-dev amd64 2.2.5-3 [122 kB] Get:49 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfile-fcntllock-perl amd64 0.22-3build2 [33.2 kB] Get:50 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6 amd64 3.6.8-1~18.04.1 [1418 kB] Get:51 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-dev amd64 3.6.8-1~18.04.1 [44.8 MB] Get:52 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3-dev amd64 3.6.7-1~18.04 [7328 B] Get:53 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python-pip-whl all 9.0.1-2.3~ubuntu1.18.04.1 [1653 kB] Get:54 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-asn1crypto all 0.24.0-1 [72.8 kB] Get:55 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-cffi-backend amd64 1.11.5-1 [64.6 kB] Get:56 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-crypto amd64 2.6.1-8ubuntu2 [244 kB] Get:57 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-idna all 2.6-1 [32.5 kB] Get:58 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-six all 1.11.0-2 [11.4 kB] Get:59 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-cryptography amd64 2.1.4-1ubuntu1.3 [221 kB] Get:60 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-dev amd64 3.6.8-1~18.04.1 [508 kB] Get:61 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-dev amd64 3.6.7-1~18.04 [1288 B] Get:62 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-secretstorage all 2.3.1-2 [12.1 kB] Get:63 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-keyring all 10.6.0-1 [26.7 kB] Get:64 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-keyrings.alt all 3.0-1 [16.6 kB] Get:65 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python3-pip all 9.0.1-2.3~ubuntu1.18.04.1 [114 kB] Get:66 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-pkg-resources all 39.0.1-2 [98.8 kB] Get:67 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-setuptools all 39.0.1-2 [248 kB] Get:68 http://archive.ubuntu.com/ubuntu bionic/universe amd64 python3-wheel all 0.30.0-0.2 [36.5 kB] Get:69 http://archive.ubuntu.com/ubuntu bionic/main amd64 python3-xdg all 0.25-4ubuntu1 [31.4 kB] Fetched 71.4 MB in 22s (3203 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package liblocale-gettext-perl. (Reading database ... 12277 files and directories currently installed.) Preparing to unpack .../00-liblocale-gettext-perl_1.07-3build2_amd64.deb ... Unpacking liblocale-gettext-perl (1.07-3build2) ... Selecting previously unselected package perl-modules-5.26. Preparing to unpack .../01-perl-modules-5.26_5.26.1-6ubuntu0.3_all.deb ... Unpacking perl-modules-5.26 (5.26.1-6ubuntu0.3) ... Selecting previously unselected package libgdbm5:amd64. Preparing to unpack .../02-libgdbm5_1.14.1-6_amd64.deb ... Unpacking libgdbm5:amd64 (1.14.1-6) ... Selecting previously unselected package libgdbm-compat4:amd64. Preparing to unpack .../03-libgdbm-compat4_1.14.1-6_amd64.deb ... Unpacking libgdbm-compat4:amd64 (1.14.1-6) ... Selecting previously unselected package libperl5.26:amd64. Preparing to unpack .../04-libperl5.26_5.26.1-6ubuntu0.3_amd64.deb ... Unpacking libperl5.26:amd64 (5.26.1-6ubuntu0.3) ... Selecting previously unselected package perl. Preparing to unpack .../05-perl_5.26.1-6ubuntu0.3_amd64.deb ... Unpacking perl (5.26.1-6ubuntu0.3) ... Selecting previously unselected package libapparmor1:amd64. Preparing to unpack .../06-libapparmor1_2.12-4ubuntu5.1_amd64.deb ... Unpacking libapparmor1:amd64 (2.12-4ubuntu5.1) ... Selecting previously unselected package libdbus-1-3:amd64. Preparing to unpack .../07-libdbus-1-3_1.12.2-1ubuntu1.1_amd64.deb ... Unpacking libdbus-1-3:amd64 (1.12.2-1ubuntu1.1) ... Selecting previously unselected package dbus. Preparing to unpack .../08-dbus_1.12.2-1ubuntu1.1_amd64.deb ... Unpacking dbus (1.12.2-1ubuntu1.1) ... Selecting previously unselected package libglib2.0-0:amd64. Preparing to unpack .../09-libglib2.0-0_2.56.4-0ubuntu0.18.04.3_amd64.deb ... Unpacking libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.3) ... Selecting previously unselected package libgirepository-1.0-1:amd64. Preparing to unpack .../10-libgirepository-1.0-1_1.56.1-1_amd64.deb ... Unpacking libgirepository-1.0-1:amd64 (1.56.1-1) ... Selecting previously unselected package gir1.2-glib-2.0:amd64. Preparing to unpack .../11-gir1.2-glib-2.0_1.56.1-1_amd64.deb ... Unpacking gir1.2-glib-2.0:amd64 (1.56.1-1) ... Selecting previously unselected package libglib2.0-data. Preparing to unpack .../12-libglib2.0-data_2.56.4-0ubuntu0.18.04.3_all.deb ... Unpacking libglib2.0-data (2.56.4-0ubuntu0.18.04.3) ... Selecting previously unselected package netbase. Preparing to unpack .../13-netbase_5.4_all.deb ... Unpacking netbase (5.4) ... Selecting previously unselected package python3-dbus. Preparing to unpack .../14-python3-dbus_1.2.6-1_amd64.deb ... Unpacking python3-dbus (1.2.6-1) ... Selecting previously unselected package python3-gi. Preparing to unpack .../15-python3-gi_3.26.1-2ubuntu1_amd64.deb ... Unpacking python3-gi (3.26.1-2ubuntu1) ... Selecting previously unselected package shared-mime-info. Preparing to unpack .../16-shared-mime-info_1.9-2_amd64.deb ... Unpacking shared-mime-info (1.9-2) ... Selecting previously unselected package xdg-user-dirs. Preparing to unpack .../17-xdg-user-dirs_0.17-1ubuntu1_amd64.deb ... Unpacking xdg-user-dirs (0.17-1ubuntu1) ... Selecting previously unselected package libstdc++-7-dev:amd64. Preparing to unpack .../18-libstdc++-7-dev_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking libstdc++-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package g++-7. Preparing to unpack .../19-g++-7_7.4.0-1ubuntu1~18.04.1_amd64.deb ... Unpacking g++-7 (7.4.0-1ubuntu1~18.04.1) ... Selecting previously unselected package g++. Preparing to unpack .../20-g++_4%3a7.4.0-1ubuntu2.3_amd64.deb ... Unpacking g++ (4:7.4.0-1ubuntu2.3) ... Selecting previously unselected package libdpkg-perl. Preparing to unpack .../21-libdpkg-perl_1.19.0.5ubuntu2.1_all.deb ... Unpacking libdpkg-perl (1.19.0.5ubuntu2.1) ... Selecting previously unselected package patch. Preparing to unpack .../22-patch_2.7.6-2ubuntu1_amd64.deb ... Unpacking patch (2.7.6-2ubuntu1) ... Selecting previously unselected package dpkg-dev. Preparing to unpack .../23-dpkg-dev_1.19.0.5ubuntu2.1_all.deb ... Unpacking dpkg-dev (1.19.0.5ubuntu2.1) ... Selecting previously unselected package build-essential. Preparing to unpack .../24-build-essential_12.4ubuntu1_amd64.deb ... Unpacking build-essential (12.4ubuntu1) ... Selecting previously unselected package python3-lib2to3. Preparing to unpack .../25-python3-lib2to3_3.6.8-1~18.04_all.deb ... Unpacking python3-lib2to3 (3.6.8-1~18.04) ... Selecting previously unselected package python3-distutils. Preparing to unpack .../26-python3-distutils_3.6.8-1~18.04_all.deb ... Unpacking python3-distutils (3.6.8-1~18.04) ... Selecting previously unselected package dh-python. Preparing to unpack .../27-dh-python_3.20180325ubuntu2_all.deb ... Unpacking dh-python (3.20180325ubuntu2) ... Selecting previously unselected package libassuan0:amd64. Preparing to unpack .../28-libassuan0_2.5.1-2_amd64.deb ... Unpacking libassuan0:amd64 (2.5.1-2) ... Selecting previously unselected package gpgconf. Preparing to unpack .../29-gpgconf_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpgconf (2.2.4-1ubuntu1.2) ... Selecting previously unselected package libksba8:amd64. Preparing to unpack .../30-libksba8_1.3.5-2_amd64.deb ... Unpacking libksba8:amd64 (1.3.5-2) ... Selecting previously unselected package libnpth0:amd64. Preparing to unpack .../31-libnpth0_1.5-3_amd64.deb ... Unpacking libnpth0:amd64 (1.5-3) ... Selecting previously unselected package dirmngr. Preparing to unpack .../32-dirmngr_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking dirmngr (2.2.4-1ubuntu1.2) ... Selecting previously unselected package libfakeroot:amd64. Preparing to unpack .../33-libfakeroot_1.22-2ubuntu1_amd64.deb ... Unpacking libfakeroot:amd64 (1.22-2ubuntu1) ... Selecting previously unselected package fakeroot. Preparing to unpack .../34-fakeroot_1.22-2ubuntu1_amd64.deb ... Unpacking fakeroot (1.22-2ubuntu1) ... Selecting previously unselected package gnupg-l10n. Preparing to unpack .../35-gnupg-l10n_2.2.4-1ubuntu1.2_all.deb ... Unpacking gnupg-l10n (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gnupg-utils. Preparing to unpack .../36-gnupg-utils_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gnupg-utils (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gpg. Preparing to unpack .../37-gpg_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpg (2.2.4-1ubuntu1.2) ... Selecting previously unselected package pinentry-curses. Preparing to unpack .../38-pinentry-curses_1.1.0-1_amd64.deb ... Unpacking pinentry-curses (1.1.0-1) ... Selecting previously unselected package gpg-agent. Preparing to unpack .../39-gpg-agent_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpg-agent (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gpg-wks-client. Preparing to unpack .../40-gpg-wks-client_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpg-wks-client (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gpg-wks-server. Preparing to unpack .../41-gpg-wks-server_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpg-wks-server (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gpgsm. Preparing to unpack .../42-gpgsm_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gpgsm (2.2.4-1ubuntu1.2) ... Selecting previously unselected package gnupg. Preparing to unpack .../43-gnupg_2.2.4-1ubuntu1.2_amd64.deb ... Unpacking gnupg (2.2.4-1ubuntu1.2) ... Selecting previously unselected package libalgorithm-diff-perl. Preparing to unpack .../44-libalgorithm-diff-perl_1.19.03-1_all.deb ... Unpacking libalgorithm-diff-perl (1.19.03-1) ... Selecting previously unselected package libalgorithm-diff-xs-perl. Preparing to unpack .../45-libalgorithm-diff-xs-perl_0.04-5_amd64.deb ... Unpacking libalgorithm-diff-xs-perl (0.04-5) ... Selecting previously unselected package libalgorithm-merge-perl. Preparing to unpack .../46-libalgorithm-merge-perl_0.08-3_all.deb ... Unpacking libalgorithm-merge-perl (0.08-3) ... Selecting previously unselected package libexpat1-dev:amd64. Preparing to unpack .../47-libexpat1-dev_2.2.5-3_amd64.deb ... Unpacking libexpat1-dev:amd64 (2.2.5-3) ... Selecting previously unselected package libfile-fcntllock-perl. Preparing to unpack .../48-libfile-fcntllock-perl_0.22-3build2_amd64.deb ... Unpacking libfile-fcntllock-perl (0.22-3build2) ... Selecting previously unselected package libpython3.6:amd64. Preparing to unpack .../49-libpython3.6_3.6.8-1~18.04.1_amd64.deb ... Unpacking libpython3.6:amd64 (3.6.8-1~18.04.1) ... Selecting previously unselected package libpython3.6-dev:amd64. Preparing to unpack .../50-libpython3.6-dev_3.6.8-1~18.04.1_amd64.deb ... Unpacking libpython3.6-dev:amd64 (3.6.8-1~18.04.1) ... Selecting previously unselected package libpython3-dev:amd64. Preparing to unpack .../51-libpython3-dev_3.6.7-1~18.04_amd64.deb ... Unpacking libpython3-dev:amd64 (3.6.7-1~18.04) ... Selecting previously unselected package python-pip-whl. Preparing to unpack .../52-python-pip-whl_9.0.1-2.3~ubuntu1.18.04.1_all.deb ... Unpacking python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1) ... Selecting previously unselected package python3-asn1crypto. Preparing to unpack .../53-python3-asn1crypto_0.24.0-1_all.deb ... Unpacking python3-asn1crypto (0.24.0-1) ... Selecting previously unselected package python3-cffi-backend. Preparing to unpack .../54-python3-cffi-backend_1.11.5-1_amd64.deb ... Unpacking python3-cffi-backend (1.11.5-1) ... Selecting previously unselected package python3-crypto. Preparing to unpack .../55-python3-crypto_2.6.1-8ubuntu2_amd64.deb ... Unpacking python3-crypto (2.6.1-8ubuntu2) ... Selecting previously unselected package python3-idna. Preparing to unpack .../56-python3-idna_2.6-1_all.deb ... Unpacking python3-idna (2.6-1) ... Selecting previously unselected package python3-six. Preparing to unpack .../57-python3-six_1.11.0-2_all.deb ... Unpacking python3-six (1.11.0-2) ... Selecting previously unselected package python3-cryptography. Preparing to unpack .../58-python3-cryptography_2.1.4-1ubuntu1.3_amd64.deb ... Unpacking python3-cryptography (2.1.4-1ubuntu1.3) ... Selecting previously unselected package python3.6-dev. Preparing to unpack .../59-python3.6-dev_3.6.8-1~18.04.1_amd64.deb ... Unpacking python3.6-dev (3.6.8-1~18.04.1) ... Selecting previously unselected package python3-dev. Preparing to unpack .../60-python3-dev_3.6.7-1~18.04_amd64.deb ... Unpacking python3-dev (3.6.7-1~18.04) ... Selecting previously unselected package python3-secretstorage. Preparing to unpack .../61-python3-secretstorage_2.3.1-2_all.deb ... Unpacking python3-secretstorage (2.3.1-2) ... Selecting previously unselected package python3-keyring. Preparing to unpack .../62-python3-keyring_10.6.0-1_all.deb ... Unpacking python3-keyring (10.6.0-1) ... Selecting previously unselected package python3-keyrings.alt. Preparing to unpack .../63-python3-keyrings.alt_3.0-1_all.deb ... Unpacking python3-keyrings.alt (3.0-1) ... Selecting previously unselected package python3-pip. Preparing to unpack .../64-python3-pip_9.0.1-2.3~ubuntu1.18.04.1_all.deb ... Unpacking python3-pip (9.0.1-2.3~ubuntu1.18.04.1) ... Selecting previously unselected package python3-pkg-resources. Preparing to unpack .../65-python3-pkg-resources_39.0.1-2_all.deb ... Unpacking python3-pkg-resources (39.0.1-2) ... Selecting previously unselected package python3-setuptools. Preparing to unpack .../66-python3-setuptools_39.0.1-2_all.deb ... Unpacking python3-setuptools (39.0.1-2) ... Selecting previously unselected package python3-wheel. Preparing to unpack .../67-python3-wheel_0.30.0-0.2_all.deb ... Unpacking python3-wheel (0.30.0-0.2) ... Selecting previously unselected package python3-xdg. Preparing to unpack .../68-python3-xdg_0.25-4ubuntu1_all.deb ... Unpacking python3-xdg (0.25-4ubuntu1) ... Setting up libnpth0:amd64 (1.5-3) ... Setting up python-pip-whl (9.0.1-2.3~ubuntu1.18.04.1) ... Setting up python3-cffi-backend (1.11.5-1) ... Setting up python3-crypto (2.6.1-8ubuntu2) ... Setting up libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.3) ... No schema files found: doing nothing. Setting up python3-idna (2.6-1) ... Setting up python3-xdg (0.25-4ubuntu1) ... Setting up python3-six (1.11.0-2) ... Setting up libksba8:amd64 (1.3.5-2) ... Setting up python3-wheel (0.30.0-0.2) ... Setting up perl-modules-5.26 (5.26.1-6ubuntu0.3) ... Setting up python3-pkg-resources (39.0.1-2) ... Setting up libgdbm5:amd64 (1.14.1-6) ... Setting up libgirepository-1.0-1:amd64 (1.56.1-1) ... Setting up gnupg-l10n (2.2.4-1ubuntu1.2) ... Setting up libstdc++-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ... Setting up python3-asn1crypto (0.24.0-1) ... Setting up gir1.2-glib-2.0:amd64 (1.56.1-1) ... Setting up patch (2.7.6-2ubuntu1) ... Setting up libglib2.0-data (2.56.4-0ubuntu0.18.04.3) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up libapparmor1:amd64 (2.12-4ubuntu5.1) ... Setting up libfakeroot:amd64 (1.22-2ubuntu1) ... Setting up liblocale-gettext-perl (1.07-3build2) ... Setting up libexpat1-dev:amd64 (2.2.5-3) ... Setting up shared-mime-info (1.9-2) ... Setting up libgdbm-compat4:amd64 (1.14.1-6) ... Setting up python3-lib2to3 (3.6.8-1~18.04) ... Setting up libassuan0:amd64 (2.5.1-2) ... Setting up xdg-user-dirs (0.17-1ubuntu1) ... Setting up python3-distutils (3.6.8-1~18.04) ... Setting up libdbus-1-3:amd64 (1.12.2-1ubuntu1.1) ... Setting up libpython3.6:amd64 (3.6.8-1~18.04.1) ... Setting up netbase (5.4) ... Setting up python3-cryptography (2.1.4-1ubuntu1.3) ... Setting up python3-dbus (1.2.6-1) ... Setting up g++-7 (7.4.0-1ubuntu1~18.04.1) ... Setting up gpgconf (2.2.4-1ubuntu1.2) ... Setting up python3-keyrings.alt (3.0-1) ... Setting up python3-gi (3.26.1-2ubuntu1) ... Setting up fakeroot (1.22-2ubuntu1) ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode update-alternatives: warning: skip creation of /usr/share/man/man1/fakeroot.1.gz because associated file /usr/share/man/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/faked.1.gz because associated file /usr/share/man/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/es/man1/fakeroot.1.gz because associated file /usr/share/man/es/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/es/man1/faked.1.gz because associated file /usr/share/man/es/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/fr/man1/fakeroot.1.gz because associated file /usr/share/man/fr/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/fr/man1/faked.1.gz because associated file /usr/share/man/fr/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/sv/man1/fakeroot.1.gz because associated file /usr/share/man/sv/man1/fakeroot-sysv.1.gz (of link group fakeroot) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/sv/man1/faked.1.gz because associated file /usr/share/man/sv/man1/faked-sysv.1.gz (of link group fakeroot) doesn't exist Setting up libpython3.6-dev:amd64 (3.6.8-1~18.04.1) ... Setting up libperl5.26:amd64 (5.26.1-6ubuntu0.3) ... Setting up gpgsm (2.2.4-1ubuntu1.2) ... Setting up python3-pip (9.0.1-2.3~ubuntu1.18.04.1) ... Setting up gnupg-utils (2.2.4-1ubuntu1.2) ... Setting up g++ (4:7.4.0-1ubuntu2.3) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode update-alternatives: warning: skip creation of /usr/share/man/man1/c++.1.gz because associated file /usr/share/man/man1/g++.1.gz (of link group c++) doesn't exist Setting up pinentry-curses (1.1.0-1) ... Setting up dbus (1.12.2-1ubuntu1.1) ... Setting up python3-setuptools (39.0.1-2) ... Setting up python3.6-dev (3.6.8-1~18.04.1) ... Setting up python3-secretstorage (2.3.1-2) ... Setting up dirmngr (2.2.4-1ubuntu1.2) ... Setting up dh-python (3.20180325ubuntu2) ... Setting up gpg (2.2.4-1ubuntu1.2) ... Setting up libpython3-dev:amd64 (3.6.7-1~18.04) ... Setting up python3-keyring (10.6.0-1) ... Setting up gpg-agent (2.2.4-1ubuntu1.2) ... Setting up python3-dev (3.6.7-1~18.04) ... Setting up gpg-wks-server (2.2.4-1ubuntu1.2) ... Setting up gpg-wks-client (2.2.4-1ubuntu1.2) ... Setting up perl (5.26.1-6ubuntu0.3) ... Setting up libfile-fcntllock-perl (0.22-3build2) ... Setting up libalgorithm-diff-perl (1.19.03-1) ... Setting up gnupg (2.2.4-1ubuntu1.2) ... Setting up libdpkg-perl (1.19.0.5ubuntu2.1) ... Setting up libalgorithm-merge-perl (0.08-3) ... Setting up dpkg-dev (1.19.0.5ubuntu2.1) ... Setting up libalgorithm-diff-xs-perl (0.04-5) ... Setting up build-essential (12.4ubuntu1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... root@02b32b9272ce:/# pip install numpy openjij bash: pip: command not found root@02b32b9272ce:/# pip3 install numpy openjij Collecting numpy Downloading https://files.pythonhosted.org/packages/87/2d/e4656149cbadd3a8a0369fcd1a9c7d61cc7b87b3903b85389c70c989a696/numpy-1.16.4-cp36-cp36m-manylinux1_x86_64.whl (17.3MB) 100% |################################| 17.3MB 90kB/s Collecting openjij Downloading https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz (80kB) 100% |################################| 81kB 4.4MB/s Collecting requests (from openjij) Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB) 100% |################################| 61kB 4.7MB/s Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->openjij) Downloading https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl (150kB) 100% |################################| 153kB 8.2MB/s Collecting chardet<3.1.0,>=3.0.2 (from requests->openjij) Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB) 100% |################################| 143kB 3.9MB/s Collecting certifi>=2017.4.17 (from requests->openjij) Downloading https://files.pythonhosted.org/packages/69/1b/b853c7a9d4f6a6d00749e94eb6f3a041e342a885b87340b79c1ef73e3a78/certifi-2019.6.16-py2.py3-none-any.whl (157kB) 100% |################################| 163kB 8.2MB/s Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests->openjij) Building wheels for collected packages: openjij Running setup.py bdist_wheel for openjij ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yn5j75hx/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpgiwgl9yypip-wheel- --python-tag cp36: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.6/openjij creating build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.6/openjij/model creating build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.6/openjij/sampler running build_ext <__main__.CMakeExtension('cxxjij') at 0x7f94c27fd400> cxxjij CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.11 or higher is required. You are running version 3.10.2 -- Configuring incomplete, errors occurred! Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 126, in <module> zip_safe=False File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 42, in run self.build_extension(ext) File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 69, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_kwargs, cwd=self.build_temp, env=env) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-yn5j75hx/openjij', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-yn5j75hx/openjij/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Failed building wheel for openjij Running setup.py clean for openjij Failed to build openjij Installing collected packages: numpy, urllib3, chardet, certifi, requests, openjij Running setup.py install for openjij ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yn5j75hx/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jop77n9c-record/install-record.txt --single-version-externally-managed --compile: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.6/openjij creating build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.6/openjij/model creating build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.6/openjij/sampler running build_ext <__main__.CMakeExtension('cxxjij') at 0x7f69320b9898> cxxjij CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.11 or higher is required. You are running version 3.10.2 -- Configuring incomplete, errors occurred! Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 126, in <module> zip_safe=False File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 42, in run self.build_extension(ext) File "/tmp/pip-build-yn5j75hx/openjij/setup.py", line 69, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_kwargs, cwd=self.build_temp, env=env) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-yn5j75hx/openjij', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-yn5j75hx/openjij/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yn5j75hx/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jop77n9c-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-yn5j75hx/openjij/CMake 3.11 or higher is required. You are running version 3.10.2
cmake 3.14を入れてみた。
# pip3 install openjij Collecting openjij Using cached https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from openjij) Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from openjij) Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests->openjij) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Building wheels for collected packages: openjij Running setup.py bdist_wheel for openjij ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-48h2_juh/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpajpqijjspip-wheel- --python-tag cp36: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.6/openjij creating build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.6/openjij/model creating build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.6/openjij/sampler running build_ext <__main__.CMakeExtension('cxxjij') at 0x7f514ecb28d0> cxxjij -- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is GNU 7.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Fetch googletest for C++ testing CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/ExternalProject.cmake:2427 (message): error: could not find git for clone of googletest-populate Call Stack (most recent call first): /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/ExternalProject.cmake:3211 (_ep_add_download_command) CMakeLists.txt:13 (ExternalProject_Add) -- Configuring incomplete, errors occurred! See also "/tmp/pip-build-48h2_juh/openjij/build/temp.linux-x86_64-3.6/_deps/googletest-subbuild/CMakeFiles/CMakeOutput.log". CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FetchContent.cmake:903 (message): CMake step for googletest failed: 1 Call Stack (most recent call first): /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate) CMakeLists.txt:21 (FetchContent_Populate) -- Configuring incomplete, errors occurred! See also "/tmp/pip-build-48h2_juh/openjij/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 126, in <module> zip_safe=False File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 42, in run self.build_extension(ext) File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 69, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_kwargs, cwd=self.build_temp, env=env) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-48h2_juh/openjij', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-48h2_juh/openjij/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Failed building wheel for openjij Running setup.py clean for openjij Failed to build openjij Installing collected packages: openjij Running setup.py install for openjij ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-48h2_juh/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-vichorhz-record/install-record.txt --single-version-externally-managed --compile: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.6/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.6/openjij creating build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.6/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.6/openjij/model creating build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.6/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.6/openjij/sampler running build_ext <__main__.CMakeExtension('cxxjij') at 0x7fa61d106898> cxxjij -- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is GNU 7.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Fetch googletest for C++ testing CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/ExternalProject.cmake:2427 (message): error: could not find git for clone of googletest-populate Call Stack (most recent call first): /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/ExternalProject.cmake:3211 (_ep_add_download_command) CMakeLists.txt:13 (ExternalProject_Add) -- Configuring incomplete, errors occurred! See also "/tmp/pip-build-48h2_juh/openjij/build/temp.linux-x86_64-3.6/_deps/googletest-subbuild/CMakeFiles/CMakeOutput.log". CMake Error at /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FetchContent.cmake:903 (message): CMake step for googletest failed: 1 Call Stack (most recent call first): /opt/cmake-3.14.5-Linux-x86_64/share/cmake-3.14/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate) CMakeLists.txt:21 (FetchContent_Populate) -- Configuring incomplete, errors occurred! See also "/tmp/pip-build-48h2_juh/openjij/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 126, in <module> zip_safe=False File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run self.run_command('build') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 42, in run self.build_extension(ext) File "/tmp/pip-build-48h2_juh/openjij/setup.py", line 69, in build_extension subprocess.check_call(['cmake', ext.sourcedir] + cmake_kwargs, cwd=self.build_temp, env=env) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-build-48h2_juh/openjij', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-48h2_juh/openjij/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-48h2_juh/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-vichorhz-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-48h2_juh/openjij/git がないらしい。
# apt install git Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: cmake-data libarchive13 libcurl4 libjsoncpp1 liblzo2-2 librhash0 libuv1 Use 'apt autoremove' to remove them. The following additional packages will be installed: git-man less libbsd0 libcurl3-gnutls libedit2 liberror-perl libssl1.0.0 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 openssh-client xauth Suggested packages: gettext-base git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn keychain libpam-ssh monkeysphere ssh-askpass The following NEW packages will be installed: git git-man less libbsd0 libcurl3-gnutls libedit2 liberror-perl libssl1.0.0 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 openssh-client xauth 0 upgraded, 17 newly installed, 0 to remove and 0 not upgraded. Need to get 7688 kB of archives. After this operation, 46.3 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxau6 amd64 1:1.0.8-1 [8376 B] Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libbsd0 amd64 0.8.7-1 [41.5 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxdmcp6 amd64 1:1.1.2-3 [10.7 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxcb1 amd64 1.13-2~ubuntu18.04 [45.5 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libx11-data all 2:1.6.4-3ubuntu0.2 [113 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libx11-6 amd64 2:1.6.4-3ubuntu0.2 [569 kB] Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxext6 amd64 2:1.3.3-1 [29.4 kB] Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 less amd64 487-0.1 [112 kB] Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 libedit2 amd64 3.1-20170329-1 [76.9 kB] Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl1.0.0 amd64 1.0.2n-1ubuntu5.3 [1088 kB] Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 libxmuu1 amd64 2:1.1.2-2 [9674 B] Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssh-client amd64 1:7.6p1-4ubuntu0.3 [614 kB] Get:13 http://archive.ubuntu.com/ubuntu bionic/main amd64 xauth amd64 1:1.0.10-1 [24.6 kB] Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl3-gnutls amd64 7.58.0-2ubuntu3.7 [212 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic/main amd64 liberror-perl all 0.17025-1 [22.8 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 git-man all 1:2.17.1-1ubuntu0.4 [803 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 git amd64 1:2.17.1-1ubuntu0.4 [3907 kB] Fetched 7688 kB in 4s (2069 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libxau6:amd64. (Reading database ... 17340 files and directories currently installed.) Preparing to unpack .../00-libxau6_1%3a1.0.8-1_amd64.deb ... Unpacking libxau6:amd64 (1:1.0.8-1) ... Selecting previously unselected package libbsd0:amd64. Preparing to unpack .../01-libbsd0_0.8.7-1_amd64.deb ... Unpacking libbsd0:amd64 (0.8.7-1) ... Selecting previously unselected package libxdmcp6:amd64. Preparing to unpack .../02-libxdmcp6_1%3a1.1.2-3_amd64.deb ... Unpacking libxdmcp6:amd64 (1:1.1.2-3) ... Selecting previously unselected package libxcb1:amd64. Preparing to unpack .../03-libxcb1_1.13-2~ubuntu18.04_amd64.deb ... Unpacking libxcb1:amd64 (1.13-2~ubuntu18.04) ... Selecting previously unselected package libx11-data. Preparing to unpack .../04-libx11-data_2%3a1.6.4-3ubuntu0.2_all.deb ... Unpacking libx11-data (2:1.6.4-3ubuntu0.2) ... Selecting previously unselected package libx11-6:amd64. Preparing to unpack .../05-libx11-6_2%3a1.6.4-3ubuntu0.2_amd64.deb ... Unpacking libx11-6:amd64 (2:1.6.4-3ubuntu0.2) ... Selecting previously unselected package libxext6:amd64. Preparing to unpack .../06-libxext6_2%3a1.3.3-1_amd64.deb ... Unpacking libxext6:amd64 (2:1.3.3-1) ... Selecting previously unselected package less. Preparing to unpack .../07-less_487-0.1_amd64.deb ... Unpacking less (487-0.1) ... Selecting previously unselected package libedit2:amd64. Preparing to unpack .../08-libedit2_3.1-20170329-1_amd64.deb ... Unpacking libedit2:amd64 (3.1-20170329-1) ... Selecting previously unselected package libssl1.0.0:amd64. Preparing to unpack .../09-libssl1.0.0_1.0.2n-1ubuntu5.3_amd64.deb ... Unpacking libssl1.0.0:amd64 (1.0.2n-1ubuntu5.3) ... Selecting previously unselected package libxmuu1:amd64. Preparing to unpack .../10-libxmuu1_2%3a1.1.2-2_amd64.deb ... Unpacking libxmuu1:amd64 (2:1.1.2-2) ... Selecting previously unselected package openssh-client. Preparing to unpack .../11-openssh-client_1%3a7.6p1-4ubuntu0.3_amd64.deb ... Unpacking openssh-client (1:7.6p1-4ubuntu0.3) ... Selecting previously unselected package xauth. Preparing to unpack .../12-xauth_1%3a1.0.10-1_amd64.deb ... Unpacking xauth (1:1.0.10-1) ... Selecting previously unselected package libcurl3-gnutls:amd64. Preparing to unpack .../13-libcurl3-gnutls_7.58.0-2ubuntu3.7_amd64.deb ... Unpacking libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.7) ... Selecting previously unselected package liberror-perl. Preparing to unpack .../14-liberror-perl_0.17025-1_all.deb ... Unpacking liberror-perl (0.17025-1) ... Selecting previously unselected package git-man. Preparing to unpack .../15-git-man_1%3a2.17.1-1ubuntu0.4_all.deb ... Unpacking git-man (1:2.17.1-1ubuntu0.4) ... Selecting previously unselected package git. Preparing to unpack .../16-git_1%3a2.17.1-1ubuntu0.4_amd64.deb ... Unpacking git (1:2.17.1-1ubuntu0.4) ... Setting up libedit2:amd64 (3.1-20170329-1) ... Setting up git-man (1:2.17.1-1ubuntu0.4) ... Setting up less (487-0.1) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Setting up libssl1.0.0:amd64 (1.0.2n-1ubuntu5.3) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Processing triggers for mime-support (3.60ubuntu1) ... Setting up liberror-perl (0.17025-1) ... Setting up libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.7) ... Setting up libbsd0:amd64 (0.8.7-1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up libxdmcp6:amd64 (1:1.1.2-3) ... Setting up openssh-client (1:7.6p1-4ubuntu0.3) ... Setting up git (1:2.17.1-1ubuntu0.4) ... Setting up libx11-data (2:1.6.4-3ubuntu0.2) ... Setting up libxau6:amd64 (1:1.0.8-1) ... Setting up libxcb1:amd64 (1.13-2~ubuntu18.04) ... Setting up libx11-6:amd64 (2:1.6.4-3ubuntu0.2) ... Setting up libxmuu1:amd64 (2:1.1.2-2) ... Setting up libxext6:amd64 (2:1.3.3-1) ... Setting up xauth (1:1.0.10-1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ...そして
root@02b32b9272ce:/# pip3 install openjij Collecting openjij Using cached https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from openjij) Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from openjij) Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests->openjij) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->openjij) Building wheels for collected packages: openjij Running setup.py bdist_wheel for openjij ... done Stored in directory: /root/.cache/pip/wheels/bf/8d/f6/04623fb4b2e90c961fc7b531fb6ab26825b3bef6ae1ef350e6 Successfully built openjij Installing collected packages: openjij Successfully installed openjij-0.0.7ということは、
git
CMake 3.11 or higher is required.
python3
pip
numpyが必要だということ。
dockerでは
apt update, apt -y upgrade
apt -y vim wget
していること。では、1からやってみる。
その前に動くかためしてみた。
OpenJij チュートリアル
https://openjij.github.io/OpenJijTutorial/_build/html/ja/index.htmlising.pyimport openjij as oj #https://openjij.github.io/OpenJijTutorial/_build/html/ja/index.html # 問題を表す縦磁場と相互作用を作ります。OpenJijでは辞書型で問題を受け付けます。 N = 5 h = {i: -1 for i in range(N)} J = {(i, j): -1 for i in range(N) for j in range(i+1, N)} print('h_i: ', h) print('Jij: ', J)実行してみる。
# pip3 show openjij Name: openjij Version: 0.0.7 Summary: Framework for the Ising model and QUBO Home-page: https://openjij.github.io/OpenJij/ Author: Jij Inc. Author-email: openjij@j-ij.com License: Apache License 2.0 Location: /usr/local/lib/python3.6/dist-packages Requires: numpy, requests root@02b32b9272ce:/# pip install requests bash: pip: command not found root@02b32b9272ce:/# pip3 install requests Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests) root@02b32b9272ce:/# apt install vim Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: cmake-data libarchive13 libcurl4 libjsoncpp1 liblzo2-2 librhash0 libuv1 Use 'apt autoremove' to remove them. The following additional packages will be installed: libgpm2 vim-common vim-runtime xxd Suggested packages: gpm ctags vim-doc vim-scripts The following NEW packages will be installed: libgpm2 vim vim-common vim-runtime xxd 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 6721 kB of archives. After this operation, 32.6 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 xxd amd64 2:8.0.1453-1ubuntu1.1 [49.2 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 vim-common all 2:8.0.1453-1ubuntu1.1 [70.4 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgpm2 amd64 1.20.7-5 [15.1 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 vim-runtime all 2:8.0.1453-1ubuntu1.1 [5435 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 vim amd64 2:8.0.1453-1ubuntu1.1 [1152 kB] Fetched 6721 kB in 5s (1474 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package xxd. (Reading database ... 18648 files and directories currently installed.) Preparing to unpack .../xxd_2%3a8.0.1453-1ubuntu1.1_amd64.deb ... Unpacking xxd (2:8.0.1453-1ubuntu1.1) ... Selecting previously unselected package vim-common. Preparing to unpack .../vim-common_2%3a8.0.1453-1ubuntu1.1_all.deb ... Unpacking vim-common (2:8.0.1453-1ubuntu1.1) ... Selecting previously unselected package libgpm2:amd64. Preparing to unpack .../libgpm2_1.20.7-5_amd64.deb ... Unpacking libgpm2:amd64 (1.20.7-5) ... Selecting previously unselected package vim-runtime. Preparing to unpack .../vim-runtime_2%3a8.0.1453-1ubuntu1.1_all.deb ... Adding 'diversion of /usr/share/vim/vim80/doc/help.txt to /usr/share/vim/vim80/doc/help.txt.vim-tiny by vim-runtime' Adding 'diversion of /usr/share/vim/vim80/doc/tags to /usr/share/vim/vim80/doc/tags.vim-tiny by vim-runtime' Unpacking vim-runtime (2:8.0.1453-1ubuntu1.1) ... Selecting previously unselected package vim. Preparing to unpack .../vim_2%3a8.0.1453-1ubuntu1.1_amd64.deb ... Unpacking vim (2:8.0.1453-1ubuntu1.1) ... Processing triggers for mime-support (3.60ubuntu1) ... Setting up xxd (2:8.0.1453-1ubuntu1.1) ... Setting up libgpm2:amd64 (1.20.7-5) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up vim-common (2:8.0.1453-1ubuntu1.1) ... Setting up vim-runtime (2:8.0.1453-1ubuntu1.1) ... Setting up vim (2:8.0.1453-1ubuntu1.1) ... update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/vi.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/vi.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/vi.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/vi.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/vi.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/vi.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/view.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/view.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/view.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/view.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/view.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/view.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/ex.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/ex.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/ex.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/ex.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/ex.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/ex.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/editor.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/editor.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/editor.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/editor.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/editor.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/editor.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group editor) doesn't exist root@02b32b9272ce:/# vim ijing.py root@02b32b9272ce:/# python ijing.py bash: python: command not found root@02b32b9272ce:/# python3 ijing.py h_i: {0: -1, 1: -1, 2: -1, 3: -1, 4: -1} Jij: {(0, 1): -1, (0, 2): -1, (0, 3): -1, (0, 4): -1, (1, 2): -1, (1, 3): -1, (1, 4): -1, (2, 3): -1, (2, 4): -1, (3, 4): -1}同じ結果が出た。OK。docker hubに保存(別のmac OSのshellで)
macOS$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 02b32b9272ce ubuntu "/bin/bash" 2 hours ago Up 2 hours vigilant_blackburn OgawaKiyoshi-no-MacBook-Pro:~ ogawakiyoshi$ docker commit 02b32b9272ce kaizenjapan/ubuntu-openjij sha256:a23f69a126e9a37ab1b4c1454013b2b23b41f9725cc6dc4189dc8de7f8f31e07 OgawaKiyoshi-no-MacBook-Pro:~ ogawakiyoshi$ docker push kaizenjapan/ubuntu-openjij The push refers to repository [docker.io/kaizenjapan/ubuntu-openjij] 991134ca95c9: Pushed 8d267010480f: Mounted from kaizenjapan/haskell 270f934787ed: Mounted from kaizenjapan/haskell 02571d034293: Mounted from kaizenjapan/haskell latest: digest: sha256:bd291395e3725727b8398a1c70c28a83a1da102ee191a3359399abaf4aaabeed size: 1156利用する場合は、
$ docker run -it kaizejnapan/ubuntu-openjij /bin/bash文書履歴(document history)
ver. 0.01 初稿 20190625 午後
ver. 0.02 install 加筆 20190625 夕
ver. 0.03 docker hub 20190625 夜
- 投稿日:2019-06-25T19:56:15+09:00
Python 環境構築いろいろ - Linux
Python の環境構築についての記事は Qiita でも非常に多く今更とは思うのですが、Python を本格的に使い始めて2年間、いろいろと試行錯誤しましたので、この機会に纏めてみました。「決定版」と書いてある記事が結構多いのですが、現実に使われているものにはそれぞれに存在価値があると思うし、ベストプラクティスはどういう使い方をするかによって変わってくるものだと思うので、Python Developers Survey の調査結果を参照しながら書いてみました。なお、Python Developers Survey 2018 の結果は概要しか公表されていないので、詳細なデータは Python Developers Survey 2017 の調査結果の方から引用しています。また、以下ではこれらを単に「調査結果」と省略して記載しています。
"vanilla" Python vs Anaconda
Pythonの開発環境につては、調査結果では、70%の開発者が、Python.org 及び APTやHomebrew 等の OS が提供するパッケージの Python(いわゆる"Vanilla" Python)を利用しています。
Anacondaを利用している開発者は15%ですが、そのメリットは、自ら "The most popular Python data science distribution" と名乗っているように、データサイエンス向けに最適化されていることです。もし、Python でしたいことが、データー分析、機械学習が中心であれば、いい選択肢になると思います。
出典 Python Developers Survey 2017 Results Python Installation and Upgrade下の図はPythonを使って何をしているかのデータですが、予想どおりデータ分析がトップで52%となっています。
出典 The State of Developer Ecosystem Survey in 2018次の図がどのフレームワークを使用しているかというデータですが、Numpy / matplotlib / SciPy / Pandas 等の科学技術計算用のライブラリーが 47% でトップになっています。次いで、Django, Flask という Web 用のフレームワークが 39% となっています。Anaconda は、25% の開発者が使用しており、Numpy / matplotlib / SciPy / Pandas 等の科学技術計算用のライブラリーを使っている人の半分が使っているという計算になると思います。
出典 The State of Developer Ecosystem Survey in 2018どちらを選択するかは、例えていえば定食が好みであればAnacondaを使えばいいし、一品料理を自分でセットするのが好みであれば"Vanilla" Python を使えばいいということになるのではないでしょうか。
日本で pyenv を使っている人が多い理由
調査結果では、環境構築に pyenv を使っている人は 6% ですが、日本では pyenv を使っている人がそれよりも随分多いように思います。自分で pyenv を使ってみて便利だと思ったのは、CPythonを始めとして、Anaconda、pypy, stackless 等各種のPython処理系のあらゆるバージョンを簡単にインストールできることです。この機能が必要な人といえば、受託でプログラミングをしている人が一番に考えられます。受託の場合は、発注先の仕様でどのPythonのどのバージョンのものを使用するか決まっているので、それに合わせて環境を作る必要があるためです。日本はプログラムの受託開発が多い国なので、そういうことだなと思っています。
pyenv の欠点といえば、Pythonの一般的な使い方では必要がないということです。それで、自分はすぐに削除しました。
例えば、Numpy等を使ってデータ分析の仕事をしている人が、Pythonのバージョンを頻繁に変更することはあるでしょうか。新しいバージョンが出たら適当な時期にアップデートするだけでしょう。Pythonのマイナーバージョンの更新は 1 年半毎なので、 1 年半に 1 回だけ新しいバージョンのものを新規でインストールし、古いバージョンのPythonは不要になるまで置いておくのが普通だと思います。
"vanilla" Python の場合には、マイクロバージョンだけが違う場合はアップデートされ、マイナーバージョンが違う場合は新規にインストールされます。マイクロレベルだと完全に後方互換性があるので、一般的にはアップデートで問題は生じないようになっています。なお、Python のバージョン番号の仕組みは、一般 Python FAQ で次のように記載されています。
Python のバージョン番号は A.B.C や A.B のように付けられています。 A はメジャーバージョン番号で、言語の本当に重要な変更の時のみ上げられます。 B はマイナーバージョン番号で、そこまでは大きくない変更の時に上げられます。 C はマイクロレベルで、バグフィックスリリースの度に上げられます。
そのため、新しくPythonを始めるのであれば、最新版だけインストールすればよく、継続して開発・運用しているのであれば、必要なマイナーバージョンのPythonをインストールしておくば済みます。マイナーバージョンのサポート期間はリリース後5年間で、現在サポートされているバージョンは、2.7, 3.4, 3.5, 3.6, 3.7 ですが、3.4は、2019年3月16日にサポート期限がきます。また、2.7は、2010年にリーリースされ、それから非常に長い間使われてきましたが、2020年1月1日にとうとうサポートが終了します(PEP 373 -- Python 2.7 Release Schedule)。
Windows vs Linux vs Mac
調査結果では、Windows PC を使っている人が49%と一番多いです。ただし、linuxのマーケットシェアは、NET MARKET SHARE、Statcounterによると 2% 以下なので、それと比べると開発者には linux を使って人が断然多いです。
出典 Python Developers Survey 2017 Results Operating Systems自分も最初は Windows で Python を使っていましたが、特に問題になることはなかったです。ただし、Linux と違ってコマンドラインで使うのが遣りづらいので PyCharm に頼っていた所があったように思います。
Python には、OpenPyXL のように Excel を扱えるライブラリーもあるので、Python で会社の業務データの分析をしている人も多いと思いますが、そういう人の多くは Windows PC を使っていると思います。
どの OS を使うかは、結局は自分の置かれた環境に合わせざるを得ないものだと思います。かっては、Windows で Python が使いづらい時代もあったのは事実ですが、既に大きな問題は改善されて、残っているのは、それぞれの文化の問題なので使い方を工夫すればいいだけのことです。
Linux を使う場合
Linux を使う場合の注意点を少し、自分が使っている Ubuntu を例にして書きます。
Ubuntu-18.04 が今年の4月にリリースされましたが、Pythonは、2.7, 3.6, 3.7 のパッケージが用意されています。通常の利用であれば、この3つのバージョンがあれば十分だと思います。また、Python3.6 は既にインストールされているので、'python3' とコマンドをたたけば直ぐに利用することができます。
Linux の場合は、システムにインストールされている Python は、システムで使われているので、それにパッケージを追加する場合は、'sudo apt install' を使うのが基本になります。勝手に 'sudo pip3 install' でインストールすると、システムの Python を使っているアプリケーションが動作しなくなる可能性があります。システムが用意しているパッケージはバージョンが古いものが多いので、仮想環境を作成して、そこに自分で 'pip3 install' で使用するパッケージをインストールして使うといいです。
C/C++コンパイラーをインストールする
build-essentialパッケージを使って基本的な開発ツールをインストールしておきます。なお、
python3-pip
パッケージをインストールすると Python の開発に必要なツール一式がインストールされるのでそれでも対応できます。Linux の場合は、ソースをコンパイルしてからインストールしないといけない場合でも、共有ライブラリの管理方法が決まっているので、比較的容易です。sudo apt update sudo apt install build-essentialPython 等のインストール
既定の状態では、python3.7 仮想環境を作成する venv はインストールされていないので、次のようにして必要なものをインストールします。
sudo apt install python3-venv # Python3.6用の venv のインストール sudo apt install python3.7 python3.7-venv # Python3.7及びそれ用の venv のインストールパッケージに存在しないバージョンの Python が必要な場合は、python.org から Linux 用のソースコードをダウンロードして、自分でコンパイルしてインストールします。'build-essential' が既にインストール済みであれば、Python3.5 の場合は以下でインストールできます。少し慣れると簡単インストールできます。
# 必要な開発用のライブラリーをインストール sudo apt install libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev libgdbm-dev libbz2-dev liblzma-dev zlib1g-dev uuid-dev libffi-dev libdb-dev # GUIを使用する場合は、'tkinter' が動作するように追加 sudo apt install tk-dev wget https://www.python.org/ftp/python/3.5.6/Python-3.5.6.tar.xz tar -xf Python-3.5.6.tar.xz cd Python-3.5.6/ ./configure make -s sudo make altinstallPython各バージョンは次のコマンドで実行できます。単に
python
とすると python2.7 の方が起動するので Python3 を使いたい場合はpython3
とする必要があります。python # デフォルトの python で python2.7 python2 # デフォルトの python2 で python2.7 python2.7 # python2.7 python3 # デフォルトの python3 で python3.6 python3.6 # python3.6 python3.7 # python3.7仮想環境の利用
仮想環境を作成するには、venv モジュールを使います。
python3 -m venv
のように仮想環境を動かす Python インタープリタを指定するので、Python インタープリタを取り違えることが少なくなります。例えば、'.venv' とい名前の仮想環境をカレントディレクトリーに作成するのであれば以下のようにします。niji@first:~$ python3 -m venv .venvpython2 の場合は、
venv
ではなくてvirtualenv
を使いますが、venv は、 virtualenv が標準モジュールとして組みこまれたもので、機能としては同じものです。niji@first:~$ python -m virtualenv .venv仮想環境を使用するためには有効化が必要です。有効化等は、次のようなコマンドでおこないます。
niji@first:~$ source .venv/bin/activate # 仮想環境の有効化 (.venv) niji@first:~$ deactivate # 仮想環境の停止 niji@first:~$ . .venv/bin/activate # source の代わりに '.' が使用できる一般的には仮想環境はプロジェクト単位で作成しますが、Linux の場合であれば、自分が普段使用するパッケージをインストールした仮想環境を作成しておくと便利です。自分の場合は、.pyenv をもじった .pyenvs というフォルダーを作成して、そこにその仮想環境や仮想環境の作成に関するメモをまとめてあります。そしてgitで管理しています。そのような仮想環境の作り方を簡単に説明しておきます。
まず、普段使用するパッケージのリストで、'requirements.txt' を作成します。普通 'requirements.txt' にはバージョンを指定しますが、この場合は、最新のパッケージがインストールされればいいので単に次のように名前だけのリストで問題ありません。
numpy pandas scipy matplotlib scikit-learn jupyter jupyterlabそうしておけば、
niji@ubuntu-pc:~$ python3 -m venv .pyenvs/.myenv3.6 niji@ubuntu-pc:~$ . .pyenvs/.myenv3.6/bin/activate (.myenv3.6) niji@ubuntu-pc:~$ pip install -r .pyenvs/requirements.txtこのままだと、毎回
.pyenvs/.myenv3.6/bin/python
と入力しないと起動できず不便なので、エイリアスを使います。'.bashrc' ファイルに以下を追加します。alias mypy3='$HOME/.pyenvs/.myenv3.6/bin/python3'
mypy3
とコマンドを入力するだけで、自分が普段使用するパッケージがインストールされたPythonを起動することができます。niji@ubuntu-pc:~$ mypy3 Python 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>ついでに jupyterlab を起動するエイリアスを次のように追加しておくと
mylab
とコマンドを打つだけで jupyterlab が起動するようになるので便利です。alias mylab='$HOME/.pyenvs/.myenv3.6/bin/python3 -m jupyterlab'作成した仮想環境を削除するには、そのフォルダを削除するだけです。
Anaconda のインストール
Ubuntuの場合は、"vanilla" Python を使っても困ることはないので、Anacondaを使う理由は少ないとは思いますが、Intel MKL とそれでコンパイルされた Numpy が使えるので、データサイエンスや機械学習に集中したい人にはいい選択肢だと思います。
AnacondaのことをPATHを上書きしてOSのライブラリーを勝手に取り替える凶悪仕様といっていた人もいますが、もう、Linux版のAnacondaでは、'anaconda/bin' ディレクトリーを PATH に追加しなくなっています。以下で、Anaconda、Miniconda のインストール及び環境構築を順番にみていきますが、問題になるところはないと思います。
インストールは、次のコマンドでできます。Anacondaの方は、https://repo.anaconda.com/archive/ にダウンロードの一覧があるので、適当なものを選択しますが、基本的には最新のものをインストールすれば、後でPythonのバージョンは変更できます。
# Anaconda の場合 wget https://repo.anaconda.com/archive/Anaconda3-5.x.x-Linux-x86_64.sh bash Anaconda3-5.x.x-Linux-x86_64.sh # Miniconda の場合 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.shインストールの途中で、次のようなメッセージが表示されるので、インストールの場所を指定することが可能です。インストールの場所を変えることにより、Anaconda、Miniconda は、一つのマシンにいくらでもインストールすることが可能です。
Anaconda3 will now be installed into this location: /home/niji/anaconda3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below [/home/niji/anaconda3] >>>その後で
.bashrc
にPATHを設定するかどうか聞いてくるので'no'にするようにします。# Anaconda の場合 Do you wish the installer to initialize Anaconda3 in your /home/niji/.bashrc ? [yes|no] # Miniconda の場合 Do you wish the installer to prepend the Miniconda3 install location to PATH in your /home/niji/.bashrc ? [yes|no]よくみると、Anaconda の方は、Linux版では、
.bashrc
で Anacondaの/binにPATHを設定するのを止めて、以下のコードが.bashrc
に追加されるので、conda コマンドだけを有効するようになっています。# added by Anaconda3 5.3.1 installer # >>> conda init >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$(CONDA_REPORT_ERRORS=false '/home/niji/anaconda3/bin/conda' shell.bash hook 2> /dev/null)" if [ $? -eq 0 ]; then \eval "$__conda_setup" else if [ -f "/home/niji/anaconda3/etc/profile.d/conda.sh" ]; then . "/home/niji/anaconda3/etc/profile.d/conda.sh" CONDA_CHANGEPS1=false conda activate base else \export PATH="/home/niji/anaconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda init <<<実際は、
conda.sh
の方も必ずしも使う必要はありません。venv
の場合と同じように以下のようにして環境の有効化やPythonの起動が可能です。source ~/anaconda3/bin/activate # Anacondaの環境の有効化 ~/anaconda3/bin/python3 # AnacondaのPythonを起動 source ~/miniconda3/bin/activate # Minicondaの環境の有効化 ~/miniconda3/bin/python3 # MinicondaのPythonを起動上のように毎回入力するのが面倒であれば、エイリアスを使えばいいだけのことです。
- 投稿日:2019-06-25T18:37:27+09:00
組み込みモジュール1-関数デコレータを定義
関数に適用することの出来る、デコレータという機能がある。
関数をラップすることで、関数の前後に処理を追加することが出来る。
それによって、入力値、計算結果へアクセスし、値を変更することが出来る。セマンティック強化、デバッグ、関数登録等を行うための強力なツールとなる。
デコレータ
ある関数をラップして、処理を改変したい場合には、デコレータ機能を利用する。
ラップする、デコレート関数を用意し、@を用いて関数に適用する。自作したデコレータ関数名を@で指定し、ラップしたい関数を引数として呼び出す事で、デコレータ機能が有効化される。
呼び出した関数を、目的にそって既述することによって、デコレートされた結果を出力することが出来る。
注意点
上記の実装だけでは、インストロペクションを行う処理を、正常に行えない。
解決する方法として、wrapsの利用が挙げられる。
適切にwrapsを実装すると、Python標準のインストロペクション機能を利用できるようになるので、忘れず適用したい。
- 投稿日:2019-06-25T18:32:12+09:00
Meshlab スクリプトによるメッシュフィルター操作を自動化する方法
はじめに
MeshLabにおいて、スクリプトで自動で操作をする記事です。例として、メッシュフィルター(quadric edge collapse decimation)を用いた、remeshingを行います。
作るもの
今回はこの操作をスクリプト(python)で行います。
対象読者
Meshlabの操作を自動化したい人
create python script
開発環境は、下記の通りです。
Ubuntu 16.04
python 3.6まずは、meshlabをインストールします。
$ sudo apt-get update $ sudo apt-get install meshlabmeshlabのスクリプトは、meshlabを実際に操作した際に保存されます。そのため、まずは上記gifと同じ操作をmeshlabで直接行います。
その後、メニュータブのFilters->Show current filter scriptを選択します。
そして、先ほど操作したフィルター名が表示されているのを確認して、Save Scriptでどこか適当な場所に保存します。
保存したmlxファイルを見ると、先ほどのフィルタのパラメータ等が記載されています。
temp.mxl<!DOCTYPE FilterScript> <FilterScript> <filter name="Quadric Edge Collapse Decimation"> <Param type="RichInt" value="100" name="TargetFaceNum"/> <Param type="RichFloat" value="0" name="TargetPerc"/> <Param type="RichFloat" value="0.3" name="QualityThr"/> <Param type="RichBool" value="false" name="PreserveBoundary"/> <Param type="RichFloat" value="1" name="BoundaryWeight"/> <Param type="RichBool" value="false" name="PreserveNormal"/> <Param type="RichBool" value="false" name="PreserveTopology"/> <Param type="RichBool" value="true" name="OptimalPlacement"/> <Param type="RichBool" value="false" name="PlanarQuadric"/> <Param type="RichBool" value="false" name="QualityWeight"/> <Param type="RichBool" value="true" name="AutoClean"/> <Param type="RichBool" value="false" name="Selected"/> </filter> </FilterScript>meshlabではmeshlabserverというコマンドでmeshlabを操作する。
このコマンドの引数で最低限使うのは、
-i [filename…] 開くパス+ファイル名
-o [filename…] 書き出すパス+ファイル名
-s filename 適用するスクリプトのパス+ファイル名
であり、コマンドプロンプトから下記のようなコマンドで実施できる。meshlabserver -i input.obj -o output.ply -s temp.mlx
なので、複数ファイルを実施する際には、これをpythonスクリプトでfor文等で実施する。
pythonスクリプトは https://gist.github.com/tylerlindell/7435ca2261e7c404ccc1241f18e483aa に先人が作成してくれているので、これを修正して使用してください。#!/usr/bin/env python import sys import os import subprocess # Script taken from doing the needed operation # (Filters > Remeshing, Simplification and Reconstruction > # Quadric Edge Collapse Decimation, with parameters: # 0.9 percentage reduction (10%), 0.3 Quality threshold (70%) # Target number of faces is ignored with those parameters # conserving face normals, planar simplification and # post-simplimfication cleaning) # And going to Filter > Show current filter script filter_script_mlx = """<!DOCTYPE FilterScript> <FilterScript> <filter name="Simplification: Quadric Edge Collapse Decimation (with texture)"> <Param type="RichInt" value="60000" name="TargetFaceNum"/> <Param type="RichFloat" value="0" name="TargetPerc"/> <Param type="RichFloat" value="1" name="QualityThr"/> <Param type="RichBool" value="true" name="PreserveBoundary"/> <Param type="RichFloat" value="1" name="BoundaryWeight"/> <Param type="RichBool" value="true" name="OptimalPlacement"/> <Param type="RichBool" value="true" name="PreserveNormal"/> <Param type="RichBool" value="true" name="PlanarSimplification"/> </filter> </FilterScript> """ cwd = os.getcwd() def create_tmp_filter_file(filename='filter_file_tmp.mlx'): with open(cwd + '\\tmp\\' + filename, 'w') as f: f.write(filter_script_mlx) return cwd + '\\tmp\\' + filename def reduce_faces(in_file, out_file, filter_script_path=create_tmp_filter_file()): # Add input mesh command = "meshlabserver -i " + in_file # Add the filter script command += " -s " + filter_script_path # Add the output filename and output flags command += " -o " + out_file # Execute command print("Going to execute: " + command) output = subprocess.call(command, shell=True) last_line = output print() print("Done:") print(in_file + " > " + out_file + ": " + str(last_line)) if __name__ == '__main__': if len(sys.argv) < 3: print("Usage:") print(sys.argv[0] + " /path/to/input_mesh num_iterations") print("For example, reduce 10 times:") print(sys.argv[0] + " /home/myuser/mymesh.dae 10") exit(0) in_mesh = sys.argv[1] filename = in_mesh.split('\\')[-1] num_iterations = int(sys.argv[2]) folder_name = filename.replace('.', '_') tmp_folder_name = cwd + '\\tmp\\' + folder_name + '_meshes\\' print("Input mesh: " + in_mesh + " (filename: " + filename + ")") print("Num iterations: " + str(num_iterations)) print("Output folder: " + tmp_folder_name) try: os.mkdir(tmp_folder_name) except OSError as e: print(sys.stderr, "Exception creating folder for meshes: " + str(e)) for it in range(num_iterations): if num_iterations == 1: out_mesh = tmp_folder_name + folder_name + "_it" + str(it) + ".obj" reduce_faces(in_mesh, out_mesh) else: out_mesh = tmp_folder_name + folder_name + "_it" + str(it) + ".obj" reduce_faces(last_out_mesh, out_mesh) last_out_mesh = out_mesh print() print("Done reducing, find the files at: " + tmp_folder_name)おわりに
簡単にでしたが、meshlabにてメッシュのフィルター操作を自動化しました。blenderやその他3DソフトもAPIは豊富にあるので、出来るだけ自動化しましょう。
参考サイト一覧
https://gist.github.com/tylerlindell/7435ca2261e7c404ccc1241f18e483aa
- 投稿日:2019-06-25T16:36:08+09:00
Open jij導入失敗
docker で anaconda3を起動。
macOS$ docker run -p 8888:8888 -it continuumio/anaconda3 /bin/bashopenjij導入
macOS# conda install openjij Solving environment: failed PackagesNotFoundError: The following packages are not available from current channels: - openjij Current channels: - https://repo.anaconda.com/pkgs/main/linux-64 - https://repo.anaconda.com/pkgs/main/noarch - https://repo.anaconda.com/pkgs/free/linux-64 - https://repo.anaconda.com/pkgs/free/noarch - https://repo.anaconda.com/pkgs/r/linux-64 - https://repo.anaconda.com/pkgs/r/noarch - https://repo.anaconda.com/pkgs/pro/linux-64 - https://repo.anaconda.com/pkgs/pro/noarch To search for alternate channels that may provide the conda package you're looking for, navigate to https://anaconda.org and use the search bar at the top of the page.condaにはないらしい。pipで導入
ubuntu(base) root@45002713ccc2:/# pip install openjij Collecting openjij Downloading https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz (80kB) 100% |████████████████████████████████| 81kB 2.4MB/s Requirement already satisfied: numpy in /opt/conda/lib/python3.7/site-packages (from openjij) (1.15.4) Requirement already satisfied: requests in /opt/conda/lib/python3.7/site-packages (from openjij) (2.21.0) Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (2.8) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (3.0.4) Requirement already satisfied: urllib3<1.25,>=1.21.1 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (1.24.1) Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (2018.11.29) Building wheels for collected packages: openjij Running setup.py bdist_wheel for openjij ... error Complete output from command /opt/conda/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-r1bqehgj/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-ihkj5hjl --python-tag cp37: running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.7/openjij creating build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.7/openjij/model creating build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler running build_ext Traceback (most recent call last): File "/tmp/pip-install-r1bqehgj/openjij/setup.py", line 31, in run out = subprocess.check_output(['cmake', '--version']) File "/opt/conda/lib/python3.7/subprocess.py", line 389, in check_output **kwargs).stdout File "/opt/conda/lib/python3.7/subprocess.py", line 466, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/lib/python3.7/subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "/opt/conda/lib/python3.7/subprocess.py", line 1516, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-r1bqehgj/openjij/setup.py", line 126, in <module> zip_safe=False File "/opt/conda/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/conda/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/conda/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 188, in run self.run_command('build') File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-r1bqehgj/openjij/setup.py", line 34, in run ", ".join(e.name for e in self.extensions)) RuntimeError: CMake must be installed to build the following extensions: cxxjij ---------------------------------------- Failed building wheel for openjij Running setup.py clean for openjij Failed to build openjij Installing collected packages: openjij Running setup.py install for openjij ... error Complete output from command /opt/conda/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-r1bqehgj/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-8gzkp3mq/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.7/openjij creating build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.7/openjij/model creating build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler running build_ext Traceback (most recent call last): File "/tmp/pip-install-r1bqehgj/openjij/setup.py", line 31, in run out = subprocess.check_output(['cmake', '--version']) File "/opt/conda/lib/python3.7/subprocess.py", line 389, in check_output **kwargs).stdout File "/opt/conda/lib/python3.7/subprocess.py", line 466, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/lib/python3.7/subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "/opt/conda/lib/python3.7/subprocess.py", line 1516, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-r1bqehgj/openjij/setup.py", line 126, in <module> zip_safe=False File "/opt/conda/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/conda/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/conda/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/opt/conda/lib/python3.7/distutils/command/install.py", line 545, in run self.run_command('build') File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-r1bqehgj/openjij/setup.py", line 34, in run ", ".join(e.name for e in self.extensions)) RuntimeError: CMake must be installed to build the following extensions: cxxjij ---------------------------------------- Command "/opt/conda/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-r1bqehgj/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-8gzkp3mq/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-r1bqehgj/openjij/pipが古いといけないと思い、更新。
ubuntu# pip install --upgrade pip Collecting pip Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 8.6MB/s Installing collected packages: pip Found existing installation: pip 18.1 Uninstalling pip-18.1: Successfully uninstalled pip-18.1 Successfully installed pip-19.1.1 (base) root@45002713ccc2:/# pip install openjij Collecting openjij Using cached https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz Requirement already satisfied: numpy in /opt/conda/lib/python3.7/site-packages (from openjij) (1.15.4) Requirement already satisfied: requests in /opt/conda/lib/python3.7/site-packages (from openjij) (2.21.0) Requirement already satisfied: urllib3<1.25,>=1.21.1 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (1.24.1) Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (2018.11.29) Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (2.8) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (3.0.4) Building wheels for collected packages: openjij Building wheel for openjij (setup.py) ... error ERROR: Complete output from command /opt/conda/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-x_x5e3zq/openjij/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-xl4mry66 --python-tag cp37: ERROR: running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.7/openjij creating build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.7/openjij/model creating build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler running build_ext Traceback (most recent call last): File "/tmp/pip-install-x_x5e3zq/openjij/setup.py", line 31, in run out = subprocess.check_output(['cmake', '--version']) File "/opt/conda/lib/python3.7/subprocess.py", line 389, in check_output **kwargs).stdout File "/opt/conda/lib/python3.7/subprocess.py", line 466, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/lib/python3.7/subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "/opt/conda/lib/python3.7/subprocess.py", line 1516, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-x_x5e3zq/openjij/setup.py", line 126, in <module> zip_safe=False File "/opt/conda/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/conda/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/conda/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 188, in run self.run_command('build') File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-x_x5e3zq/openjij/setup.py", line 34, in run ", ".join(e.name for e in self.extensions)) RuntimeError: CMake must be installed to build the following extensions: cxxjij ---------------------------------------- ERROR: Failed building wheel for openjij Running setup.py clean for openjij Failed to build openjij Installing collected packages: openjij Running setup.py install for openjij ... error ERROR: Complete output from command /opt/conda/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-x_x5e3zq/openjij/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-gk_4jydq/install-record.txt --single-version-externally-managed --compile: ERROR: running install running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.7/openjij creating build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.7/openjij/model creating build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler running build_ext Traceback (most recent call last): File "/tmp/pip-install-x_x5e3zq/openjij/setup.py", line 31, in run out = subprocess.check_output(['cmake', '--version']) File "/opt/conda/lib/python3.7/subprocess.py", line 389, in check_output **kwargs).stdout File "/opt/conda/lib/python3.7/subprocess.py", line 466, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/lib/python3.7/subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "/opt/conda/lib/python3.7/subprocess.py", line 1516, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-x_x5e3zq/openjij/setup.py", line 126, in <module> zip_safe=False File "/opt/conda/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/conda/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/conda/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/opt/conda/lib/python3.7/distutils/command/install.py", line 545, in run self.run_command('build') File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-x_x5e3zq/openjij/setup.py", line 34, in run ", ".join(e.name for e in self.extensions)) RuntimeError: CMake must be installed to build the following extensions: cxxjij ---------------------------------------- ERROR: Command "/opt/conda/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-x_x5e3zq/openjij/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-gk_4jydq/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-x_x5e3zq/openjij/最初のエラーはcmakeがない。そりゃ、dockerのubuntuなんにもない。
ubuntu# apt install cmake Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: binutils cmake-data cpp cpp-6 gcc gcc-6 libarchive13 libasan3 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libgcc-6-dev libgomp1 libisl15 libitm1 libjsoncpp1 liblsan0 liblzo2-2 libmpc3 libmpfr4 libmpx2 libprocps6 libquadmath0 libtsan0 libubsan0 libuv1 linux-libc-dev make manpages manpages-dev procps psmisc Suggested packages: binutils-doc codeblocks eclipse ninja-build cpp-doc gcc-6-locales gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-6-multilib gcc-6-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan3-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg lrzip glibc-doc make-doc man-browser The following NEW packages will be installed: binutils cmake cmake-data cpp cpp-6 gcc gcc-6 libarchive13 libasan3 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libgcc-6-dev libgomp1 libisl15 libitm1 libjsoncpp1 liblsan0 liblzo2-2 libmpc3 libmpfr4 libmpx2 libprocps6 libquadmath0 libtsan0 libubsan0 libuv1 linux-libc-dev make manpages manpages-dev procps psmisc 0 upgraded, 35 newly installed, 0 to remove and 22 not upgraded. Need to get 34.7 MB of archives. After this operation, 145 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://deb.debian.org/debian stretch/main amd64 cmake-data all 3.7.2-1 [1216 kB] Get:2 http://deb.debian.org/debian stretch/main amd64 libprocps6 amd64 2:3.3.12-3+deb9u1 [58.5 kB] Get:3 http://deb.debian.org/debian stretch/main amd64 procps amd64 2:3.3.12-3+deb9u1 [250 kB] Get:4 http://deb.debian.org/debian stretch/main amd64 liblzo2-2 amd64 2.08-1.2+b2 [55.0 kB] Get:5 http://deb.debian.org/debian stretch/main amd64 libjsoncpp1 amd64 1.7.4-3 [75.6 kB] Get:6 http://deb.debian.org/debian stretch/main amd64 libuv1 amd64 1.9.1-3 [84.4 kB] Get:7 http://deb.debian.org/debian stretch/main amd64 cmake amd64 3.7.2-1 [3038 kB] Get:8 http://deb.debian.org/debian stretch/main amd64 manpages all 4.10-2 [1222 kB] Get:9 http://deb.debian.org/debian stretch/main amd64 binutils amd64 2.28-5 [3770 kB] Get:10 http://deb.debian.org/debian stretch/main amd64 libisl15 amd64 0.18-1 [564 kB] Get:11 http://deb.debian.org/debian stretch/main amd64 libmpfr4 amd64 3.1.5-1 [556 kB] Get:12 http://deb.debian.org/debian stretch/main amd64 libmpc3 amd64 1.0.3-1+b2 [39.9 kB] Get:13 http://deb.debian.org/debian stretch/main amd64 cpp-6 amd64 6.3.0-18+deb9u1 [6584 kB] Get:14 http://deb.debian.org/debian stretch/main amd64 cpp amd64 4:6.3.0-4 [18.7 kB] Get:15 http://deb.debian.org/debian stretch/main amd64 libcc1-0 amd64 6.3.0-18+deb9u1 [30.6 kB] Get:16 http://deb.debian.org/debian stretch/main amd64 libgomp1 amd64 6.3.0-18+deb9u1 [73.3 kB] Get:17 http://deb.debian.org/debian stretch/main amd64 libitm1 amd64 6.3.0-18+deb9u1 [27.3 kB] Get:18 http://deb.debian.org/debian stretch/main amd64 libatomic1 amd64 6.3.0-18+deb9u1 [8966 B] Get:19 http://deb.debian.org/debian stretch/main amd64 libasan3 amd64 6.3.0-18+deb9u1 [311 kB] Get:20 http://deb.debian.org/debian stretch/main amd64 liblsan0 amd64 6.3.0-18+deb9u1 [115 kB] Get:21 http://deb.debian.org/debian stretch/main amd64 libtsan0 amd64 6.3.0-18+deb9u1 [257 kB] Get:22 http://deb.debian.org/debian stretch/main amd64 libubsan0 amd64 6.3.0-18+deb9u1 [107 kB] Get:23 http://deb.debian.org/debian stretch/main amd64 libcilkrts5 amd64 6.3.0-18+deb9u1 [40.5 kB] Get:24 http://deb.debian.org/debian stretch/main amd64 libmpx2 amd64 6.3.0-18+deb9u1 [11.2 kB] Get:25 http://deb.debian.org/debian stretch/main amd64 libquadmath0 amd64 6.3.0-18+deb9u1 [131 kB] Get:26 http://deb.debian.org/debian stretch/main amd64 libgcc-6-dev amd64 6.3.0-18+deb9u1 [2296 kB] Get:27 http://deb.debian.org/debian stretch/main amd64 gcc-6 amd64 6.3.0-18+deb9u1 [6900 kB] Get:28 http://security.debian.org/debian-security stretch/updates/main amd64 libarchive13 amd64 3.2.2-2+deb9u1 [294 kB] Get:29 http://deb.debian.org/debian stretch/main amd64 gcc amd64 4:6.3.0-4 [5196 B] Err:30 http://deb.debian.org/debian stretch/main amd64 libc-dev-bin amd64 2.24-11+deb9u3 404 Not Found Err:31 http://deb.debian.org/debian stretch/main amd64 linux-libc-dev amd64 4.9.130-2 404 Not Found Err:32 http://deb.debian.org/debian stretch/main amd64 libc6-dev amd64 2.24-11+deb9u3 404 Not Found Get:33 http://deb.debian.org/debian stretch/main amd64 make amd64 4.1-9.1 [302 kB] Get:34 http://deb.debian.org/debian stretch/main amd64 manpages-dev all 4.10-2 [2145 kB] Get:35 http://deb.debian.org/debian stretch/main amd64 psmisc amd64 22.21-2.1+b2 [123 kB] Fetched 30.7 MB in 3s (8113 kB/s) E: Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/libc-dev-bin_2.24-11+deb9u3_amd64.deb 404 Not Found E: Failed to fetch http://deb.debian.org/debian/pool/main/l/linux/linux-libc-dev_4.9.130-2_amd64.deb 404 Not Found E: Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/libc6-dev_2.24-11+deb9u3_amd64.deb 404 Not Found E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?そういや、ubuntuでaptのupdate, upgradeしてなかった。
(base) root@45002713ccc2:/# apt update Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB] Get:2 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [499 kB] Ign:3 http://deb.debian.org/debian stretch InRelease Get:4 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB] Get:5 http://deb.debian.org/debian stretch Release [118 kB] Get:6 http://deb.debian.org/debian stretch-updates/main amd64 Packages.diff/Index [10.1 kB] Get:7 http://deb.debian.org/debian stretch Release.gpg [2434 B] Get:8 http://deb.debian.org/debian stretch-updates/main amd64 Packages [27.2 kB] Get:9 http://deb.debian.org/debian stretch/main amd64 Packages [7082 kB] Fetched 7924 kB in 4s (1666 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 33 packages can be upgraded. Run 'apt list --upgradable' to see them. (base) root@45002713ccc2:/# apt -y upgrade# apt install cmake Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package cmakedocker起動しなおし。
$ docker run -p 8888:8888 -it continuumio/anaconda3 /bin/bashapt updateからはじめてもダメだった。
(base) root@2cae175410fc:/# apt update Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB] Get:2 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [499 kB] Ign:3 http://deb.debian.org/debian stretch InRelease Get:4 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB] Get:5 http://deb.debian.org/debian stretch Release [118 kB] Get:6 http://deb.debian.org/debian stretch-updates/main amd64 Packages.diff/Index [10.1 kB] Get:7 http://deb.debian.org/debian stretch Release.gpg [2434 B] Get:8 http://deb.debian.org/debian stretch-updates/main amd64 Packages [27.2 kB] Get:9 http://deb.debian.org/debian stretch/main amd64 Packages [7082 kB] Fetched 7924 kB in 3s (2165 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 33 packages can be upgraded. Run 'apt list --upgradable' to see them. (base) root@2cae175410fc:/# apt -y upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: apt base-files curl git git-man gpgv libapt-pkg5.0 libc-bin libc6 libcurl3 libcurl3-gnutls libgnutls30 libperl5.24 libserf-1-1 libssh2-1 libssl1.0.2 libssl1.1 libsvn1 libsystemd0 libudev1 libx11-6 libx11-data multiarch-support openssh-client openssl perl perl-base perl-modules-5.24 publicsuffix rsync subversion tzdata wget 33 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 31.2 MB of archives. After this operation, 169 kB of additional disk space will be used. Get:1 http://deb.debian.org/debian stretch/main amd64 base-files amd64 9.9+deb9u9 [67.4 kB] Get:2 http://deb.debian.org/debian stretch/main amd64 libperl5.24 amd64 5.24.1-3+deb9u5 [3501 kB] Get:3 http://deb.debian.org/debian stretch/main amd64 perl amd64 5.24.1-3+deb9u5 [219 kB] Get:4 http://deb.debian.org/debian stretch/main amd64 perl-base amd64 5.24.1-3+deb9u5 [1345 kB] Get:5 http://deb.debian.org/debian stretch/main amd64 perl-modules-5.24 all 5.24.1-3+deb9u5 [2722 kB] Get:6 http://deb.debian.org/debian stretch/main amd64 libc6 amd64 2.24-11+deb9u4 [2694 kB] Get:7 http://deb.debian.org/debian stretch/main amd64 libc-bin amd64 2.24-11+deb9u4 [782 kB] Get:8 http://deb.debian.org/debian stretch/main amd64 libapt-pkg5.0 amd64 1.4.9 [916 kB] Get:9 http://deb.debian.org/debian stretch/main amd64 gpgv amd64 2.1.18-8~deb9u4 [481 kB] Get:10 http://deb.debian.org/debian stretch/main amd64 apt amd64 1.4.9 [1232 kB] Get:11 http://deb.debian.org/debian stretch/main amd64 libsystemd0 amd64 232-25+deb9u11 [281 kB] Get:12 http://deb.debian.org/debian stretch/main amd64 git-man all 1:2.11.0-3+deb9u4 [1433 kB] Get:13 http://deb.debian.org/debian stretch/main amd64 libgnutls30 amd64 3.5.8-5+deb9u4 [896 kB] Get:14 http://deb.debian.org/debian stretch/main amd64 libssh2-1 amd64 1.7.0-1+deb9u1 [139 kB] Get:15 http://deb.debian.org/debian stretch/main amd64 libcurl3-gnutls amd64 7.52.1-5+deb9u9 [290 kB] Get:16 http://deb.debian.org/debian stretch/main amd64 git amd64 1:2.11.0-3+deb9u4 [4167 kB] Get:17 http://deb.debian.org/debian stretch/main amd64 multiarch-support amd64 2.24-11+deb9u4 [201 kB] Get:18 http://deb.debian.org/debian stretch/main amd64 libudev1 amd64 232-25+deb9u11 [126 kB] Get:19 http://deb.debian.org/debian stretch/main amd64 tzdata all 2019a-0+deb9u1 [273 kB] Get:20 http://deb.debian.org/debian stretch/main amd64 libssl1.0.2 amd64 1.0.2r-1~deb9u1 [1302 kB] Get:21 http://deb.debian.org/debian stretch/main amd64 libssl1.1 amd64 1.1.0j-1~deb9u1 [1354 kB] Get:22 http://deb.debian.org/debian stretch/main amd64 wget amd64 1.18-5+deb9u3 [800 kB] Get:23 http://deb.debian.org/debian stretch/main amd64 openssh-client amd64 1:7.4p1-10+deb9u6 [781 kB] Get:24 http://deb.debian.org/debian stretch/main amd64 curl amd64 7.52.1-5+deb9u9 [227 kB] Get:25 http://deb.debian.org/debian stretch/main amd64 libcurl3 amd64 7.52.1-5+deb9u9 [292 kB] Get:26 http://deb.debian.org/debian stretch/main amd64 libserf-1-1 amd64 1.3.9-3+deb9u1 [52.5 kB] Get:27 http://deb.debian.org/debian stretch/main amd64 subversion amd64 1.9.5-1+deb9u3 [994 kB] Get:28 http://deb.debian.org/debian stretch/main amd64 libsvn1 amd64 1.9.5-1+deb9u3 [1318 kB] Get:29 http://deb.debian.org/debian stretch/main amd64 libx11-data all 2:1.6.4-3+deb9u1 [287 kB] Get:30 http://deb.debian.org/debian stretch/main amd64 libx11-6 amd64 2:1.6.4-3+deb9u1 [748 kB] Get:31 http://deb.debian.org/debian stretch/main amd64 openssl amd64 1.1.0j-1~deb9u1 [746 kB] Get:32 http://deb.debian.org/debian stretch/main amd64 rsync amd64 3.1.2-1+deb9u2 [393 kB] Get:33 http://deb.debian.org/debian stretch/main amd64 publicsuffix all 20190415.1030-0+deb9u1 [108 kB] Fetched 31.2 MB in 1s (17.7 MB/s) debconf: delaying package configuration, since apt-utils is not installed (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../base-files_9.9+deb9u9_amd64.deb ... Unpacking base-files (9.9+deb9u9) over (9.9+deb9u5) ... Setting up base-files (9.9+deb9u9) ... Installing new version of config file /etc/debian_version ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../libperl5.24_5.24.1-3+deb9u5_amd64.deb ... Unpacking libperl5.24:amd64 (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ... Preparing to unpack .../perl_5.24.1-3+deb9u5_amd64.deb ... Unpacking perl (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ... Preparing to unpack .../perl-base_5.24.1-3+deb9u5_amd64.deb ... Unpacking perl-base (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ... Setting up perl-base (5.24.1-3+deb9u5) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../perl-modules-5.24_5.24.1-3+deb9u5_all.deb ... Unpacking perl-modules-5.24 (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ... Preparing to unpack .../libc6_2.24-11+deb9u4_amd64.deb ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Unpacking libc6:amd64 (2.24-11+deb9u4) over (2.24-11+deb9u3) ... Setting up libc6:amd64 (2.24-11+deb9u4) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../libc-bin_2.24-11+deb9u4_amd64.deb ... Unpacking libc-bin (2.24-11+deb9u4) over (2.24-11+deb9u3) ... Setting up libc-bin (2.24-11+deb9u4) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../libapt-pkg5.0_1.4.9_amd64.deb ... Unpacking libapt-pkg5.0:amd64 (1.4.9) over (1.4.8) ... Setting up libapt-pkg5.0:amd64 (1.4.9) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../gpgv_2.1.18-8~deb9u4_amd64.deb ... Unpacking gpgv (2.1.18-8~deb9u4) over (2.1.18-8~deb9u2) ... Setting up gpgv (2.1.18-8~deb9u4) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../archives/apt_1.4.9_amd64.deb ... Unpacking apt (1.4.9) over (1.4.8) ... Setting up apt (1.4.9) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../libsystemd0_232-25+deb9u11_amd64.deb ... Unpacking libsystemd0:amd64 (232-25+deb9u11) over (232-25+deb9u4) ... Setting up libsystemd0:amd64 (232-25+deb9u11) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../0-git-man_1%3a2.11.0-3+deb9u4_all.deb ... Unpacking git-man (1:2.11.0-3+deb9u4) over (1:2.11.0-3+deb9u3) ... Preparing to unpack .../1-libgnutls30_3.5.8-5+deb9u4_amd64.deb ... Unpacking libgnutls30:amd64 (3.5.8-5+deb9u4) over (3.5.8-5+deb9u3) ... Preparing to unpack .../2-libssh2-1_1.7.0-1+deb9u1_amd64.deb ... Unpacking libssh2-1:amd64 (1.7.0-1+deb9u1) over (1.7.0-1) ... Preparing to unpack .../3-libcurl3-gnutls_7.52.1-5+deb9u9_amd64.deb ... Unpacking libcurl3-gnutls:amd64 (7.52.1-5+deb9u9) over (7.52.1-5+deb9u7) ... Preparing to unpack .../4-git_1%3a2.11.0-3+deb9u4_amd64.deb ... Unpacking git (1:2.11.0-3+deb9u4) over (1:2.11.0-3+deb9u3) ... Preparing to unpack .../5-multiarch-support_2.24-11+deb9u4_amd64.deb ... Unpacking multiarch-support (2.24-11+deb9u4) over (2.24-11+deb9u3) ... Setting up multiarch-support (2.24-11+deb9u4) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../libudev1_232-25+deb9u11_amd64.deb ... Unpacking libudev1:amd64 (232-25+deb9u11) over (232-25+deb9u4) ... Setting up libudev1:amd64 (232-25+deb9u11) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../00-tzdata_2019a-0+deb9u1_all.deb ... Unpacking tzdata (2019a-0+deb9u1) over (2018e-0+deb9u1) ... Preparing to unpack .../01-libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb ... Unpacking libssl1.0.2:amd64 (1.0.2r-1~deb9u1) over (1.0.2l-2+deb9u3) ... Preparing to unpack .../02-libssl1.1_1.1.0j-1~deb9u1_amd64.deb ... Unpacking libssl1.1:amd64 (1.1.0j-1~deb9u1) over (1.1.0f-3+deb9u2) ... Preparing to unpack .../03-wget_1.18-5+deb9u3_amd64.deb ... Unpacking wget (1.18-5+deb9u3) over (1.18-5+deb9u2) ... Preparing to unpack .../04-openssh-client_1%3a7.4p1-10+deb9u6_amd64.deb ... Unpacking openssh-client (1:7.4p1-10+deb9u6) over (1:7.4p1-10+deb9u4) ... Preparing to unpack .../05-curl_7.52.1-5+deb9u9_amd64.deb ... Unpacking curl (7.52.1-5+deb9u9) over (7.52.1-5+deb9u8) ... Preparing to unpack .../06-libcurl3_7.52.1-5+deb9u9_amd64.deb ... Unpacking libcurl3:amd64 (7.52.1-5+deb9u9) over (7.52.1-5+deb9u8) ... Preparing to unpack .../07-libserf-1-1_1.3.9-3+deb9u1_amd64.deb ... Unpacking libserf-1-1:amd64 (1.3.9-3+deb9u1) over (1.3.9-3) ... Preparing to unpack .../08-subversion_1.9.5-1+deb9u3_amd64.deb ... Unpacking subversion (1.9.5-1+deb9u3) over (1.9.5-1+deb9u2) ... Preparing to unpack .../09-libsvn1_1.9.5-1+deb9u3_amd64.deb ... Unpacking libsvn1:amd64 (1.9.5-1+deb9u3) over (1.9.5-1+deb9u2) ... Preparing to unpack .../10-libx11-data_2%3a1.6.4-3+deb9u1_all.deb ... Unpacking libx11-data (2:1.6.4-3+deb9u1) over (2:1.6.4-3) ... Preparing to unpack .../11-libx11-6_2%3a1.6.4-3+deb9u1_amd64.deb ... Unpacking libx11-6:amd64 (2:1.6.4-3+deb9u1) over (2:1.6.4-3) ... Preparing to unpack .../12-openssl_1.1.0j-1~deb9u1_amd64.deb ... Unpacking openssl (1.1.0j-1~deb9u1) over (1.1.0f-3+deb9u2) ... Preparing to unpack .../13-rsync_3.1.2-1+deb9u2_amd64.deb ... Unpacking rsync (3.1.2-1+deb9u2) over (3.1.2-1+deb9u1) ... Preparing to unpack .../14-publicsuffix_20190415.1030-0+deb9u1_all.deb ... Unpacking publicsuffix (20190415.1030-0+deb9u1) over (20180218.2049-0+deb9u1) ... Setting up perl-modules-5.24 (5.24.1-3+deb9u5) ... Setting up libperl5.24:amd64 (5.24.1-3+deb9u5) ... Setting up git-man (1:2.11.0-3+deb9u4) ... Setting up tzdata (2019a-0+deb9u1) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Current default time zone: 'Etc/UTC' Local time is now: Tue Jun 25 07:47:48 UTC 2019. Universal Time is now: Tue Jun 25 07:47:48 UTC 2019. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up libgnutls30:amd64 (3.5.8-5+deb9u4) ... Setting up rsync (3.1.2-1+deb9u2) ... invoke-rc.d: could not determine current runlevel invoke-rc.d: policy-rc.d denied execution of restart. Setting up perl (5.24.1-3+deb9u5) ... Setting up libssl1.0.2:amd64 (1.0.2r-1~deb9u1) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Setting up libssh2-1:amd64 (1.7.0-1+deb9u1) ... Processing triggers for libc-bin (2.24-11+deb9u4) ... Setting up publicsuffix (20190415.1030-0+deb9u1) ... Setting up libssl1.1:amd64 (1.1.0j-1~deb9u1) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Setting up openssl (1.1.0j-1~deb9u1) ... Setting up wget (1.18-5+deb9u3) ... Setting up openssh-client (1:7.4p1-10+deb9u6) ... Setting up libx11-data (2:1.6.4-3+deb9u1) ... Setting up libcurl3:amd64 (7.52.1-5+deb9u9) ... Setting up libcurl3-gnutls:amd64 (7.52.1-5+deb9u9) ... Setting up libx11-6:amd64 (2:1.6.4-3+deb9u1) ... Setting up libserf-1-1:amd64 (1.3.9-3+deb9u1) ... Setting up libsvn1:amd64 (1.9.5-1+deb9u3) ... Setting up git (1:2.11.0-3+deb9u4) ... Setting up curl (7.52.1-5+deb9u9) ... Setting up subversion (1.9.5-1+deb9u3) ... Processing triggers for libc-bin (2.24-11+deb9u4) ... (base) root@2cae175410fc:/# pip install --upgrade pip Collecting pip Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 6.9MB/s Installing collected packages: pip Found existing installation: pip 18.1 Uninstalling pip-18.1: Successfully uninstalled pip-18.1 Successfully installed pip-19.1.1 (base) root@2cae175410fc:/# pip install openjij Collecting openjij Downloading https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz (80kB) |████████████████████████████████| 81kB 2.7MB/s Requirement already satisfied: numpy in /opt/conda/lib/python3.7/site-packages (from openjij) (1.15.4) Requirement already satisfied: requests in /opt/conda/lib/python3.7/site-packages (from openjij) (2.21.0) Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (2.8) Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (2018.11.29) Requirement already satisfied: urllib3<1.25,>=1.21.1 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (1.24.1) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (3.0.4) Building wheels for collected packages: openjij Building wheel for openjij (setup.py) ... error ERROR: Complete output from command /opt/conda/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-neuubmt1/openjij/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-hg81stwn --python-tag cp37: ERROR: running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.7/openjij creating build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.7/openjij/model creating build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler running build_ext Traceback (most recent call last): File "/tmp/pip-install-neuubmt1/openjij/setup.py", line 31, in run out = subprocess.check_output(['cmake', '--version']) File "/opt/conda/lib/python3.7/subprocess.py", line 389, in check_output **kwargs).stdout File "/opt/conda/lib/python3.7/subprocess.py", line 466, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/lib/python3.7/subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "/opt/conda/lib/python3.7/subprocess.py", line 1516, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-neuubmt1/openjij/setup.py", line 126, in <module> zip_safe=False File "/opt/conda/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/conda/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/conda/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 188, in run self.run_command('build') File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-neuubmt1/openjij/setup.py", line 34, in run ", ".join(e.name for e in self.extensions)) RuntimeError: CMake must be installed to build the following extensions: cxxjij ---------------------------------------- ERROR: Failed building wheel for openjij Running setup.py clean for openjij Failed to build openjij Installing collected packages: openjij Running setup.py install for openjij ... error ERROR: Complete output from command /opt/conda/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-neuubmt1/openjij/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-thdhqpvr/install-record.txt --single-version-externally-managed --compile: ERROR: running install running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.7/openjij creating build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.7/openjij/model creating build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler running build_ext Traceback (most recent call last): File "/tmp/pip-install-neuubmt1/openjij/setup.py", line 31, in run out = subprocess.check_output(['cmake', '--version']) File "/opt/conda/lib/python3.7/subprocess.py", line 389, in check_output **kwargs).stdout File "/opt/conda/lib/python3.7/subprocess.py", line 466, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/lib/python3.7/subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "/opt/conda/lib/python3.7/subprocess.py", line 1516, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-neuubmt1/openjij/setup.py", line 126, in <module> zip_safe=False File "/opt/conda/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/conda/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/conda/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/opt/conda/lib/python3.7/distutils/command/install.py", line 545, in run self.run_command('build') File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-neuubmt1/openjij/setup.py", line 34, in run ", ".join(e.name for e in self.extensions)) RuntimeError: CMake must be installed to build the following extensions: cxxjij ---------------------------------------- ERROR: Command "/opt/conda/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-neuubmt1/openjij/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-thdhqpvr/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-neuubmt1/openjij/
- 投稿日:2019-06-25T16:36:08+09:00
docker(23) Open jij導入失敗
docker で anaconda3を起動。
macOS$ docker run -p 8888:8888 -it continuumio/anaconda3 /bin/bashopenjij導入
macOS# conda install openjij Solving environment: failed PackagesNotFoundError: The following packages are not available from current channels: - openjij Current channels: - https://repo.anaconda.com/pkgs/main/linux-64 - https://repo.anaconda.com/pkgs/main/noarch - https://repo.anaconda.com/pkgs/free/linux-64 - https://repo.anaconda.com/pkgs/free/noarch - https://repo.anaconda.com/pkgs/r/linux-64 - https://repo.anaconda.com/pkgs/r/noarch - https://repo.anaconda.com/pkgs/pro/linux-64 - https://repo.anaconda.com/pkgs/pro/noarch To search for alternate channels that may provide the conda package you're looking for, navigate to https://anaconda.org and use the search bar at the top of the page.condaにはないらしい。pipで導入
ubuntu(base) root@45002713ccc2:/# pip install openjij Collecting openjij Downloading https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz (80kB) 100% |████████████████████████████████| 81kB 2.4MB/s Requirement already satisfied: numpy in /opt/conda/lib/python3.7/site-packages (from openjij) (1.15.4) Requirement already satisfied: requests in /opt/conda/lib/python3.7/site-packages (from openjij) (2.21.0) Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (2.8) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (3.0.4) Requirement already satisfied: urllib3<1.25,>=1.21.1 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (1.24.1) Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (2018.11.29) Building wheels for collected packages: openjij Running setup.py bdist_wheel for openjij ... error Complete output from command /opt/conda/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-r1bqehgj/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-ihkj5hjl --python-tag cp37: running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.7/openjij creating build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.7/openjij/model creating build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler running build_ext Traceback (most recent call last): File "/tmp/pip-install-r1bqehgj/openjij/setup.py", line 31, in run out = subprocess.check_output(['cmake', '--version']) File "/opt/conda/lib/python3.7/subprocess.py", line 389, in check_output **kwargs).stdout File "/opt/conda/lib/python3.7/subprocess.py", line 466, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/lib/python3.7/subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "/opt/conda/lib/python3.7/subprocess.py", line 1516, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-r1bqehgj/openjij/setup.py", line 126, in <module> zip_safe=False File "/opt/conda/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/conda/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/conda/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 188, in run self.run_command('build') File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-r1bqehgj/openjij/setup.py", line 34, in run ", ".join(e.name for e in self.extensions)) RuntimeError: CMake must be installed to build the following extensions: cxxjij ---------------------------------------- Failed building wheel for openjij Running setup.py clean for openjij Failed to build openjij Installing collected packages: openjij Running setup.py install for openjij ... error Complete output from command /opt/conda/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-r1bqehgj/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-8gzkp3mq/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.7/openjij creating build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.7/openjij/model creating build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler running build_ext Traceback (most recent call last): File "/tmp/pip-install-r1bqehgj/openjij/setup.py", line 31, in run out = subprocess.check_output(['cmake', '--version']) File "/opt/conda/lib/python3.7/subprocess.py", line 389, in check_output **kwargs).stdout File "/opt/conda/lib/python3.7/subprocess.py", line 466, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/lib/python3.7/subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "/opt/conda/lib/python3.7/subprocess.py", line 1516, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-r1bqehgj/openjij/setup.py", line 126, in <module> zip_safe=False File "/opt/conda/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/conda/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/conda/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/opt/conda/lib/python3.7/distutils/command/install.py", line 545, in run self.run_command('build') File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-r1bqehgj/openjij/setup.py", line 34, in run ", ".join(e.name for e in self.extensions)) RuntimeError: CMake must be installed to build the following extensions: cxxjij ---------------------------------------- Command "/opt/conda/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-r1bqehgj/openjij/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-8gzkp3mq/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-r1bqehgj/openjij/pipが古いといけないと思い、更新。
ubuntu# pip install --upgrade pip Collecting pip Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 8.6MB/s Installing collected packages: pip Found existing installation: pip 18.1 Uninstalling pip-18.1: Successfully uninstalled pip-18.1 Successfully installed pip-19.1.1 (base) root@45002713ccc2:/# pip install openjij Collecting openjij Using cached https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz Requirement already satisfied: numpy in /opt/conda/lib/python3.7/site-packages (from openjij) (1.15.4) Requirement already satisfied: requests in /opt/conda/lib/python3.7/site-packages (from openjij) (2.21.0) Requirement already satisfied: urllib3<1.25,>=1.21.1 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (1.24.1) Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (2018.11.29) Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (2.8) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (3.0.4) Building wheels for collected packages: openjij Building wheel for openjij (setup.py) ... error ERROR: Complete output from command /opt/conda/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-x_x5e3zq/openjij/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-xl4mry66 --python-tag cp37: ERROR: running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.7/openjij creating build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.7/openjij/model creating build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler running build_ext Traceback (most recent call last): File "/tmp/pip-install-x_x5e3zq/openjij/setup.py", line 31, in run out = subprocess.check_output(['cmake', '--version']) File "/opt/conda/lib/python3.7/subprocess.py", line 389, in check_output **kwargs).stdout File "/opt/conda/lib/python3.7/subprocess.py", line 466, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/lib/python3.7/subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "/opt/conda/lib/python3.7/subprocess.py", line 1516, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-x_x5e3zq/openjij/setup.py", line 126, in <module> zip_safe=False File "/opt/conda/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/conda/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/conda/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 188, in run self.run_command('build') File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-x_x5e3zq/openjij/setup.py", line 34, in run ", ".join(e.name for e in self.extensions)) RuntimeError: CMake must be installed to build the following extensions: cxxjij ---------------------------------------- ERROR: Failed building wheel for openjij Running setup.py clean for openjij Failed to build openjij Installing collected packages: openjij Running setup.py install for openjij ... error ERROR: Complete output from command /opt/conda/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-x_x5e3zq/openjij/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-gk_4jydq/install-record.txt --single-version-externally-managed --compile: ERROR: running install running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.7/openjij creating build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.7/openjij/model creating build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler running build_ext Traceback (most recent call last): File "/tmp/pip-install-x_x5e3zq/openjij/setup.py", line 31, in run out = subprocess.check_output(['cmake', '--version']) File "/opt/conda/lib/python3.7/subprocess.py", line 389, in check_output **kwargs).stdout File "/opt/conda/lib/python3.7/subprocess.py", line 466, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/lib/python3.7/subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "/opt/conda/lib/python3.7/subprocess.py", line 1516, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-x_x5e3zq/openjij/setup.py", line 126, in <module> zip_safe=False File "/opt/conda/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/conda/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/conda/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/opt/conda/lib/python3.7/distutils/command/install.py", line 545, in run self.run_command('build') File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-x_x5e3zq/openjij/setup.py", line 34, in run ", ".join(e.name for e in self.extensions)) RuntimeError: CMake must be installed to build the following extensions: cxxjij ---------------------------------------- ERROR: Command "/opt/conda/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-x_x5e3zq/openjij/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-gk_4jydq/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-x_x5e3zq/openjij/最初のエラーはcmakeがない。そりゃ、dockerのubuntuなんにもない。
ubuntu# apt install cmake Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: binutils cmake-data cpp cpp-6 gcc gcc-6 libarchive13 libasan3 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libgcc-6-dev libgomp1 libisl15 libitm1 libjsoncpp1 liblsan0 liblzo2-2 libmpc3 libmpfr4 libmpx2 libprocps6 libquadmath0 libtsan0 libubsan0 libuv1 linux-libc-dev make manpages manpages-dev procps psmisc Suggested packages: binutils-doc codeblocks eclipse ninja-build cpp-doc gcc-6-locales gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-6-multilib gcc-6-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan3-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg lrzip glibc-doc make-doc man-browser The following NEW packages will be installed: binutils cmake cmake-data cpp cpp-6 gcc gcc-6 libarchive13 libasan3 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libgcc-6-dev libgomp1 libisl15 libitm1 libjsoncpp1 liblsan0 liblzo2-2 libmpc3 libmpfr4 libmpx2 libprocps6 libquadmath0 libtsan0 libubsan0 libuv1 linux-libc-dev make manpages manpages-dev procps psmisc 0 upgraded, 35 newly installed, 0 to remove and 22 not upgraded. Need to get 34.7 MB of archives. After this operation, 145 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://deb.debian.org/debian stretch/main amd64 cmake-data all 3.7.2-1 [1216 kB] Get:2 http://deb.debian.org/debian stretch/main amd64 libprocps6 amd64 2:3.3.12-3+deb9u1 [58.5 kB] Get:3 http://deb.debian.org/debian stretch/main amd64 procps amd64 2:3.3.12-3+deb9u1 [250 kB] Get:4 http://deb.debian.org/debian stretch/main amd64 liblzo2-2 amd64 2.08-1.2+b2 [55.0 kB] Get:5 http://deb.debian.org/debian stretch/main amd64 libjsoncpp1 amd64 1.7.4-3 [75.6 kB] Get:6 http://deb.debian.org/debian stretch/main amd64 libuv1 amd64 1.9.1-3 [84.4 kB] Get:7 http://deb.debian.org/debian stretch/main amd64 cmake amd64 3.7.2-1 [3038 kB] Get:8 http://deb.debian.org/debian stretch/main amd64 manpages all 4.10-2 [1222 kB] Get:9 http://deb.debian.org/debian stretch/main amd64 binutils amd64 2.28-5 [3770 kB] Get:10 http://deb.debian.org/debian stretch/main amd64 libisl15 amd64 0.18-1 [564 kB] Get:11 http://deb.debian.org/debian stretch/main amd64 libmpfr4 amd64 3.1.5-1 [556 kB] Get:12 http://deb.debian.org/debian stretch/main amd64 libmpc3 amd64 1.0.3-1+b2 [39.9 kB] Get:13 http://deb.debian.org/debian stretch/main amd64 cpp-6 amd64 6.3.0-18+deb9u1 [6584 kB] Get:14 http://deb.debian.org/debian stretch/main amd64 cpp amd64 4:6.3.0-4 [18.7 kB] Get:15 http://deb.debian.org/debian stretch/main amd64 libcc1-0 amd64 6.3.0-18+deb9u1 [30.6 kB] Get:16 http://deb.debian.org/debian stretch/main amd64 libgomp1 amd64 6.3.0-18+deb9u1 [73.3 kB] Get:17 http://deb.debian.org/debian stretch/main amd64 libitm1 amd64 6.3.0-18+deb9u1 [27.3 kB] Get:18 http://deb.debian.org/debian stretch/main amd64 libatomic1 amd64 6.3.0-18+deb9u1 [8966 B] Get:19 http://deb.debian.org/debian stretch/main amd64 libasan3 amd64 6.3.0-18+deb9u1 [311 kB] Get:20 http://deb.debian.org/debian stretch/main amd64 liblsan0 amd64 6.3.0-18+deb9u1 [115 kB] Get:21 http://deb.debian.org/debian stretch/main amd64 libtsan0 amd64 6.3.0-18+deb9u1 [257 kB] Get:22 http://deb.debian.org/debian stretch/main amd64 libubsan0 amd64 6.3.0-18+deb9u1 [107 kB] Get:23 http://deb.debian.org/debian stretch/main amd64 libcilkrts5 amd64 6.3.0-18+deb9u1 [40.5 kB] Get:24 http://deb.debian.org/debian stretch/main amd64 libmpx2 amd64 6.3.0-18+deb9u1 [11.2 kB] Get:25 http://deb.debian.org/debian stretch/main amd64 libquadmath0 amd64 6.3.0-18+deb9u1 [131 kB] Get:26 http://deb.debian.org/debian stretch/main amd64 libgcc-6-dev amd64 6.3.0-18+deb9u1 [2296 kB] Get:27 http://deb.debian.org/debian stretch/main amd64 gcc-6 amd64 6.3.0-18+deb9u1 [6900 kB] Get:28 http://security.debian.org/debian-security stretch/updates/main amd64 libarchive13 amd64 3.2.2-2+deb9u1 [294 kB] Get:29 http://deb.debian.org/debian stretch/main amd64 gcc amd64 4:6.3.0-4 [5196 B] Err:30 http://deb.debian.org/debian stretch/main amd64 libc-dev-bin amd64 2.24-11+deb9u3 404 Not Found Err:31 http://deb.debian.org/debian stretch/main amd64 linux-libc-dev amd64 4.9.130-2 404 Not Found Err:32 http://deb.debian.org/debian stretch/main amd64 libc6-dev amd64 2.24-11+deb9u3 404 Not Found Get:33 http://deb.debian.org/debian stretch/main amd64 make amd64 4.1-9.1 [302 kB] Get:34 http://deb.debian.org/debian stretch/main amd64 manpages-dev all 4.10-2 [2145 kB] Get:35 http://deb.debian.org/debian stretch/main amd64 psmisc amd64 22.21-2.1+b2 [123 kB] Fetched 30.7 MB in 3s (8113 kB/s) E: Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/libc-dev-bin_2.24-11+deb9u3_amd64.deb 404 Not Found E: Failed to fetch http://deb.debian.org/debian/pool/main/l/linux/linux-libc-dev_4.9.130-2_amd64.deb 404 Not Found E: Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/libc6-dev_2.24-11+deb9u3_amd64.deb 404 Not Found E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?そういや、ubuntuでaptのupdate, upgradeしてなかった。
(base) root@45002713ccc2:/# apt update Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB] Get:2 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [499 kB] Ign:3 http://deb.debian.org/debian stretch InRelease Get:4 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB] Get:5 http://deb.debian.org/debian stretch Release [118 kB] Get:6 http://deb.debian.org/debian stretch-updates/main amd64 Packages.diff/Index [10.1 kB] Get:7 http://deb.debian.org/debian stretch Release.gpg [2434 B] Get:8 http://deb.debian.org/debian stretch-updates/main amd64 Packages [27.2 kB] Get:9 http://deb.debian.org/debian stretch/main amd64 Packages [7082 kB] Fetched 7924 kB in 4s (1666 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 33 packages can be upgraded. Run 'apt list --upgradable' to see them. (base) root@45002713ccc2:/# apt -y upgrade# apt install cmake Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package cmakedocker起動しなおし。
$ docker run -p 8888:8888 -it continuumio/anaconda3 /bin/bashapt updateからはじめてもダメだった。
(base) root@2cae175410fc:/# apt update Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB] Get:2 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [499 kB] Ign:3 http://deb.debian.org/debian stretch InRelease Get:4 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB] Get:5 http://deb.debian.org/debian stretch Release [118 kB] Get:6 http://deb.debian.org/debian stretch-updates/main amd64 Packages.diff/Index [10.1 kB] Get:7 http://deb.debian.org/debian stretch Release.gpg [2434 B] Get:8 http://deb.debian.org/debian stretch-updates/main amd64 Packages [27.2 kB] Get:9 http://deb.debian.org/debian stretch/main amd64 Packages [7082 kB] Fetched 7924 kB in 3s (2165 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 33 packages can be upgraded. Run 'apt list --upgradable' to see them. (base) root@2cae175410fc:/# apt -y upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: apt base-files curl git git-man gpgv libapt-pkg5.0 libc-bin libc6 libcurl3 libcurl3-gnutls libgnutls30 libperl5.24 libserf-1-1 libssh2-1 libssl1.0.2 libssl1.1 libsvn1 libsystemd0 libudev1 libx11-6 libx11-data multiarch-support openssh-client openssl perl perl-base perl-modules-5.24 publicsuffix rsync subversion tzdata wget 33 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 31.2 MB of archives. After this operation, 169 kB of additional disk space will be used. Get:1 http://deb.debian.org/debian stretch/main amd64 base-files amd64 9.9+deb9u9 [67.4 kB] Get:2 http://deb.debian.org/debian stretch/main amd64 libperl5.24 amd64 5.24.1-3+deb9u5 [3501 kB] Get:3 http://deb.debian.org/debian stretch/main amd64 perl amd64 5.24.1-3+deb9u5 [219 kB] Get:4 http://deb.debian.org/debian stretch/main amd64 perl-base amd64 5.24.1-3+deb9u5 [1345 kB] Get:5 http://deb.debian.org/debian stretch/main amd64 perl-modules-5.24 all 5.24.1-3+deb9u5 [2722 kB] Get:6 http://deb.debian.org/debian stretch/main amd64 libc6 amd64 2.24-11+deb9u4 [2694 kB] Get:7 http://deb.debian.org/debian stretch/main amd64 libc-bin amd64 2.24-11+deb9u4 [782 kB] Get:8 http://deb.debian.org/debian stretch/main amd64 libapt-pkg5.0 amd64 1.4.9 [916 kB] Get:9 http://deb.debian.org/debian stretch/main amd64 gpgv amd64 2.1.18-8~deb9u4 [481 kB] Get:10 http://deb.debian.org/debian stretch/main amd64 apt amd64 1.4.9 [1232 kB] Get:11 http://deb.debian.org/debian stretch/main amd64 libsystemd0 amd64 232-25+deb9u11 [281 kB] Get:12 http://deb.debian.org/debian stretch/main amd64 git-man all 1:2.11.0-3+deb9u4 [1433 kB] Get:13 http://deb.debian.org/debian stretch/main amd64 libgnutls30 amd64 3.5.8-5+deb9u4 [896 kB] Get:14 http://deb.debian.org/debian stretch/main amd64 libssh2-1 amd64 1.7.0-1+deb9u1 [139 kB] Get:15 http://deb.debian.org/debian stretch/main amd64 libcurl3-gnutls amd64 7.52.1-5+deb9u9 [290 kB] Get:16 http://deb.debian.org/debian stretch/main amd64 git amd64 1:2.11.0-3+deb9u4 [4167 kB] Get:17 http://deb.debian.org/debian stretch/main amd64 multiarch-support amd64 2.24-11+deb9u4 [201 kB] Get:18 http://deb.debian.org/debian stretch/main amd64 libudev1 amd64 232-25+deb9u11 [126 kB] Get:19 http://deb.debian.org/debian stretch/main amd64 tzdata all 2019a-0+deb9u1 [273 kB] Get:20 http://deb.debian.org/debian stretch/main amd64 libssl1.0.2 amd64 1.0.2r-1~deb9u1 [1302 kB] Get:21 http://deb.debian.org/debian stretch/main amd64 libssl1.1 amd64 1.1.0j-1~deb9u1 [1354 kB] Get:22 http://deb.debian.org/debian stretch/main amd64 wget amd64 1.18-5+deb9u3 [800 kB] Get:23 http://deb.debian.org/debian stretch/main amd64 openssh-client amd64 1:7.4p1-10+deb9u6 [781 kB] Get:24 http://deb.debian.org/debian stretch/main amd64 curl amd64 7.52.1-5+deb9u9 [227 kB] Get:25 http://deb.debian.org/debian stretch/main amd64 libcurl3 amd64 7.52.1-5+deb9u9 [292 kB] Get:26 http://deb.debian.org/debian stretch/main amd64 libserf-1-1 amd64 1.3.9-3+deb9u1 [52.5 kB] Get:27 http://deb.debian.org/debian stretch/main amd64 subversion amd64 1.9.5-1+deb9u3 [994 kB] Get:28 http://deb.debian.org/debian stretch/main amd64 libsvn1 amd64 1.9.5-1+deb9u3 [1318 kB] Get:29 http://deb.debian.org/debian stretch/main amd64 libx11-data all 2:1.6.4-3+deb9u1 [287 kB] Get:30 http://deb.debian.org/debian stretch/main amd64 libx11-6 amd64 2:1.6.4-3+deb9u1 [748 kB] Get:31 http://deb.debian.org/debian stretch/main amd64 openssl amd64 1.1.0j-1~deb9u1 [746 kB] Get:32 http://deb.debian.org/debian stretch/main amd64 rsync amd64 3.1.2-1+deb9u2 [393 kB] Get:33 http://deb.debian.org/debian stretch/main amd64 publicsuffix all 20190415.1030-0+deb9u1 [108 kB] Fetched 31.2 MB in 1s (17.7 MB/s) debconf: delaying package configuration, since apt-utils is not installed (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../base-files_9.9+deb9u9_amd64.deb ... Unpacking base-files (9.9+deb9u9) over (9.9+deb9u5) ... Setting up base-files (9.9+deb9u9) ... Installing new version of config file /etc/debian_version ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../libperl5.24_5.24.1-3+deb9u5_amd64.deb ... Unpacking libperl5.24:amd64 (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ... Preparing to unpack .../perl_5.24.1-3+deb9u5_amd64.deb ... Unpacking perl (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ... Preparing to unpack .../perl-base_5.24.1-3+deb9u5_amd64.deb ... Unpacking perl-base (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ... Setting up perl-base (5.24.1-3+deb9u5) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../perl-modules-5.24_5.24.1-3+deb9u5_all.deb ... Unpacking perl-modules-5.24 (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ... Preparing to unpack .../libc6_2.24-11+deb9u4_amd64.deb ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Unpacking libc6:amd64 (2.24-11+deb9u4) over (2.24-11+deb9u3) ... Setting up libc6:amd64 (2.24-11+deb9u4) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../libc-bin_2.24-11+deb9u4_amd64.deb ... Unpacking libc-bin (2.24-11+deb9u4) over (2.24-11+deb9u3) ... Setting up libc-bin (2.24-11+deb9u4) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../libapt-pkg5.0_1.4.9_amd64.deb ... Unpacking libapt-pkg5.0:amd64 (1.4.9) over (1.4.8) ... Setting up libapt-pkg5.0:amd64 (1.4.9) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../gpgv_2.1.18-8~deb9u4_amd64.deb ... Unpacking gpgv (2.1.18-8~deb9u4) over (2.1.18-8~deb9u2) ... Setting up gpgv (2.1.18-8~deb9u4) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../archives/apt_1.4.9_amd64.deb ... Unpacking apt (1.4.9) over (1.4.8) ... Setting up apt (1.4.9) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../libsystemd0_232-25+deb9u11_amd64.deb ... Unpacking libsystemd0:amd64 (232-25+deb9u11) over (232-25+deb9u4) ... Setting up libsystemd0:amd64 (232-25+deb9u11) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../0-git-man_1%3a2.11.0-3+deb9u4_all.deb ... Unpacking git-man (1:2.11.0-3+deb9u4) over (1:2.11.0-3+deb9u3) ... Preparing to unpack .../1-libgnutls30_3.5.8-5+deb9u4_amd64.deb ... Unpacking libgnutls30:amd64 (3.5.8-5+deb9u4) over (3.5.8-5+deb9u3) ... Preparing to unpack .../2-libssh2-1_1.7.0-1+deb9u1_amd64.deb ... Unpacking libssh2-1:amd64 (1.7.0-1+deb9u1) over (1.7.0-1) ... Preparing to unpack .../3-libcurl3-gnutls_7.52.1-5+deb9u9_amd64.deb ... Unpacking libcurl3-gnutls:amd64 (7.52.1-5+deb9u9) over (7.52.1-5+deb9u7) ... Preparing to unpack .../4-git_1%3a2.11.0-3+deb9u4_amd64.deb ... Unpacking git (1:2.11.0-3+deb9u4) over (1:2.11.0-3+deb9u3) ... Preparing to unpack .../5-multiarch-support_2.24-11+deb9u4_amd64.deb ... Unpacking multiarch-support (2.24-11+deb9u4) over (2.24-11+deb9u3) ... Setting up multiarch-support (2.24-11+deb9u4) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../libudev1_232-25+deb9u11_amd64.deb ... Unpacking libudev1:amd64 (232-25+deb9u11) over (232-25+deb9u4) ... Setting up libudev1:amd64 (232-25+deb9u11) ... (Reading database ... 12505 files and directories currently installed.) Preparing to unpack .../00-tzdata_2019a-0+deb9u1_all.deb ... Unpacking tzdata (2019a-0+deb9u1) over (2018e-0+deb9u1) ... Preparing to unpack .../01-libssl1.0.2_1.0.2r-1~deb9u1_amd64.deb ... Unpacking libssl1.0.2:amd64 (1.0.2r-1~deb9u1) over (1.0.2l-2+deb9u3) ... Preparing to unpack .../02-libssl1.1_1.1.0j-1~deb9u1_amd64.deb ... Unpacking libssl1.1:amd64 (1.1.0j-1~deb9u1) over (1.1.0f-3+deb9u2) ... Preparing to unpack .../03-wget_1.18-5+deb9u3_amd64.deb ... Unpacking wget (1.18-5+deb9u3) over (1.18-5+deb9u2) ... Preparing to unpack .../04-openssh-client_1%3a7.4p1-10+deb9u6_amd64.deb ... Unpacking openssh-client (1:7.4p1-10+deb9u6) over (1:7.4p1-10+deb9u4) ... Preparing to unpack .../05-curl_7.52.1-5+deb9u9_amd64.deb ... Unpacking curl (7.52.1-5+deb9u9) over (7.52.1-5+deb9u8) ... Preparing to unpack .../06-libcurl3_7.52.1-5+deb9u9_amd64.deb ... Unpacking libcurl3:amd64 (7.52.1-5+deb9u9) over (7.52.1-5+deb9u8) ... Preparing to unpack .../07-libserf-1-1_1.3.9-3+deb9u1_amd64.deb ... Unpacking libserf-1-1:amd64 (1.3.9-3+deb9u1) over (1.3.9-3) ... Preparing to unpack .../08-subversion_1.9.5-1+deb9u3_amd64.deb ... Unpacking subversion (1.9.5-1+deb9u3) over (1.9.5-1+deb9u2) ... Preparing to unpack .../09-libsvn1_1.9.5-1+deb9u3_amd64.deb ... Unpacking libsvn1:amd64 (1.9.5-1+deb9u3) over (1.9.5-1+deb9u2) ... Preparing to unpack .../10-libx11-data_2%3a1.6.4-3+deb9u1_all.deb ... Unpacking libx11-data (2:1.6.4-3+deb9u1) over (2:1.6.4-3) ... Preparing to unpack .../11-libx11-6_2%3a1.6.4-3+deb9u1_amd64.deb ... Unpacking libx11-6:amd64 (2:1.6.4-3+deb9u1) over (2:1.6.4-3) ... Preparing to unpack .../12-openssl_1.1.0j-1~deb9u1_amd64.deb ... Unpacking openssl (1.1.0j-1~deb9u1) over (1.1.0f-3+deb9u2) ... Preparing to unpack .../13-rsync_3.1.2-1+deb9u2_amd64.deb ... Unpacking rsync (3.1.2-1+deb9u2) over (3.1.2-1+deb9u1) ... Preparing to unpack .../14-publicsuffix_20190415.1030-0+deb9u1_all.deb ... Unpacking publicsuffix (20190415.1030-0+deb9u1) over (20180218.2049-0+deb9u1) ... Setting up perl-modules-5.24 (5.24.1-3+deb9u5) ... Setting up libperl5.24:amd64 (5.24.1-3+deb9u5) ... Setting up git-man (1:2.11.0-3+deb9u4) ... Setting up tzdata (2019a-0+deb9u1) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Current default time zone: 'Etc/UTC' Local time is now: Tue Jun 25 07:47:48 UTC 2019. Universal Time is now: Tue Jun 25 07:47:48 UTC 2019. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up libgnutls30:amd64 (3.5.8-5+deb9u4) ... Setting up rsync (3.1.2-1+deb9u2) ... invoke-rc.d: could not determine current runlevel invoke-rc.d: policy-rc.d denied execution of restart. Setting up perl (5.24.1-3+deb9u5) ... Setting up libssl1.0.2:amd64 (1.0.2r-1~deb9u1) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Setting up libssh2-1:amd64 (1.7.0-1+deb9u1) ... Processing triggers for libc-bin (2.24-11+deb9u4) ... Setting up publicsuffix (20190415.1030-0+deb9u1) ... Setting up libssl1.1:amd64 (1.1.0j-1~deb9u1) ... debconf: unable to initialize frontend: Dialog debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.) debconf: falling back to frontend: Readline Setting up openssl (1.1.0j-1~deb9u1) ... Setting up wget (1.18-5+deb9u3) ... Setting up openssh-client (1:7.4p1-10+deb9u6) ... Setting up libx11-data (2:1.6.4-3+deb9u1) ... Setting up libcurl3:amd64 (7.52.1-5+deb9u9) ... Setting up libcurl3-gnutls:amd64 (7.52.1-5+deb9u9) ... Setting up libx11-6:amd64 (2:1.6.4-3+deb9u1) ... Setting up libserf-1-1:amd64 (1.3.9-3+deb9u1) ... Setting up libsvn1:amd64 (1.9.5-1+deb9u3) ... Setting up git (1:2.11.0-3+deb9u4) ... Setting up curl (7.52.1-5+deb9u9) ... Setting up subversion (1.9.5-1+deb9u3) ... Processing triggers for libc-bin (2.24-11+deb9u4) ... (base) root@2cae175410fc:/# pip install --upgrade pip Collecting pip Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 6.9MB/s Installing collected packages: pip Found existing installation: pip 18.1 Uninstalling pip-18.1: Successfully uninstalled pip-18.1 Successfully installed pip-19.1.1 (base) root@2cae175410fc:/# pip install openjij Collecting openjij Downloading https://files.pythonhosted.org/packages/32/fc/f7e98f470e1098a7cd9379145978a0aa44c2d6e4efd7e8d6f096f2398192/openjij-0.0.7.tar.gz (80kB) |████████████████████████████████| 81kB 2.7MB/s Requirement already satisfied: numpy in /opt/conda/lib/python3.7/site-packages (from openjij) (1.15.4) Requirement already satisfied: requests in /opt/conda/lib/python3.7/site-packages (from openjij) (2.21.0) Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (2.8) Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (2018.11.29) Requirement already satisfied: urllib3<1.25,>=1.21.1 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (1.24.1) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/conda/lib/python3.7/site-packages (from requests->openjij) (3.0.4) Building wheels for collected packages: openjij Building wheel for openjij (setup.py) ... error ERROR: Complete output from command /opt/conda/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-neuubmt1/openjij/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-hg81stwn --python-tag cp37: ERROR: running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.7/openjij creating build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.7/openjij/model creating build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler running build_ext Traceback (most recent call last): File "/tmp/pip-install-neuubmt1/openjij/setup.py", line 31, in run out = subprocess.check_output(['cmake', '--version']) File "/opt/conda/lib/python3.7/subprocess.py", line 389, in check_output **kwargs).stdout File "/opt/conda/lib/python3.7/subprocess.py", line 466, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/lib/python3.7/subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "/opt/conda/lib/python3.7/subprocess.py", line 1516, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-neuubmt1/openjij/setup.py", line 126, in <module> zip_safe=False File "/opt/conda/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/conda/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/conda/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 188, in run self.run_command('build') File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-neuubmt1/openjij/setup.py", line 34, in run ", ".join(e.name for e in self.extensions)) RuntimeError: CMake must be installed to build the following extensions: cxxjij ---------------------------------------- ERROR: Failed building wheel for openjij Running setup.py clean for openjij Failed to build openjij Installing collected packages: openjij Running setup.py install for openjij ... error ERROR: Complete output from command /opt/conda/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-neuubmt1/openjij/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-thdhqpvr/install-record.txt --single-version-externally-managed --compile: ERROR: running install running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/openjij copying openjij/__version.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/utils.py -> build/lib.linux-x86_64-3.7/openjij copying openjij/__init__.py -> build/lib.linux-x86_64-3.7/openjij creating build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/model.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/king_graph.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/__init__.py -> build/lib.linux-x86_64-3.7/openjij/model copying openjij/model/chimera_model.py -> build/lib.linux-x86_64-3.7/openjij/model creating build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/cmos_annealer.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/response.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/__init__.py -> build/lib.linux-x86_64-3.7/openjij/sampler copying openjij/sampler/gpu_sampler.py -> build/lib.linux-x86_64-3.7/openjij/sampler running build_ext Traceback (most recent call last): File "/tmp/pip-install-neuubmt1/openjij/setup.py", line 31, in run out = subprocess.check_output(['cmake', '--version']) File "/opt/conda/lib/python3.7/subprocess.py", line 389, in check_output **kwargs).stdout File "/opt/conda/lib/python3.7/subprocess.py", line 466, in run with Popen(*popenargs, **kwargs) as process: File "/opt/conda/lib/python3.7/subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "/opt/conda/lib/python3.7/subprocess.py", line 1516, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-neuubmt1/openjij/setup.py", line 126, in <module> zip_safe=False File "/opt/conda/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "/opt/conda/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/opt/conda/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/opt/conda/lib/python3.7/distutils/command/install.py", line 545, in run self.run_command('build') File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/opt/conda/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/opt/conda/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/opt/conda/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-neuubmt1/openjij/setup.py", line 34, in run ", ".join(e.name for e in self.extensions)) RuntimeError: CMake must be installed to build the following extensions: cxxjij ---------------------------------------- ERROR: Command "/opt/conda/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-neuubmt1/openjij/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-thdhqpvr/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-neuubmt1/openjij/
- 投稿日:2019-06-25T16:28:08+09:00
Selenium・Pythonを用いた動的Webサイトのスクレイピング(初心者用)
0 モチベーション
本稿は、スクレイピング初心者のPython使いを対象として書きました。筆者自身もスクレイピングの知識が不十分なところもあるかと思いますので、何かあればご指摘いただければと思います…。
スクレイピングに用いるモジュールとしては、urllibやbeautifulsoupなどがありますが、これらのモジュールでは動的なサイト(airbnbなど検索機能を用いたりする、javascriptなどを用いて構築されたサイト)は取得できません。
これらの動的なサイトのスクレイピングにはSeleniumが有用です。Seleniumは本来ウェブアプリケーションのテストのために開発されたソフトウェアであり、人間が実際にウェブを見る際の操作を模してくれるので、原理的にはどのようなサイトでもスクレイピング可能となります。全体の手順の流れとしては、
モジュールのインポート⇒ ウィンドウを開く⇒ スクレイピング要素の取得⇒ 要素からテキストの取得
となっており、その他付随して必要な操作も以下に追記します。なお、環境は、Windows、Pythonを想定して、chromeを使ってスクレイピングします。
1 インストール・インポート
インストールは
pip install selenium
によって行い、seleniumのスクレイピングに必要なモジュールは下記のようにインポートします。
- webdriver:ブラウザを作動させる
from selenium import webdriver
- options:ブラウザ閲覧時のオプション編集、ウィンドウサイズ設定等を行う
from selenium.webdriver.chrome.options import Options
- keys:キー入力操作を行う
from selenium.webdriver.common.keys import Keys
2 ウィンドウを開く
次はブラウザのウィンドウを開きます。このとき、閲覧時のオプションとウェブドライバの所在パスを指定します。(オプションは任意)
オプション・パスは下記のように指定します。from selenium import webdriver from selenium.webdriver.chrome.options import Options #ブラウザ閲覧時のオプションを指定するオブジェクト"options"を作成 options= Options() #必要に応じてオプションを追加 options.add_argument('...') #ドライバのpathを指定 path = 'C:/.../chromedriver' #ブラウザのウィンドウを表すオブジェクト"driver"を作成 driver = webdriver.Chrome(executable_path=path, chrome_options=options) driver.get(url)オプション
オプションとしては以下のようなものを用いたりします。
- headless:ブラウザを非表示のまま起動
options.add_argument('--headless')
- images Enabled=false:ブラウザの画像を非表示にする
options.add_argument('--blink-settings=imagesEnabled=false')
- windowsize=...:ウィンドウサイズを指定
options.add_argument('--window-size=1024,768')
参考:https://chida09.com/selenium-chrome-option/
path
下記リンクからchromedriverをインストールして格納、そのパスを指定します。
http://chromedriver.chromium.org/downloadsその他操作
ウィンドウを開く際は
driver.get(url)
ウィンドウを閉じる際は
driver.quit()
と操作します。コード例
airbnbのサイトをwindowサイズ(1024,768)、画像非表示で開いてみます。
from selenium import webdriver from selenium.webdriver.chrome.options import Options options = Options() #cromedriverの所在パス path = 'C:/.../chromedriver' options.add_argument('--window-size=1024,768') options.add_argument('--blink-settings=imagesEnabled=false') driver = webdriver.Chrome(executable_path=path, chrome_options=options) url = 'https://www.airbnb.jp' driver.get(url)3 スクレイピング要素の取得(xpathで取得)
指定したurlを開いた後、アクティブウィンドウに表示されているサイトの要素をスクレイピングすることができます。ここでは、最も有用と思われるxpathを用いた取得方法を中心に述べます。
xpathの取得方法
スクレイピングしたいサイトをchromeで開き、取得したいブラウザ上の場所を右クリックして「検証(I)」を選択します。
すると、画面の右側にHTMLソースが表示されます。青掛けで表示されるHTMLのコードをさらに右クリックし、
「Copy」⇒「Copy Xpath」を選択すると、該当箇所のxpathがコピーされた状態になります。xpathの構造
例えば、xpathは下記のような構造をしており、
//*[@id="listing-XXXXXXX"]/div/div[2]/div/span/a/div[1]/div[2]/div/div/div
/ごとに階層が分かれており、HTMLタグの種類が表示され、[]内の数字はそのタグを持つものの中で何番目の要素かということを示します。xpathを用いた検索方法
driver.find_elements_by_xpath("(上記のxpath)")
とすれば、求めるxpathの条件に適合する要素がリストで取得されます。検索時には先ほど取得したxpathをコピペしても良いですし、[]の部分を省略したり、一部のxpathを省略したうえで検索条件と組み合わせて、サイトの変更に対して頑強になるようにしても良いと思います。注:検索した要素はリストとして得られるので、その後は取得したリスト内の要素について操作を行います。
なお、find_element_by_xpath
とすれば、適合する要素の1つ目が取得されます。
注:htmlの要素にはさまざまな属性が付与されており、その属性を用いて要素を検索することも可能です。例えば、find_element_by_idでidでの検索、find_element_by_class_nameでclass_nameでの検索も可能です。
注:xpathのタグ部分を*
に変えれば、その階層の要素が何でも選択することができます。また、//を用いれば、それ以降のxpathが一致するすべてのxpathを検索することができます。
例://div
とすれば、ページに含まれるすべてのdivタグの要素が検索されます。
//div/*
とすれば、ページに含まれるすべてのdivタグの1階層下の要素が検索されます。参考: https://qiita.com/mochio/items/dc9935ee607895420186 , https://webbibouroku.com/Blog/Article/xpath
その他、便利な要素の検索方法
xpathによる検索と下記のような条件検索を組み合わせて使うこともできます。
div[...]
のように、タグの後ろに[(要素の満たす条件)]のように、追加条件を付記することができます。
テキストで検索
テキストが一致する:[text()="..."]
特定のテキストを含む:[contains(text(),"...")]
特定のテキストから始まる:[starts-with(text(),'')]
id, class, name等html要素の属性で検索
上記のテキスト検索と同様に行うことができます。
idが一致する:[@id='...']
id内に特定の文字を含む:[contains(@id,"...")]
idが特定の文字から始まる:[starts-with(@id,"")]
複数条件の組み合わせ
or や andを用いて、[]内の条件を組み合わせることもできます。
例:[@id="" and contains(text(),"")]
親要素、子要素の取得
取得した要素の上の階層の要素、あるいは下の階層の要素をさらに取得することもできます。
elementA = driver.find_elements_by_xpath("")
(Aの)親要素の取得(点ふたつで親階層を表します)
elementB = elementA.find_elements_by_xpath("..")
(Aの)子要素の取得
elementC = elementA.find_elements_by_xpath("./...")
元要素からの相対パスを書けば子要素が取得できます。参考:
seleniumでの要素の選択方法
https://qiita.com/VA_nakatsu/items/0095755dc48ad7e86e2f
containsなどのxml記法
https://webbibouroku.com/Blog/Article/xpathコード例
spaceeの検索結果画面で、「最後」という文字を含むリンクの要素を取得します。
from selenium import webdriver path = 'C:/.../chromedriver' driver = webdriver.Chrome(executable_path=path) url = 'https://www.spacee.jp/stations/1130208/listings' #テキストに「最後」を含む要素を選択します。クォーテーションを"と'の2種類使わないと正しく動かないことに注意してください。(違う部分が囲まれていると認識してしまうので) driver.get(url) elements = driver.find_elements_by_xpath("//*[contains(text(),'最後')]") element = elements[0]4 スクレイピング要素からテキスト、属性の取得
選択した要素に下記の関数を作用させれば、要素のテキスト、属性が取得できます。
- テキスト:.text()
- 属性:get_attribute('')例えば、上記のコードに
element.get_attribute('id')
とすれば要素のid属性が取得できます。コード例
airbnbで「ベトナム」と検索した結果のリスティングのID、それに付随するテキストをいくつか取得しました。
このように途中のxpathを省略して//*[...]
のように書くと、ソースの構造が若干変わった時でも影響を受けずに済みます。from selenium import webdriver path = 'C:/.../chromedriver' driver = webdriver.Chrome(executable_path=path) url = "https://www.airbnb.jp/s/homes?refinement_paths%5B%5D=%2Fhomes&query=ベトナム" driver.get(url) elements = driver.find_elements_by_xpath("//*[contains(@id,'listing-')]") for element in elements: print(element.get_attribute('id')) print(element.text)5 様々な操作
その他、seleniumでブラウザを操作するコマンドをまとめました。
- windowサイズを変える
指定したサイズに変更:driver.set_window_size(1250, 1036)
のようにする
最大サイズに変更:driver.maximize_window()
ブラウザのズーム比率を設定
driver.execute_script("document.body.style.zoom='50%'")
("driver"は、上記で開いたウェブブラウザのウィンドウのオブジェクト名)スクロール
(スクロールして表示ないとクリックできないようなボタンもあるため、必要となる)
actions = ActionChains(driver)
actions.move_to_element(element).perform()
クリック
element.click()
フォームを入力
element.send_keys(place)
element.send_keys(Keys.ENTER)
待機
何秒か明示的に待つ:time.sleep(3)
要素がロードされるまで待つ時間を指定:driver.implicitly_wait(10)
例:
driver.implicitly_wait(10)
driver.get("https://google.co.jp/)
のようにすれば、指定したurlを表示するまでに10秒間待つようになります。
特定の条件を満たすまで待つ:WebdriverWait(driver, 10).until(EC.title_contains("Google"))
例(urlを開き、タイトルに"Google"を含むページが現れるまで待機):
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver.get("https://www.google.co.jp")
WebDriverWait(driver, 10).until(EC.title_contains("Google"))ブラウザ操作
戻る:driver.back()
リフレッシュ:driver.refresh()参考:(様々な操作)https://qiita.com/mochio/items/dc9935ee607895420186
(待機)http://softwaretest.jp/labo/tech/labo-294/
https://a-zumi.net/python-selenium-wait-title-contains/コード例
Googleでキーワードを検索します。
from selenium import webdriver from selenium.webdriver.common.keys import Keys path = 'C:/.../chromedriver' driver = webdriver.Chrome(executable_path=path) url = 'https://www.google.com' driver.get(url) element = driver.find_element_by_xpath("//*[@id='tsf']//input[@title='検索']") element.send_keys('くま') element.send_keys(Keys.ENTER)コード例
airbnbのリスティングサイトでは、クリックしたいリンク先が画面内に表示されないとクリックできません。そのため、スクロールしてからクリックします。
from selenium.webdriver.common.action_chains import ActionChains import time path = 'C:/.../chromedriver' driver = webdriver.Chrome(executable_path=path, chrome_options=options) url = 'https://www.airbnb.jp/rooms/19740252?' driver.get(url) driver.maximize_window() element = driver.find_element_by_xpath("//*[contains(text(),'このエリア情報の続きを読む')]") time.sleep(3) ActionChains(driver).move_to_element(element).perform() #スクロールの微調整 driver.execute_script("window.scrollBy(0, 200);") time.sleep(3) element.click()6 retryの方法
スクレイピングの際には、サイトが応答せずエラーが出てしまうことがあり、何度か読み込みをリトライしないといけないことがあります。(おそらくスクレイピング対策として一定割合でページが読み込まれないようになっているのではないかと思います)もしくは、何らかの理由で操作上のエラーが出てくるけれど、操作をストップさせたくないときなど、例外処理が必要になると思います。
そんな時のために、下記2通りでリトライを試してもらえればと思います。retryモジュール
from retry import retry
としてモジュールをインポートしたうえで、サイトの読み込みを含む関数の前に@retry(tries=..., delay=...)
を書き加えるだけです。triesは試行回数でdelayは待ち時間です。@retry(tries=3,delay=5) #ページ読み込みを含んだ関数の定義 def readpage(): ... driver.get(url) ...try-except
要素の検索を含む関数を書くときに、要素が空だったために想定していた操作ができないときなど、エラーが出て操作がストップしてしまいます。そのような時のため(操作がストップしないため)、
try:
(エラーになるかもしれない操作)
except:
(エラーになったときの操作)
としておきます。
なお、出ると予想されたエラーに関する処理ができるように、関連するエラーのモジュールを予めインポートしておくことが必要です。
- ウィンドウが無いエラー:
from selenium.common.exceptions import NoSuchWindowException
- クリックしている要素が無い、などのエラー:
from selenium.common.exceptions import WebDriverException
- 操作が実行できず、タイムアウトになるエラー:
from selenium.common.exceptions import TimeoutException
コード例
from selenium.common.exceptions import TimeoutException elements = driver.find_elements_by_xpath("//*[...]") try: #要素のリストの1番目を取得して整数に変換 result = int(element[0]) except (TimeoutException): #リストが空だったりelement[0]が整数に変換できない場合、resultは0とする result = 0その他参考:
http://kyufast.hatenablog.jp/entry/2013/11/22/000718
https://tanuhack.com/python/selenium/
https://qiita.com/Taro56/items/7cb048f5e8e8bae192e0
- 投稿日:2019-06-25T16:23:38+09:00
networkxのランダム有向グラブの生成
あるエッジリストをもとにランダムな有向グラフを生成したいです。
import networkx as nx G = nx.read_edgelist(path, create_using=nx.DiGraph())#自己ループも多重辺も存在しない。ここで生成するランダム有向グラフの条件として
・Gのノード数と一致する
・GのノードのIn、Outの次数を保存している
・自己ループは存在して良いが多重辺は存在してはならない。よってGのエッジの数を保存している。A = nx.directed_configuration_model(in_degree_sequence, out_degree_sequence=, create_using=nx.DiGraph())上のコードを用い、ランダムグラフを生成しました。
この関数は普通、MultiDiGraphを返します。そのためDiGraphと指定しました。
しかし、この関数は、指定したグラフを生成するわけではなく、MultiDiGraphを生成した後にそれをDiGraphに直しているようです。
そのためノード数は一致しますが次数とエッジ数がGとは異なるランダム有向グラフを生成してしまいました。また
B = nx.directed_havel_hakimi_graph(in_deg_sequence, out_deg_sequence)この関数を使ったら条件を全て満たすことができますが、辺に偏りが生まれてしまうため
別の方法を用いて生成したい英語が読めないためhavel_hakimiが何かは謎
- 投稿日:2019-06-25T16:16:55+09:00
PythonでGoogleSpreadSheetのセルにコメントを付加したり色や枠線をつける
はじめに
PythonからGoogleSpreadSheetを操作するには gspread というのが便利です。
また、セルに色を付けたり枠線を付けたりするのに、 gspread-formatting というのが更にあって、これも便利です。ただ、gspread-formatting でも セルにコメントを付けることが標準だとできないんですが(たぶん)、色々調べているうちにやる方法がわかったのでご紹介します。
今回使った各Version
- Python3.7
- gspread==3.1.0
- gspread-formatting==0.0.6
色・枠線・コメント を付ける方法
色や枠線は、gspread-formatting の標準機能でできます。
色は公式サイトのサンプルに載っていますが、枠線はちょっと調べないとわからないので、ついでに紹介しておきます。色の付け方
from gspread_formatting import * fmt = cellFormat( backgroundColor=color(1, 0.9, 0.9), textFormat=textFormat(bold=True, foregroundColor=color(1, 0, 1)), horizontalAlignment='CENTER' ) format_cell_range(worksheet, 'A1:J1', fmt)変数
worksheet
は gspreadのWorksheet
Objectです。
Color
の引数の範囲は 0~1 ですね。枠線の付け方
枠線は、セルごと、「上」「下」「左」「右」ごと、に色や線種を指定することが可能っぽいです。
イメージとしては、
- 色や線種を
Border
というObjectで表現して、Borders(top, bottom, left, right)
の引数としてBorderを渡し、CellFormat(borders=...)
でセルごとにBorders
を指定するです。こんな感じになります。
b = Border("DOTTED", Color(0, 0, 0, 0)) fmt = CellFormat(borders=Borders(top=b)) format_cell_range(worksheet, 'A1:J1', fmt)セルコメントの付け方
さて、ここからが本題ですがコメントの付け方です。
SpreadsheetAPI ドキュメント の
RepeatCellRequest
のcell
の型を見てみると CellData となっていて、このCellData
はnote
という属性を持っています。なので、とにかく最終的にコメントを付けたい文字列をそこに与えてあげればいいわけです。
ということで、例えば以下のように使えるようにするために、
format_cell_ranges_with_note(worksheet, [("B2", CellFormatWithNote(note="Hello Note!!"))])以下のようなコードを書いておけばOKです。
from gspread_formatting import _range_to_gridrange_object, CellFormat def format_cell_ranges_with_note(worksheet, ranges): """Update a list of Cell object ranges of :class:`Cell` objects in the given ``Worksheet`` to have the accompanying ``CellFormat``. :param worksheet: The ``Worksheet`` object. :param ranges: An iterable whose elements are pairs of: a string with range value in A1 notation, e.g. 'A1:A5', and a ``CellFormat`` object). """ body = { 'requests': [ _build_repeat_cell_request_with_note(worksheet, range, cell_format) for range, cell_format in ranges ] } return worksheet.spreadsheet.batch_update(body) def _build_repeat_cell_request_with_note(worksheet, range, cell_format): from gspread_formatting import _range_to_gridrange_object # https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/cells#CellData cell_data = { 'userEnteredFormat': cell_format.to_props() } fields = cell_format.affected_fields('userEnteredFormat') if getattr(cell_format, "note") is not None: cell_data['note'] = str(getattr(cell_format, "note")) fields = fields + ["note"] return { 'repeatCell': { 'range': _range_to_gridrange_object(range, worksheet.id), 'cell': cell_data, 'fields': ",".join(fields), } } class CellFormatWithNote(CellFormat): _FIELDS = CellFormat._FIELDS def __init__(self, numberFormat=None, backgroundColor=None, borders=None, padding=None, horizontalAlignment=None, verticalAlignment=None, wrapStrategy=None, textDirection=None, textFormat=None, hyperlinkDisplayType=None, textRotation=None, note=None): super().__init__( numberFormat=numberFormat, backgroundColor=backgroundColor, borders=borders, padding=padding, horizontalAlignment=horizontalAlignment, verticalAlignment=verticalAlignment, wrapStrategy=wrapStrategy, textDirection=textDirection, textFormat=textFormat, hyperlinkDisplayType=hyperlinkDisplayType, textRotation=textRotation, ) self.note = noteさいごに
これでSpreadsheet芸の幅がひとつ増えました。
- 投稿日:2019-06-25T15:25:40+09:00
上場会社の有価証券報告書XBRLを取得して値を読み込む(改
1.elementTreeとlxml
上がelementTreeを使ったXNL文字列の読み込みおよびタグを閲覧し値を取得するスクリプト、下がlxmlを使ったXML文字列の読み込みおよびタグを閲覧し値を取得するスクリプト↓
a)ElementTreeを使ったスクリプト
test_elmtree.py# elementTreeを利用する from xml.etree import ElementTree def test_xml(): #XML文字列の生成 txt = '<?xml version="1.0"?><root xmlns="http://example.com/test" version="1.0">' txt = txt +'<language>ja</language><provider>John Doe</provider><entries>' txt = txt +'<entry><title>title 1</title><date>2011-07-27</date><body>日は晩景になりにたり</body></entry>' txt = txt +'<entry><title>title 3</title><date>2011-07-29</date><body>わが行く先は遥かなり</body></entry></entries></root>' print(txt) # XML文字列の読み込み root = ElementTree.fromstring( txt ) #nsmap = root.nsmap #print(nsmap) # タグの閲覧と値取得 for c1 in root: print(c1.tag) for c2 in c1: for c3 in c2: print(c3.tag, c3.text) # main if __name__ == '__main__': test_xml()b)lxmlを使ったスクリプト
test_lxml.py# lxmlを利用する from lxml import etree def test_xml(): #XML文字列の生成 txt = '<?xml version="1.0"?><root xmlns="http://example.com/test" version="1.0">' txt = txt +'<language>ja</language><provider>John Doe</provider><entries>' txt = txt +'<entry><title>title 1</title><date>2011-07-27</date><body>日は晩景になりにたり</body></entry>' txt = txt +'<entry><title>title 3</title><date>2011-07-29</date><body>わが行く先は遥かなり</body></entry></entries></root>' print(txt) # XML文字列の読み込み root = etree.fromstring( txt ) # namespaceを取得 nsmap = root.nsmap print(nsmap) # タグの閲覧と値取得 for c1 in root: print(c1.tag) for c2 in c1: for c3 in c2: print(c3.tag, c3.text) # main if __name__ == '__main__': test_xml()・lxmlでXMLオブジェクトを生成した場合、lxmlではsmapでXMLの名前空間を取得することが可能。
・elementTreeではXMLの名前空間が取得できない、というかlxmlのように名前空間を取得するファンクション等が用意されていない。2.lxmlを使ってXBRLファイルを読み込んで、名前空間を取得した上で、各タグを巡回して値を取得する
EDINET提出の(有報キャッチャーAPIで取得できる)XBRLファイルは名前空間が定義されているので、elementTreeではなくlxmlを使ったほうが、名前空間を簡単に取得することが可能ですよという話。
まずは修正前のelementTreeを用いたスクリプト。XBRLの名前空間をBeautifulSoupで該当文字列を取得。before_mod.pydef fn_parse(sic , xbrl_path): ### タクソノミーURLの取得(using beautiful Soup) ff = open( xbrl_path , "r" ,encoding="utf-8" ).read() soup = BeautifulSoup( ff ,"html.parser") x = soup.find_all("xbrli:xbrl" ) x = str(x)[0:2000] x = x.rsplit("xmlns") # 該当attr(crp)の取得 crp =['{' + i.replace( i[0:11] ,"").rstrip(' ').replace('"',"") + '}' for i in x[1:10] if i[0:11] == ':jpcrp_cor='] dei =['{' + i.replace( i[0:11] ,"").rstrip(' ').replace('"',"") + '}' for i in x[1:10] if i[0:11] == ':jpdei_cor='] crp,dei = crp[0] ,dei[0]前回XBRLファイルをElementTreeで読みこむスクリプトを書いた際は、名前空間の取得ができなくて、最初にBeautifulSoupでHTML文字列として名前空間定義箇所をFind_all()で読んで苦し紛れに名前空間を取得していた。これをlxmlを使って名前空間を取得するように修正したのが以下のスクリプト↓
test_xbrl.pyfrom lxml import etree import requests import os import zipfile import re import pandas as pd def fn_xbrl(sic,url): #XBRLダウンロード fn = str(sic) +".zip" os.system("wget -O " + str(fn) + " " + str(url)) # ZIP解凍 with zipfile.ZipFile( str(fn), 'r' ) as myzip: infos = myzip.infolist() for info in infos: base, ext = os.path.splitext(info.filename) if str(base).find('Public')>0 and ext == '.xbrl': myzip.extract(info.filename) # XBRLパース print('■' + info.filename) dict = fn_parse(sic , info.filename) def fn_srch(sic): # 有報キャッチャー検索 url='http://resource.ufocatch.com/atom/edinet/query/'+str(sic)+'0' r = requests.get(url) soup = BeautifulSoup( r.text,'html.parser') enty = soup.find_all("entry") for i in enty: ttl=i.find_all("title") # 有報のXBRL if str(ttl).find('有価証券報告書')>-1and str(ttl).find('訂正')==-1: lnks=i.find_all("link") print(ttl) print(lnks[0]) print(lnks[1]) url =lnks[1].get('href') fn = fn_xbrl(sic, url) if url !=''else 'hoge' def fn_parse(sic , xbrl_path): # XML項目の取得(using lxml) tree = etree.parse( xbrl_path ) root = tree.getroot() #名前空間を取得 nsmap = root.nsmap #print(nsmap) crp = '{' + str(nsmap["jpcrp_cor"]) + '}' dei = '{' + str(nsmap["jpdei_cor"]) + '}' pfs = '{' + str(nsmap["jppfs_cor"]) + '}' cnsl_emp, noncnsl_emp ,noncnsl_temp_emp = 0, 0, 0 #XMLのタグの閲覧取得 for c1 in root: if c1.tag==crp+'NumberOfEmployees': #連結従業員数 if c1.get("contextRef")=="CurrentYearInstant": if cnsl_emp != str(c1.text): cnsl_emp = str(c1.text) print( cnsl_emp ) #提出会社の従業員数 if c1.get("contextRef")=="CurrentYearInstant_NonConsolidatedMember": if noncnsl_emp != str(c1.text): noncnsl_emp = str(c1.text) print( noncnsl_emp ) #提出会社の臨時従業員数 if c1.tag==crp+'AverageNumberOfTemporaryWorkers': if c1.get("contextRef")=="CurrentYearInstant_NonConsolidatedMember": if noncnsl_temp_emp != str(c1.text): noncnsl_temp_emp = str(c1.text) print( noncnsl_temp_emp ) #提出会社の平均年齢 if c1.tag==crp+'AverageAgeYearsInformationAboutReportingCompanyInformationAboutEmployees': avg_age = str(c1.text) print( avg_age ) #提出会社の平均勤続年数 if c1.tag==crp+'AverageLengthOfServiceYearsInformationAboutReportingCompanyInformationAboutEmployees': avg_lgs = str(c1.text) print( avg_lgs ) #提出会社の平均年収 if c1.tag==crp+'AverageAnnualSalaryInformationAboutReportingCompanyInformationAboutEmployees': avg_sly = str(c1.text) print( avg_sly ) #(販管費の)研究開発費 <new!> if c1.tag==pfs+'ResearchAndDevelopmentExpensesSGA': if c1.get("contextRef")=="CurrentYearDuration": avg_sly = str(c1.text) print( avg_sly ) #有形固定資産及び無形固定資産の増加額(≒設備投資額) <new!> if c1.tag==crp+'IncreaseInPropertyPlantAndEquipmentAndIntangibleAssets': if c1.get("contextRef")=="CurrentYearDuration_ReportableSegmentsMember": avg_sly = str(c1.text) print( avg_sly ) # main if __name__ == '__main__': sic=8005 fn_srch(sic)・lxmlは、ElementTreeのラッパーライブラリ?のようなものらしいので、XBRLを読み込んでXMLオブジェクトを生成した後に各タグをループ文で閲覧していく箇所は同じように記述してタグの読み込みと値取得が可能。
・有価証券報告書のXBRLファイルを読み込むと、連結従業員数と非連結従業員数、臨時従業員数のタグが複数記述されている模様。1か所取得できればOkなので、変数格納時に1回取得できればいいように上記スクリプトでは微調整している。・上場企業の場合、有価証券報告書提出前に大抵適時開示情報のほう決算短信XBRLを開示しているので、財務項目の数値等は有価証券報告書をEDINET金融庁に提出する約1カ月前に決算短信で取得可能であり、理論上はその際に株価形成されて株価に織り込まれるはず?なので、有価証券報告書XBRLで財務項目の値を取得することはないものとみなし、上記では、決算短信XBRLでは取得できない有価証券報告書XBRLでしか取得できない項目を重点的に値を取得するように考えてみた。それが例えば、従業員の項目(連結非連結の従業員数、従業員の平均年齢、平均勤続年数、平均給与)と大株主の項目(大株主名、大株主の住所、保有株数と保有比率など)、あとは研究開発費と設備投資額の数値である。
・設備投資額の数値は、有価証券報告書XBRLでは「有形固定資産及び無形固定資産の増加額」というタグで値がセットされている。連結決算企業の場合、決算短信開示時点で、報告セグメントの表のところに記載されている場合があるが、短信XBRLレベルで設備投資額(有形固定資産及び無形固定資産の増加額)で値を取得できるかどうかは不明(未調査)。
- 投稿日:2019-06-25T15:25:40+09:00
上場会社の有価証券報告書XBRLを取得して値を読み込む(←主に名前空間の取得の部分を改良
1.elementTreeとlxml
上がelementTreeを使ったXML文字列の読み込みおよびタグを閲覧し値を取得するスクリプト、下がlxmlを使ったXML文字列の読み込みおよびタグを閲覧し値を取得するスクリプト↓
a)ElementTreeを使ったスクリプト
test_elmtree.py# elementTreeを利用する from xml.etree import ElementTree def test_xml(): #XML文字列の生成 txt = '<?xml version="1.0"?><root xmlns="http://example.com/test" version="1.0">' txt = txt +'<language>ja</language><provider>John Doe</provider><entries>' txt = txt +'<entry><title>title 1</title><date>2011-07-27</date><body>日は晩景になりにたり</body></entry>' txt = txt +'<entry><title>title 3</title><date>2011-07-29</date><body>わが行く先は遥かなり</body></entry></entries></root>' print(txt) # XML文字列の読み込み root = ElementTree.fromstring( txt ) #nsmap = root.nsmap #print(nsmap) # タグの閲覧と値取得 for c1 in root: print(c1.tag) for c2 in c1: for c3 in c2: print(c3.tag, c3.text) # main if __name__ == '__main__': test_xml()b)lxmlを使ったスクリプト
test_lxml.py# lxmlを利用する from lxml import etree def test_xml(): #XML文字列の生成 txt = '<?xml version="1.0"?><root xmlns="http://example.com/test" version="1.0">' txt = txt +'<language>ja</language><provider>John Doe</provider><entries>' txt = txt +'<entry><title>title 1</title><date>2011-07-27</date><body>日は晩景になりにたり</body></entry>' txt = txt +'<entry><title>title 3</title><date>2011-07-29</date><body>わが行く先は遥かなり</body></entry></entries></root>' print(txt) # XML文字列の読み込み root = etree.fromstring( txt ) # namespaceを取得 nsmap = root.nsmap print(nsmap) # タグの閲覧と値取得 for c1 in root: print(c1.tag) for c2 in c1: for c3 in c2: print(c3.tag, c3.text) # main if __name__ == '__main__': test_xml()・lxmlでXMLオブジェクトを生成した場合、lxmlではnsmapでXMLの名前空間を取得することが可能。
・elementTreeではXMLの名前空間が取得できない、というかlxmlのように名前空間を取得するファンクション等が用意されていない。2.lxmlを使ってXBRLファイルを読み込んで、名前空間を取得した上で、各タグを巡回して値を取得する
EDINET提出の(有報キャッチャーAPIで取得できる)XBRLファイルは名前空間が定義されているので、elementTreeではなくlxmlを使ったほうが、名前空間を簡単に取得することが可能ですよという話。
まずは修正前のelementTreeを用いたスクリプト。XBRLの名前空間をBeautifulSoupで該当文字列を取得。before_mod.pydef fn_parse(sic , xbrl_path): ### タクソノミーURLの取得(using beautiful Soup) ff = open( xbrl_path , "r" ,encoding="utf-8" ).read() soup = BeautifulSoup( ff ,"html.parser") x = soup.find_all("xbrli:xbrl" ) x = str(x)[0:2000] x = x.rsplit("xmlns") # 該当attr(crp)の取得 crp =['{' + i.replace( i[0:11] ,"").rstrip(' ').replace('"',"") + '}' for i in x[1:10] if i[0:11] == ':jpcrp_cor='] dei =['{' + i.replace( i[0:11] ,"").rstrip(' ').replace('"',"") + '}' for i in x[1:10] if i[0:11] == ':jpdei_cor='] crp,dei = crp[0] ,dei[0]前回XBRLファイルをElementTreeで読みこむスクリプトを書いた際は、名前空間の取得ができなくて、最初にBeautifulSoupでHTML文字列として名前空間定義箇所をFind_all()で読んで苦し紛れに名前空間を取得していた。これをlxmlを使って名前空間を取得するように修正したのが以下のスクリプト↓
test_xbrl.pyfrom lxml import etree import requests import os import zipfile import re import pandas as pd def fn_xbrl(sic,url): #XBRLダウンロード fn = str(sic) +".zip" os.system("wget -O " + str(fn) + " " + str(url)) # ZIP解凍 with zipfile.ZipFile( str(fn), 'r' ) as myzip: infos = myzip.infolist() for info in infos: base, ext = os.path.splitext(info.filename) if str(base).find('Public')>0 and ext == '.xbrl': myzip.extract(info.filename) # XBRLパース print('■' + info.filename) dict = fn_parse(sic , info.filename) def fn_srch(sic): # 有報キャッチャー検索 url='http://resource.ufocatch.com/atom/edinet/query/'+str(sic)+'0' r = requests.get(url) soup = BeautifulSoup( r.text,'html.parser') enty = soup.find_all("entry") for i in enty: ttl=i.find_all("title") # 有報のXBRL if str(ttl).find('有価証券報告書')>-1and str(ttl).find('訂正')==-1: lnks=i.find_all("link") print(ttl) print(lnks[0]) print(lnks[1]) url =lnks[1].get('href') fn = fn_xbrl(sic, url) if url !=''else 'hoge' def fn_parse(sic , xbrl_path): # XML項目の取得(using lxml) tree = etree.parse( xbrl_path ) root = tree.getroot() #名前空間を取得 nsmap = root.nsmap #print(nsmap) crp = '{' + str(nsmap["jpcrp_cor"]) + '}' dei = '{' + str(nsmap["jpdei_cor"]) + '}' pfs = '{' + str(nsmap["jppfs_cor"]) + '}' cnsl_emp, noncnsl_emp ,noncnsl_temp_emp = 0, 0, 0 #XMLのタグの閲覧取得 for c1 in root: if c1.tag==crp+'NumberOfEmployees': #連結従業員数 if c1.get("contextRef")=="CurrentYearInstant": if cnsl_emp != str(c1.text): cnsl_emp = str(c1.text) print( cnsl_emp ) #提出会社の従業員数 if c1.get("contextRef")=="CurrentYearInstant_NonConsolidatedMember": if noncnsl_emp != str(c1.text): noncnsl_emp = str(c1.text) print( noncnsl_emp ) #提出会社の臨時従業員数 if c1.tag==crp+'AverageNumberOfTemporaryWorkers': if c1.get("contextRef")=="CurrentYearInstant_NonConsolidatedMember": if noncnsl_temp_emp != str(c1.text): noncnsl_temp_emp = str(c1.text) print( noncnsl_temp_emp ) #提出会社の平均年齢 if c1.tag==crp+'AverageAgeYearsInformationAboutReportingCompanyInformationAboutEmployees': avg_age = str(c1.text) print( avg_age ) #提出会社の平均勤続年数 if c1.tag==crp+'AverageLengthOfServiceYearsInformationAboutReportingCompanyInformationAboutEmployees': avg_lgs = str(c1.text) print( avg_lgs ) #提出会社の平均年収 if c1.tag==crp+'AverageAnnualSalaryInformationAboutReportingCompanyInformationAboutEmployees': avg_sly = str(c1.text) print( avg_sly ) #(販管費の)研究開発費 <new!> if c1.tag==pfs+'ResearchAndDevelopmentExpensesSGA': if c1.get("contextRef")=="CurrentYearDuration": avg_sly = str(c1.text) print( avg_sly ) #有形固定資産及び無形固定資産の増加額(≒設備投資額) <new!> if c1.tag==crp+'IncreaseInPropertyPlantAndEquipmentAndIntangibleAssets': if c1.get("contextRef")=="CurrentYearDuration_ReportableSegmentsMember": avg_sly = str(c1.text) print( avg_sly ) # main if __name__ == '__main__': sic=8005 fn_srch(sic)・lxmlは、ElementTreeのラッパーライブラリ?のようなものらしいので、XBRLを読み込んでXMLオブジェクトを生成した後に各タグをループ文で閲覧していく箇所は同じように記述してタグの読み込みと値取得が可能。
・有価証券報告書のXBRLファイルを読み込むと、連結従業員数と非連結従業員数、臨時従業員数のタグが複数記述されている模様。1か所取得できればOkなので、変数格納時に1回取得できればいいように上記スクリプトでは微調整している。・上場企業の場合、有価証券報告書提出前に大抵適時開示情報の決算短信XBRLを開示しているので、財務項目の数値等は有価証券報告書をEDINET金融庁に提出する約1カ月前に決算短信で取得可能であり、理論上はその際に株価形成されて株価に織り込まれるはず?なので、有価証券報告書XBRLで財務項目の値を取得することはないものとみなし、上記では、決算短信XBRLでは取得できない有価証券報告書XBRLでしか取得できない項目を重点的に値を取得するように考えてみた。それが例えば、従業員の項目(連結非連結の従業員数、従業員の平均年齢、平均勤続年数、平均給与)と大株主の項目(大株主名、大株主の住所、保有株数と保有比率など)、あとは研究開発費と設備投資額の数値である。
・設備投資額の数値は、有価証券報告書XBRLでは「有形固定資産及び無形固定資産の増加額」というタグで値がセットされている。連結決算企業の場合、決算短信開示時点で、報告セグメントの表のところに記載されている場合があるが、短信XBRLレベルで設備投資額(有形固定資産及び無形固定資産の増加額)の値を取得できるかどうかは不明(未調査)。
- 投稿日:2019-06-25T14:20:24+09:00
pyfolioを使ってみる
はじめに
pyfolioとは
ポートフォリオのパフォーマンスやリスクの分析に役立つPythonライブラリで、3年ほど前にQuantopian Incからリリースされました。
主な機能は様々なグラフを描画して、ポートフォリオを全体像を分析を助けます。
(個々の複数のグラフをまとめたものをtear sheetと呼びます。)今回やること
https://github.com/quantopian/pyfolio/blob/master/pyfolio/examples/full_tear_sheet_example.ipynb
上記のURLを参考にtear sheetの作成してみます。
内容は、一つの銘柄の日次リターンをから様々な図を描画してtear sheetを作成する感じです。(本記事ではgoogleの株価を取得しています。)
上記URLのコードをそのまま実行してもエラーを吐くので注意です。
原因は、pyfolioがgoogle financeからデータを取得していることです。google financeは過去に公式APIの提供を終了していて、非公式のものが出回っていましが、その非公式APIが廃止されたことが原因のようです。
tear sheetの作成
環境
Google Colaboratory、Jupyter Notebookなど
ライブラリの準備
pyfolioのインストール
pip install pyfolio必要なライブラリをインポート
import pandas as pd import pyfolio as pf %matplotlib inline import warnings warnings.filterwarnings('ignore') import pandas_datareader.data as pdr
%matplotlib inline
はJupyter Notebookで、ノートブック上にグラフを描画する際に指定する記述です。
warnings
は実行結果対し特に影響のない警告の表示を消すためのライブラリです。臭いものには蓋をしましょう。
pandas_datareader
は株価を取得するときに使うライブラリです。株価だけでなく、インターネット上の様々なデータソースからデータの取得を行うことが可能です。株価データの取得
yahooo financeからgoogleの株価データを取得する
以下の一行でOKです
google = pdr.DataReader('GOOGL', 'yahoo', '2018/1/1', '2019/1/1')DataReaderの引数は4つで、
・name: 銘柄(str型もしくはstr型のlist)
・data_source: 取り出したい元(str型)
・start: 取得開始日(datetime型)
・end: 取得終了日(datetime型)
(これがないと入力した日付まで取得することになります)
となっています。データは以下のようなpandas.DataFrame型で取得されます。
head、tailを使ってはじめと終わりの5行を取り出しています。google.head(5)google.tail(5)日次リターンの算出
リターンを計算するために終値を使います。
tear sheetを作成するpyfolioのメソッドに渡すリターンのデータはpanda.Series型である必要があります。
cp_google = google['Close'] # cp は colse price の略続いて日次リターンの算出です。
日次リターンの計算式は以下のようになりますが、
(当日の終値 ÷ 全日の終値) - 1pandasのメソッドを使って簡単に取得できます。
return_google = cp_google.pct_change().dropna() #dropna() は1行目の欠損値処理tear sheetの描画
pf.create_returns_tear_sheet(return_google)と実行すると以下を出力します。
今後の展望
pyfolioには他にも色々なtear sheetがあるのでそれらの使い方を調査していきたいです。
また、tear sheetを使った分析方法も勉強して、高いパフォーマンスを発揮できるアルゴリズムを作りたいと考えています。
- 投稿日:2019-06-25T14:14:25+09:00
サイコロの数をランダムに生成して確率を出すプログラム
どうもHiroです。
なんと、会社でAzureNotebookが使えたのでpython打てるっていうねw
とりあえず、今、なんとなくサイコロを生成してくれるプログラムを作ってみました。python.pyimport random math = 10 #設定箇所、確率を求める際の個数 i = 0 ########################## dice_1 = 0# dice_2 = 0# dice_3 = 0#サイコロの目の数 dice_4 = 0# dice_5 = 0# dice_6 = 0# ########################## even = 0 #偶数のカウント odd = 0 #奇数のカウント while i < math: number = random.randint(1,6) i += 1 if number % 2 == 0: even += 1 else: odd += 1 if number == 1: dice_1 += 1 elif number == 2: dice_2 += 1 elif number == 3: dice_3 += 1 elif number == 4: dice_4 += 1 elif number == 5: dice_5 += 1 elif number == 6: dice_6 += 1 math_odd = float(odd) / float(math) #奇数の確率を求める math_even = float(even) / float(math) #偶数の確率を求める dice_1_avg = float(dice_1) / float(math)#目の確率 dice_2_avg = float(dice_2) / float(math) dice_3_avg = float(dice_3) / float(math) dice_4_avg = float(dice_4) / float(math) dice_5_avg = float(dice_5) / float(math) dice_6_avg = float(dice_6) / float(math) print("偶数の数は"+str(even)+"です") print ("奇数の数は"+str(odd)+"です") print(math_even) print(math_odd) print("1の目:"+str(dice_1)) print("2の目:"+str(dice_2)) print("3の目:"+str(dice_3)) print("4の目:"+str(dice_4)) print("5の目:"+str(dice_5)) print("6の目:"+str(dice_6)) print(dice_1_avg) print(dice_2_avg) print(dice_3_avg) print(dice_4_avg) print(dice_5_avg) print(dice_6_avg)まとめ
下のprintどうにかならんかなw
追記:@shiracamus さんがコメント欄でコードをきれいにしてくれています。ありがとうございます
- 投稿日:2019-06-25T13:42:43+09:00
pythonにおけるリストについての関数
未来電子テクノロジーでインターンをしている五味です。
プログラミング初心者であるため、内容に誤りがあるかもしれません。
もし、誤りがあれば修正するのでどんどん指摘してください。今回はpythonで使われる、リストについての関数をアウトプットします。
sort()
まず、 arr というリストを作っておく。
arr.sort()とすると、リスト内を昇順にソートできる。
reverse()
arr.reverse()これにより、リストを逆順にソートできる。
sortとreverseを順に使えば、降順にソートすることもできる。append()
arr.append()これにより、リストに要素を追加できる。
その際、()内に追加したい文字列や数値を書く。pop()
arr.pop()()内にリストのインデックスを書くことで、そのインデックスの要素を削除する。
たとえば、
arr.pop(12)
とすると、13番めの要素が削除される。
(インデックスは0から始まるから)
- 投稿日:2019-06-25T13:37:52+09:00
Python 3 で標準出力のブロックバッファリングを止める方法
Python の標準出力には3つのバッファリングモードがあります。
- バッファなし。バイナリモードとなり、データが即座に渡されます1。
- 行バッファリング。改行されるたびに、暗黙的にフラッシュします2。
- ブロックバッファリング。バッファが足りなくなるたびに書き出されます3。
デフォルトでは、インタラクティブだと行バッファリングとなり、それ以外だとブロックバッファリングとなります4。この記事では、ブロックバッファリングとなっている標準出力を、行バッファリングあるいはバッファリングなしに設定する方法を4つ紹介します。
python -u
python
コマンドに-u
引数を与えると、標準入出力及び標準エラー出力がすべてバッファリングなしになります1。ブロックバッファリングを止める最も簡単な方法です。一時的にバッファリングを止めた状態でスクリプトを実行したい場合に適しています。しかし、実行する度に設定する必要があるため、頻繁に使う場合はあまり良い選択肢ではありません。
PYTHONUNBUFFERED
環境変数
PYTHONUNBUFFERED
環境変数に空でない文字列を設定すると、-u
オプションを指定したときと同様の効果を得られます5。特定のマシンで起動される Python をすべてバッファリングなしに設定したい場合や、-u
引数を一々設定するのが面倒な場合に便利です。
sys.stdout
を置き換える
sys.stdout
にバッファリングモードを変更したファイルオブジェクトを格納することで、ブロックバッファリングを止める方法です。行バッファリングに設定する場合
import io import sys def line_buffered_text_io(stream): if not isinstance(stream, io.TextIOWrapper): return stream return io.TextIOWrapper(stream.buffer, encoding=stream.encoding, errors=stream.errors, line_buffering=True) sys.stdout = line_buffered_text_io(sys.stdout) sys.stderr = line_buffered_text_io(sys.stderr)
sys.stdout
をline_buffering
を有効にしたio.TextIOWrapper
で置き換えています。sys.stderr
も同様です。バッファリングなしに設定する場合
import io import sys def unbuffered_text_io(stream): if not isinstance(stream, io.TextIOWrapper): return stream raw = stream.buffer if isinstance(raw, io.BufferedIOBase): raw = raw.raw return io.TextIOWrapper(raw, encoding=stream.encoding, errors=stream.errors, write_through=True) sys.stdout = unbuffered_text_io(sys.stdout) sys.stderr = unbuffered_text_io(sys.stderr)
sys.stdout
をwrite_through
を有効にしたio.TextIOWrapper
で置き換えています。ただし、それだけだと下層のio.BufferedWriter
によってバッファリングされてしまうので、更に下層にあるio.FileIO
を取り出して対処しています。なお、
write_through
コンストラクタ引数は Python 3.3 以降でないと利用できないため6、それ未満のバージョンで使用する場合はwrite_through=True
を削除してください。問題点
ライブラリによって置き換え前の
sys.stdout
が保持されてしまうライブラリがインポート時に
sys.stdout
を保持してしまった場合、後でsys.stdout
を置き換えても意味がありません。そのため、ライブラリをインポートする前に置き換えを完了する必要があります。'isort:skip_file' import io import sys def unbuffered_text_io(stream): if not isinstance(stream, io.TextIOWrapper): return stream raw = stream.buffer if isinstance(raw, io.BufferedIOBase): raw = raw.raw return io.TextIOWrapper(raw, encoding=stream.encoding, errors=stream.errors, write_through=True) sys.stdout = unbuffered_text_io(sys.stdout) sys.stderr = unbuffered_text_io(sys.stderr) # sys.stdout を保持するライブラリのインポート import bottle # noqaただインポートを遅らせただけだと Linter に怒られたり、インポートの自動ソートが行われるため、noqa や isort:skip_file を追記する必要があります。
余談ですが、私は Bottle が
sys.stdout.write
を保持していることに気づかず1時間以上溶かしました(盲点でした...)。皆さんは同じ轍を踏まないように気をつけてください。
sys.__stdout__
ちなみに、置き換え前のファイルオブジェクトは
sys.__stdout__
でいつでも参照できます。そのため、もしライブラリがsys.__stdout__
を参照している場合は、sys.stdout
を置き換えても意味がありません(そんなライブラリがあるかどうかは分かりません)。
sys.stdout.reconfigure
Python 3.7 以降では
io.TextIOWrapper
にreconfigure
というメソッドが追加されています7。これを使えば、既存のオブジェクトを置き換えずにバッファリングモードを変更することができます。import sys sys.stdout.reconfigure(line_buffering=True) sys.stderr.reconfigure(line_buffering=True)これで行バッファリングになります。インポート順序等を考えずに済むのでラクチンです。
ちなみに、
reconfigure
にはwrite_through
引数がありますが、有効にしても下層のio.BufferedWriter
によってバッファリングされてしまうので意味がありません。〆
4つの中から状況にあった方法を選んで、バッファリングモードを変更すると良いでしょう。
io.TextIOWrapper の
line_buffering
コンストラクタ引数を参照。 ↩
- 投稿日:2019-06-25T13:25:55+09:00
【ポケモンバトルAI】超簡易ポケモンバトルをゼロから学習させてみる【強化学習】
タイトル通りです。
深層学習 + 強化学習を用いて、ポケモンバトルをaiに学習させます。今回のポケモンバトルのルール/環境
使えるポケモン及び技は以下の通り
ポケモン名 技1 技2 フシギダネ たいあたり つるのムチ ゼニガメ みずでっぽう ヒトカゲ ひのこ ピカチュウ でんきショック
- シングルバトル
- アイテム無し
- 技を使用してもPPは減らない
- ダメージ乱数は常に100%
- 急所無し
- 特性は発動しない
- 技の追加効果は発動しない
その他は現行のポケモンバトルと同じルールです。
学習させる内容
- パーティ編成~ポケモン選出時~ゲーム終了までの期待勝率(評価値)
- バトル時の技選択/交代などのコマンドの推移確率
ネットワーク構造
- CNNを使わないニューラルネットワーク
- 入力サイズ 12537 (バイナリ表現)
- 1層目 128サイズの積和演算 → batch_normailzation → lrelu → dropout
- 2層目 1層目と同じ
ここから先は評価値の重み付けとバトル時のコマンド推移確率の重み付けを枝分かれさせます。(Alpha Zeroでも使われたDualNetwork構造)
以下 評価値に関連する部分はvalue バトル時の推移確率に関連する部分はpolicyと表現します。
- value3層目 64サイズの積和演算 → batch_normailzation → lrelu → dropout
value出力層 2サイズの積和演算 → softmax出力
policy3層目 value3層目と同じ
policy出力層 6サイズの積和演算 → softmax出力
valueネットワークはtanhやsigmoidが一般的ですが、今回はsoftmaxを使用しています。
0番目の出力を自身の勝率 1番目の出力を相手の勝率として表現します。policyネットワークは以下の行動の価値を示します。
- 技1の使用
- 技2の使用
- 技3の使用
- 技4の使用
- 2番目のポケモンと交代
- 3番目のポケモンと交代
※今回のルールでは、3番目と4番目の行動価値は存在する意味はありません。
特徴入力の詳細
※実装の都合上、今回のルールでは、意味のない特徴量も存在します。
特徴入力は0と1のみで表現します。
入力範囲 特徴 無しを含むかどうか 0~4 ポケモン名1 含む 5~9 ポケモン名2 含む 10~14 ポケモン名3 含む ... ... ... 25~29 ポケモン名6 含む ※無しを含むかどうかというのは、自己対局の欄で説明します。
特徴名の順番は以下のようになっています。
- なし
- フシギダネ
- ヒトカゲ
- ゼニガメ
- ピカチュウ
もし以下のようなパーティの評価をしたいとします。
- フシギダネ
- ピカチュウ
- ゼニガメ
- 無し
- 無し
- 無し
この場合は、1番目・9番目・13番目・15番目・20番目・25番目に1を入力するという感じになります。
後は同じように、
ポケモン1に関する特徴入力をする。
↓
入力範囲をずらしてポケモン2に関する特徴入力する。
↓
入力範囲をずらしてポケモン3に関する特徴入力する。
という風に続いてきます。一つ一つ丁寧に書いていくと長くなるので、ここからはポケモン1~6を省略して記述していきます。
また特徴量の種類数がわかれば、入力範囲もわかるので、入力範囲も省略し、特徴量の種類のみを記述します。
- 名前(なし/フシギダネ/ヒトカゲ/ゼニガメ/ピカチュウ)
- レベル(1~50)
- 特性(しんりょく/ようりょくそ/もうか/サンパワー/げきりゅう/あめうけざら)
- 性格(25種類)
- 性別(♂/♀/不明)
- 持ち物(なし/くろいヘドロ/でんきだま)
- 技1(なし/たいあたり/つるのムチ/ひのこ/みずでっぽう/でんきショック)
- 技2
- 技3
- 技4
- 技1のポイントアップ(0~3)
- 技2のポイントアップ
- 技3のポイントアップ
- 技4のポイントアップ
- HP個体値(0~31)
- 攻撃個体値
- 防御個体値
- 特攻個体値
- 特防個体値
- 素早さ個体値
- HP努力値(0~252)
- 攻撃努力値
- 防御努力値
- 特攻努力値
- 特防努力値
- 素早さ努力値
ここまではパーティ構築に関する特徴量です。
ここから先は主に、互いにパーティを見せあいして、ポケモンを選出するまでに使用する特徴量になります。
- 相手のポケモンの名前
- 相手のポケモンのレベル
- 相手のポケモンの性別
- 相手のアイテム所持の有無(なし/あり)
- 選出する先頭のポケモン(長さ6)
- 選出する控え1のポケモン
- 選出する控え2のポケモン
名前・レベル・性別に関してはパーティ構築と同じ種類数です。アイテム所持に関しては、見せあい段階では、持っているか持っていないかしかわからないので、2種類になります。
選出するポケモンは、自分のパーティの位置を元に特量入力します。
例えば、パーティのポケモン名の特徴量の並びが以下の通りとします。
- ゼニガメ
- ピカチュウ
- フシギダネ
- ヒトカゲ
そして以下の並びで選出した場合の評価値が知りたいとします。
- ピカチュウ
- フシギダネ
- ゼニガメ
この場合、選出する先頭のポケモンの1番目・選出する控え1のポケモンの2番目・選出する控え2のポケモンの0番目に1を入力します。
その為、入力の長さは 6種類 * 3 の計18になります。ここまでが見せあい~選出に関する特徴入力になります。
最後は、バトル開始~バトル終了までの特徴入力です。
- 自分の現在の先頭のポケモン(パーティの位置を元にする)
- 控え1のポケモン
- 控え2のポケモン
- 自分の先頭のポケモンの現在のHP(長さ152)
- 控え1のポケモンの現在のHP
- 控え2のポケモンの現在のHP
- 相手の先頭のポケモン(相手のパーティの位置を元にする(長さ6))
- 相手の控えのポケモン(一度でも場に出た場合のみ入力)(相手のパーティの位置を元にする)
- 相手の現在のHP%(一度でも場に出たポケモンのみ入力)(相手のパーティの位置を元にする)(長さ6 * 100)
自分の先頭のポケモン・控えのポケモンに関しては選出の特徴入力と同じです。
今回のルールではあり得る最大HPが152なので、味方の現HPを表す特徴入力の長さは、152 * 3 の計456になります。相手の控えのポケモンの情報は一度でも場に出た場合のみ入力し、相手のポケモン控え1・相手のポケモン控え2と入力範囲分けずに、同じ範囲に入力します。
何故かという理由は以下の通りです。
- 自分視点から見て、相手の控え1・控え2はどちらであるかがわからない
- わかったとしても、入力をわける意味は薄い(どの順番で控えていようが同じである為)
- 同じポケモンが使えないルールであれば、同じ場所に入力してしまう事がないので、一つの入力範囲にまとめれば、計算量を削れる。
などが挙げられます。
その為、相手の先頭のポケモン + 控えのポケモンの特徴入力の長さは、6 + 6 の計12になります。ちなみに、自分の控えのポケモンの位置はpolicyで行動価値を示す場合に必要となってきます。
自己対局の流れ
※valueにはパーティ構築~バトル終了までの評価を学習させていますが、今回の場合は、バトル時の評価値はただ学習させるだけであってないようなものです。同様にpolicyも学習させるだけで、対局時に使用する事はありません。
初めに、1つのネットワークで2つのパーティを作成します。
その際、1手先の評価値を全て探索し、パーティ構築を進めていきます。例えば、パーティの最初のポケモンを選択する場合は
- 0番目にのみ1を入力した入力値
- 1番目にのみ1を入力した入力値
- 2番目にのみ1を入力した入力値
- 3番目にのみ1を入力した入力値
- 4番目にのみ1を入力した入力値
の計5つの入力値をバッチにまとめてネットワークに流し込み、評価が一番良かった(実際には乱数が含まれている)入力値を採用します。
ここでは1番目に1を入力した入力値(フシギダネ)が最大値だったとします。次に、2番目のポケモンを選択する場合は(同じポケモンは採用出来ない事に注意)
- 1番目と5番目に1を入力した入力値
- 1番目と7番目に1を入力した入力値
- 1番目と8番目に1を入力した入力値
- 1番目と9番目に1を入力した入力値
の計4つ入力値を用意し、同じように、バッチにまとめてネットワークに流し込み評価を見て、また採用するポケモンを決めます。
ポケモン6匹を採用したら、今度はレベルの評価値を見て、レベルを決める...という事を繰り返していきます。
ポケモンのパラメーターを決めていく順番は
- レベル
- 特性
- 性格
- 性別
- 持ち物
- 技1
- 技2
- 技3
- 技4
- 技1のポイントアップ
- 技2のポイントアップ
- 技3のポイントアップ
- 技4のポイントアップ
- HP個体値
- 攻撃個体値
- 防御個体値
- 特攻個体値
- 特防個体値
- 素早さ個体値
- HP努力値
- 攻撃努力値
- 防御努力値
- 特攻努力値
- 特防努力値
- 素早さ努力値
になります。
但し、努力値だけは、HP~素早さをランダムにシャッフルして順番を決めます。何故なら努力値は合計510までと決められているので、上から順番に決めていくと、偏りが出てしまう恐れがあるからです。
また、同じ技を覚えさせてはいけないなどのポケモンのルールに従って行動します。
もしポケモンを採用しない場合(なしを選択した場合)は、その枠のポケモンのパラメーターには何も入力しません。
特徴入力の詳細に記述した、なしを含むかどうかについて意味は、なしが含むものは、選択しないという選択を自らの意志で選んだものであり、何も入力されていない部分に関しては、ポケモンがそもそも選択されなかったから何も選べない、技を1つしか選んでないからポイントアップも1つしか選択出来ないといった具合に、それが自分の意志で選択しなかったのか、ルール的に選択不能だから選択しなかったのかを明確に区別する為のものです。
パーティ構築が完了したら、今度は互いの入力値に互いのパーティの情報を入力します。
次に、選出する先頭のポケモン・選出する控え1のポケモン・選出する控え2のポケモンの入力範囲に全て同時かつ総当たりで入力します。
そしてバッチにまとめて評価値を出力し、選出するポケモンを決めます。バトルが開始したらモンテカルロシュミレーション(uctアルゴリズム)を行い最大訪問回数を選択しながら対戦を進めていきます。
ポケモンは不完全情報公開ゲームである為、実際の対局では、モンテカルロをそのまま使う事は難しいですが、policyに学習させる分には、問題ないだろうという事で、モンテカルロを使用しました。要は、学習時はカンニングした状態の最善手を教えてもらい、実際の対局で、その最善手を予測するのが狙いです。
※モンテカルロuctについては各自で調べていただくか僕の記事(笑)を参照。
モンテカルロの設定は以下の通りです。
試行回数 定数X ノード展開の有無 その局面の合法手 * 128 1 なし モンテカルロ探索は、ノードを展開しながらシュミレーションを進めるのが普通ですが、ポケモンでは互いに同じ手を選んでも別の局面に辿りつく場合があり、実装するのがかなり面倒...という理由で今回はノード展開はなしにしました。
一応、展開無しでも原始モンテカルロよりかは強い事は確認出来ました。
対戦が終了したら、パーティ構築~バトル終局までに現れた局面(入力値)全てを教師データとして学習させます。
valueには、勝った場合は[1, 0] 負けた場合は[0, 1]のone hot labelを与えます。
policyには、勝ち負け関係なく、モンテカルロで訪問した回数に応じた値(訪問回数を温度パラメーター1のボルツマン分布に変換した値)をそのまま正解ラベルとして与えます。
"""とある方からツイッターで頂いたコード""" def boltzmann_distribution(array, temperature_parameter): return array ** (1 / temperature_parameter) / np.sum(array ** (1 / temperature_parameter))最適化手法はAdaBoundOptimizerを使用しました。
この最適化手法はAdamの初期学習の速さ + SGDやMomentumの汎化性能の高さの良いとこどりをしたものらしいです。
この最適化手法の実装は、此方のコードを丸コピーして使わせていただきました。また直近64試合分のデータを記録しておき、64試合毎に
バッチサイズ16、64試合分のデータを1.5回見る割合でミニバッチ学習をさせます。おおまかな流れはこんな感じですが、これに加えて以下のような事も行っています。
その1. パーティ構築は、一定の確率で温度パラメータ0.075のボルツマン分布に従って行動する。
パーティ構築のランダム行動は、ランダムで行動する/しないを一定確率(初期は50%)でランダム選択し、ランダム行動すると選択した場合は、パーティ構築の全ての行動をボルツマン分布でランダム行動します。
その2. 勝利した側は同じパーティは続けて使用する。
勝利した側のパーティを続けて使用する事で、そのパーティが本当に強いパーティであれば、強いパーティであると素早く学習する事が可能です。
もしそのパーティが弱い場合は、すぐに負けるはずなので、弱いパーティを強いパーティとして使い続ける事はありません。また、私の環境下では、パーティを構築させるのに3秒から3.5秒かかってしまうのですが、この時間を省く事が出来ます。学習の結果(2)
うまく学習出来ているかどうかを確認する指標はいくつかあると思いますが、今回は、勝敗の結果に最も大きく関わるであろう選出したポケモンの平均レベルと、policyがモンテカルロの最大訪問数をどの程度予知出来ているのかをグラフで見ます。
特にレベルは、ゼロから学習させる上では、最初の壁であるように思います。
何故ならいくらバトルコマンドが正確であったとしてもレベル50 * 3匹 vs レベル1 * 3匹 のように極端にレベル差開いてしまうと勝つ事はほぼ不可能であり、逆にレベル差が開いていれば多少雑なプレイをしても勝ててしまいます。
その為、とりあえず高レベルなポケモンを使用するという事を学習出来ないと始まらないように思えます。グラフを分けている意味は特にありませんが、パーティ構築時のランダム選択は上から順に、50% 50% 20% 20% 5%になっています。
平均レベルは最大50から最大1.0に変換しています。最終モデル+ランダム行動なしのパーティ構築
※今回のルールで意味があるパラメーターのみ記載
ポケモン名 レベル 性格 個体値 努力値 技1 技2 フシギダネ 48 すなお 17, 30, 30, 20, 30, 31 195, 9, 51, 209, 23, 12 たいあたり なし ヒトカゲ 49 きまぐれ 1, 7, 18, 10, 28, 3 182, 12, 60, 64, 127, 9 ひのこ ピカチュウ 50 おくびょう 0, 27, 5, 25, 17, 23 13, 2, 174, 40, 205, 0 でんきショック ゼニガメ 49 おっとり 30, 23, 8, 10, 18, 25 0, 186, 142, 118, 36, 4 みずでっぽう レベルに関してはそこそこ、他はまだまだと言った所ですね...
改善点/将来に向けて
考えられる改善点はいくつかあります。
まずは、モンテカルロを展開ありにする事ですね。
その方が明らかに強くなるので。次にチーム構築時のランダム行動です。
強化学習のランダム行動は、greedyもよく使われますが、学習が進むにつれてランダム行動を減らしていく、というチューニングが面倒であった為、ボルツマン選択であれば、勝手に行動価値に応じてランダム行動してくれる→チューニング不要!やったぜ!とか思っていたんですが、どうやら甘かったようです。今回のグラフがガタガタなのはランダム行動のチューニングがうまくいっていないのが原因だと思います。
パーティ構築時にランダム行動をすると決定した場合は、パーティ構築の全ての行動にランダム要素を入れるという事をしていましたが、これもよろしくなく、N回ランダム要素を取り入れるとかにした方が、細かく調整出来ますし、より最適化しようと思ったらその微調節のようなランダムが必要になってくると思います。次に考えられる点は、入力層の次元削減です。
例えば、今回はポケモン1~6を別々の入力範囲としてましたが、そもそも同じポケモンを選択する事は出来ない為、入力範囲は同じでも被る事はありません。なしを選択する場合は、同じ場所になってしまう為、なしの数を入力する場所は必要になってきますが。同様に同じ技も選択する事が出来ないので、入力範囲を一つにまとめる事が出来そうです。順番は固定になってしまいますが、パーティ構築の際のポケモン・技の並びはどの順番であっても出来る事は変わりません。
パーティ構築のおけるポケモン1~3や技の1はルール上なしを選択する事が出来ないので、この部分も削れそうです。
このあたりは実装のしやすさやわかりやすさを優先しました。バトル時の特徴量にも抜け目があります。
今回は、味方の並び、味方のHP、相手の並び、相手のHPを特徴量としていましたが
、他にも、味方の先頭のポケモンの技1が相手の先頭のポケモンに今までどのくらいダメージを与えたのかとか、逆に相手からどのくらいダメージを受けたのとかの情報も本来であれば必要ですし、もっと言うのであれば、先頭同士の情報だけではなく、過去の局面から洗い出せる情報は全て特徴量にすべきです。(先手後手の結果や相手がどの技を所持していたのかとか、逆に自分は相手に対してどの情報を公開しているのかなどなど)
結局この辺りも実装が面倒でしませんでしたが、本格的に学習させたいのであれば、やはり必要です。今回は、モンテカルロの結果を学習させましたが、元々はポリシー同士の対局で勝ったらの勝ちの報酬を与えて、負けたら負けの報酬を与えるという方法で学習させて強くしていくつもりでした。その方が0からの学習感がしていいので。
しかしうまく学習出来ず、色々考えてもよさげな方法が見つからなかったので、諦めていたんですが、いい感じの方法を思いついたのでそれなりにうまくいったらその事についても書こうと思います。最後にバトル時の探索についてです。
しばらくの間はpolicyの強化でバトルコマンドの精度を上げる事を考えてるのですが、最終的にはバトル時の探索も必要になってくるかもしれません。
前にも書いたように、ポケモンは不完全情報ゲームである為、通常の探索手法は使えません。そこで、私が考えているのは、現局面でわかっている相手の情報を元に、ネットワークに何種類かの有望なパーティを構築させて、その作成したパーティをランダムでサンプリングし、モンテカルロなどのシュミレーションを行うという手法です。この方法であれば、パーティの評価値の精度さえ上がれば、割とうまくいくんじゃないかなと思っています。ただし、これを本格的に試そうと思ったらそれなりの計算資源が必要になりそうです...手元のPCがせいぜいミドルスペックなので、気軽には試せないというのが現状です。というわけでずっとしたい思っていたポケモンバトルの強化学習の始めの一歩を何とか踏み出せました。今の人生の目標は、ポケモンソード・シールドが発売するまでに、基盤を作る事です。もし興味がいる人がいれば一緒に作って、コンピューター将棋みたいに盛り上がったら嬉しいなと思っています。
- 投稿日:2019-06-25T13:25:55+09:00
【ポケモン ai】超簡易ポケモンバトルをゼロから学習させてみる【強化学習】
タイトル通りです。
深層学習 + 強化学習を用いて、ポケモンバトルをaiに学習させます。今回のポケモンバトルのルール/環境
使えるポケモン及び技は以下の通り
ポケモン名 技1 技2 フシギダネ たいあたり つるのムチ ゼニガメ みずでっぽう ヒトカゲ ひのこ ピカチュウ でんきショック
- シングルバトル
- アイテム無し
- 技を使用してもPPは減らない
- ダメージ乱数は常に100%
- 急所無し
- 特性は発動しない
- 技の追加効果は発動しない
その他は現行のポケモンバトルと同じルールです。
学習させる内容
- パーティ編成~ポケモン選出時~ゲーム終了までの期待勝率(評価値)
- バトル時の技選択/交代などのコマンドの推移確率
ネットワーク構造
- CNNを使わないニューラルネットワーク
- 入力サイズ 12537 (バイナリ表現)
- 1層目 128サイズの積和演算 → batch_normailzation → lrelu → dropout
- 2層目 1層目と同じ
ここから先は評価値の重み付けとバトル時のコマンド推移確率の重み付けを枝分かれさせます。(Alpha Zeroでも使われたDualNetwork構造)
以下 評価値に関連する部分はvalue バトル時の推移確率に関連する部分はpolicyと表現します。
- value3層目 64サイズの積和演算 → batch_normailzation → lrelu → dropout
value出力層 2サイズの積和演算 → softmax出力
policy3層目 value3層目と同じ
policy出力層 6サイズの積和演算 → softmax出力
valueネットワークはtanhやsigmoidが一般的ですが、今回はsoftmaxを使用しています。
0番目の出力を自身の勝率 1番目の出力を相手の勝率として表現します。policyネットワークは以下の行動の価値を示します。
- 技1の使用
- 技2の使用
- 技3の使用
- 技4の使用
- 2番目のポケモンと交代
- 3番目のポケモンと交代
※今回のルールでは、3番目と4番目の行動価値は存在する意味はありません。
特徴入力の詳細
※実装の都合上、今回のルールでは、意味のない特徴量も存在します。
特徴入力は0と1のみで表現します。
入力範囲 特徴 無しを含むかどうか 0~4 ポケモン名1 含む 5~9 ポケモン名2 含む 10~14 ポケモン名3 含む ... ... ... 25~29 ポケモン名6 含む ※無しを含むかどうかというのは、自己対局の欄で説明します。
特徴名の順番は以下のようになっています。
- なし
- フシギダネ
- ヒトカゲ
- ゼニガメ
- ピカチュウ
もし以下のようなパーティの評価をしたいとします。
- フシギダネ
- ピカチュウ
- ゼニガメ
- 無し
- 無し
- 無し
この場合は、1番目・9番目・13番目・15番目・20番目・25番目に1を入力するという感じになります。
後は同じように、
ポケモン1に関する特徴入力をする。
↓
入力範囲をずらしてポケモン2に関する特徴入力する。
↓
入力範囲をずらしてポケモン3に関する特徴入力する。
という風に続いてきます。一つ一つ丁寧に書いていくと長くなるので、ここからはポケモン1~6を省略して記述していきます。
また特徴量の種類数がわかれば、入力範囲もわかるので、入力範囲も省略し、特徴量の種類のみを記述します。
- 名前(なし/フシギダネ/ヒトカゲ/ゼニガメ/ピカチュウ)
- レベル(1~50)
- 特性(しんりょく/ようりょくそ/もうか/サンパワー/げきりゅう/あめうけざら)
- 性格(25種類)
- 性別(♂/♀/不明)
- 持ち物(なし/くろいヘドロ/でんきだま)
- 技1(なし/たいあたり/つるのムチ/ひのこ/みずでっぽう/でんきショック)
- 技2
- 技3
- 技4
- 技1のポイントアップ(0~3)
- 技2のポイントアップ
- 技3のポイントアップ
- 技4のポイントアップ
- HP個体値(0~31)
- 攻撃個体値
- 防御個体値
- 特攻個体値
- 特防個体値
- 素早さ個体値
- HP努力値(0~252)
- 攻撃努力値
- 防御努力値
- 特攻努力値
- 特防努力値
- 素早さ努力値
ここまではパーティ構築に関する特徴量です。
ここから先は主に、互いにパーティを見せあいして、ポケモンを選出するまでに使用する特徴量になります。
- 相手のポケモンの名前
- 相手のポケモンのレベル
- 相手のポケモンの性別
- 相手のアイテム所持の有無(なし/あり)
- 選出する先頭のポケモン(長さ6)
- 選出する控え1のポケモン
- 選出する控え2のポケモン
名前・レベル・性別に関してはパーティ構築と同じ種類数です。アイテム所持に関しては、見せあい段階では、持っているか持っていないかしかわからないので、2種類になります。
選出するポケモンは、自分のパーティの位置を元に特量入力します。
例えば、パーティのポケモン名の特徴量の並びが以下の通りとします。
- ゼニガメ
- ピカチュウ
- フシギダネ
- ヒトカゲ
そして以下の並びで選出した場合の評価値が知りたいとします。
- ピカチュウ
- フシギダネ
- ゼニガメ
この場合、選出する先頭のポケモンの1番目・選出する控え1のポケモンの2番目・選出する控え2のポケモンの0番目に1を入力します。
その為、入力の長さは 6種類 * 3 の計18になります。ここまでが見せあい~選出に関する特徴入力になります。
最後は、バトル開始~バトル終了までの特徴入力です。
- 自分の現在の先頭のポケモン(パーティの位置を元にする)
- 控え1のポケモン
- 控え2のポケモン
- 自分の先頭のポケモンの現在のHP(長さ152)
- 控え1のポケモンの現在のHP
- 控え2のポケモンの現在のHP
- 相手の先頭のポケモン(相手のパーティの位置を元にする(長さ6))
- 相手の控えのポケモン(一度でも場に出た場合のみ入力)(相手のパーティの位置を元にする)
- 相手の現在のHP%(一度でも場に出たポケモンのみ入力)(相手のパーティの位置を元にする)(長さ6 * 100)
自分の先頭のポケモン・控えのポケモンに関しては選出の特徴入力と同じです。
今回のルールではあり得る最大HPが152なので、味方の現HPを表す特徴入力の長さは、152 * 3 の計456になります。相手の控えのポケモンの情報は一度でも場に出た場合のみ入力し、相手のポケモン控え1・相手のポケモン控え2と入力範囲分けずに、同じ範囲に入力します。
何故かという理由は以下の通りです。
- 自分視点から見て、相手の控え1・控え2はどちらであるかがわからない
- わかったとしても、入力をわける意味は薄い(どの順番で控えていようが同じである為)
- 同じポケモンが使えないルールであれば、同じ場所に入力してしまう事がないので、一つの入力範囲にまとめれば、計算量を削れる。
などが挙げられます。
その為、相手の先頭のポケモン + 控えのポケモンの特徴入力の長さは、6 + 6 の計12になります。ちなみに、自分の控えのポケモンの位置はpolicyで行動価値を示す場合に必要となってきます。
自己対局の流れ
※valueにはパーティ構築~バトル終了までの評価を学習させていますが、今回の場合は、バトル時の評価値はただ学習させるだけであってないようなものです。同様にpolicyも学習させるだけで、対局時に使用する事はありません。
初めに、1つのネットワークで2つのパーティを作成します。
その際、1手先の評価値を全て探索し、パーティ構築を進めていきます。例えば、パーティの最初のポケモンを選択する場合は
- 0番目にのみ1を入力した入力値
- 1番目にのみ1を入力した入力値
- 2番目にのみ1を入力した入力値
- 3番目にのみ1を入力した入力値
- 4番目にのみ1を入力した入力値
の計5つの入力値をバッチにまとめてネットワークに流し込み、評価が一番良かった(実際には乱数が含まれている)入力値を採用します。
ここでは1番目に1を入力した入力値(フシギダネ)が最大値だったとします。次に、2番目のポケモンを選択する場合は(同じポケモンは採用出来ない事に注意)
- 1番目と5番目に1を入力した入力値
- 1番目と7番目に1を入力した入力値
- 1番目と8番目に1を入力した入力値
- 1番目と9番目に1を入力した入力値
の計4つ入力値を用意し、同じように、バッチにまとめてネットワークに流し込み評価を見て、また採用するポケモンを決めます。
ポケモン6匹を採用したら、今度はレベルの評価値を見て、レベルを決める...という事を繰り返していきます。
ポケモンのパラメーターを決めていく順番は
- レベル
- 特性
- 性格
- 性別
- 持ち物
- 技1
- 技2
- 技3
- 技4
- 技1のポイントアップ
- 技2のポイントアップ
- 技3のポイントアップ
- 技4のポイントアップ
- HP個体値
- 攻撃個体値
- 防御個体値
- 特攻個体値
- 特防個体値
- 素早さ個体値
- HP努力値
- 攻撃努力値
- 防御努力値
- 特攻努力値
- 特防努力値
- 素早さ努力値
になります。
但し、努力値だけは、HP~素早さをランダムにシャッフルして順番を決めます。何故なら努力値は合計510までと決められているので、上から順番に決めていくと、偏りが出てしまう恐れがあるからです。
また、同じ技を覚えさせてはいけないなどのポケモンのルールに従って行動します。
もしポケモンを採用しない場合(なしを選択した場合)は、その枠のポケモンのパラメーターには何も入力しません。
特徴入力の詳細に記述した、なしを含むかどうかについて意味は、なしが含むものは、選択しないという選択を自らの意志で選んだものであり、何も入力されていない部分に関しては、ポケモンがそもそも選択されなかったから何も選べない、技を1つしか選んでないからポイントアップも1つしか選択出来ないといった具合に、それが自分の意志で選択しなかったのか、ルール的に選択不能だから選択しなかったのかを明確に区別する為のものです。
パーティ構築が完了したら、今度は互いの入力値に互いのパーティの情報を入力します。
次に、選出する先頭のポケモン・選出する控え1のポケモン・選出する控え2のポケモンの入力範囲に全て同時かつ総当たりで入力します。
そしてバッチにまとめて評価値を出力し、選出するポケモンを決めます。バトルが開始したらモンテカルロシュミレーション(uctアルゴリズム)を行い最大訪問回数を選択しながら対戦を進めていきます。
ポケモンは不完全情報公開ゲームである為、実際の対局では、モンテカルロをそのまま使う事は難しいですが、policyに学習させる分には、問題ないだろうという事で、モンテカルロを使用しました。要は、学習時はカンニングした状態の最善手を教えてもらい、実際の対局で、その最善手を予測するのが狙いです。
※モンテカルロuctについては各自で調べていただくか僕の記事(笑)を参照。
モンテカルロの設定は以下の通りです。
試行回数 定数X ノード展開の有無 その局面の合法手 * 128 1 なし モンテカルロ探索は、ノードを展開しながらシュミレーションを進めるのが普通ですが、ポケモンでは互いに同じ手を選んでも別の局面に辿りつく場合があり、実装するのがかなり面倒...という理由で今回はノード展開はなしにしました。
一応、展開無しでも原始モンテカルロよりかは強い事は確認出来ました。
対戦が終了したら、パーティ構築~バトル終局までに現れた局面(入力値)全てを教師データとして学習させます。
valueには、勝った場合は[1, 0] 負けた場合は[0, 1]のone hot labelを与えます。
policyには、勝ち負け関係なく、モンテカルロで訪問した回数に応じた値(訪問回数を温度パラメーター1のボルツマン分布に変換した値)をそのまま正解ラベルとして与えます。
"""とある方からツイッターで頂いたコード""" def boltzmann_distribution(array, temperature_parameter): return array ** (1 / temperature_parameter) / np.sum(array ** (1 / temperature_parameter))最適化手法はAdaBoundOptimizerを使用しました。
この最適化手法はAdamの初期学習の速さ + SGDやMomentumの汎化性能の高さの良いとこどりをしたものらしいです。
この最適化手法の実装は、此方のコードを丸コピーして使わせていただきました。また直近64試合分のデータを記録しておき、64試合毎に
バッチサイズ16、64試合分のデータを1.5回見る割合でミニバッチ学習をさせます。おおまかな流れはこんな感じですが、これに加えて以下のような事も行っています。
その1. パーティ構築は、一定の確率で温度パラメータ0.075のボルツマン分布に従って行動する。
パーティ構築のランダム行動は、ランダムで行動する/しないを一定確率(初期は50%)でランダム選択し、ランダム行動すると選択した場合は、パーティ構築の全ての行動をボルツマン分布でランダム行動します。
その2. 勝利した側は同じパーティは続けて使用する。
勝利した側のパーティを続けて使用する事で、そのパーティが本当に強いパーティであれば、強いパーティであると素早く学習する事が可能です。
もしそのパーティが弱い場合は、すぐに負けるはずなので、弱いパーティを強いパーティとして使い続ける事はありません。また、私の環境下では、パーティを構築させるのに3秒から3.5秒かかってしまうのですが、この時間を省く事が出来ます。学習の結果(2)
うまく学習出来ているかどうかを確認する指標はいくつかあると思いますが、今回は、勝敗の結果に最も大きく関わるであろう選出したポケモンの平均レベルと、policyがモンテカルロの最大訪問数をどの程度予知出来ているのかをグラフで見ます。
特にレベルは、ゼロから学習させる上では、最初の壁であるように思います。
何故ならいくらバトルコマンドが正確であったとしてもレベル50 * 3匹 vs レベル1 * 3匹 のように極端にレベル差開いてしまうと勝つ事はほぼ不可能であり、逆にレベル差が開いていれば多少雑なプレイをしても勝ててしまいます。
その為、とりあえず高レベルなポケモンを使用するという事を学習出来ないと始まらないように思えます。グラフを分けている意味は特にありませんが、パーティ構築時のランダム選択は上から順に、50% 50% 20% 20% 5%になっています。
平均レベルは最大50から最大1.0に変換しています。最終モデル+ランダム行動なしのパーティ構築
※今回のルールで意味があるパラメーターのみ記載
ポケモン名 レベル 性格 個体値 努力値 技1 技2 フシギダネ 48 すなお 17, 30, 30, 20, 30, 31 195, 9, 51, 209, 23, 12 たいあたり なし ヒトカゲ 49 きまぐれ 1, 7, 18, 10, 28, 3 182, 12, 60, 64, 127, 9 ひのこ ピカチュウ 50 おくびょう 0, 27, 5, 25, 17, 23 13, 2, 174, 40, 205, 0 でんきショック ゼニガメ 49 おっとり 30, 23, 8, 10, 18, 25 0, 186, 142, 118, 36, 4 みずでっぽう レベルに関してはそこそこ、他はまだまだと言った所ですね...
改善点/将来に向けて
考えられる改善点はいくつかあります。
まずは、モンテカルロを展開ありにする事ですね。
その方が明らかに強くなるので。次にチーム構築時のランダム行動です。
強化学習のランダム行動は、greedyもよく使われますが、学習が進むにつれてランダム行動を減らしていく、というチューニングが面倒であった為、ボルツマン選択であれば、勝手に行動価値に応じてランダム行動してくれる→チューニング不要!やったぜ!とか思っていたんですが、どうやら甘かったようです。今回のグラフがガタガタなのはランダム行動のチューニングがうまくいっていないのが原因だと思います。
パーティ構築時にランダム行動をすると決定した場合は、パーティ構築の全ての行動にランダム要素を入れるという事をしていましたが、これもよろしくなく、N回ランダム要素を取り入れるとかにした方が、細かく調整出来ますし、より最適化しようと思ったらその微調節のようなランダムが必要になってくると思います。次に考えられる点は、入力層の次元削減です。
例えば、今回はポケモン1~6を別々の入力範囲としてましたが、そもそも同じポケモンを選択する事は出来ない為、入力範囲は同じでも被る事はありません。なしを選択する場合は、同じ場所になってしまう為、なしの数を入力する場所は必要になってきますが。同様に同じ技も選択する事が出来ないので、入力範囲を一つにまとめる事が出来そうです。順番は固定になってしまいますが、パーティ構築の際のポケモン・技の並びはどの順番であっても出来る事は変わりません。
パーティ構築のおけるポケモン1~3や技の1はルール上なしを選択する事が出来ないので、この部分も削れそうです。
このあたりは実装のしやすさやわかりやすさを優先しました。バトル時の特徴量にも抜け目があります。
今回は、味方の並び、味方のHP、相手の並び、相手のHPを特徴量としていましたが
、他にも、味方の先頭のポケモンの技1が相手の先頭のポケモンに今までどのくらいダメージを与えたのかとか、逆に相手からどのくらいダメージを受けたのとかの情報も本来であれば必要ですし、もっと言うのであれば、先頭同士の情報だけではなく、過去の局面から洗い出せる情報は全て特徴量にすべきです。(先手後手の結果や相手がどの技を所持していたのかとか、逆に自分は相手に対してどの情報を公開しているのかなどなど)
結局この辺りも実装が面倒でしませんでしたが、本格的に学習させたいのであれば、やはり必要です。今回は、モンテカルロの結果を学習させましたが、元々はポリシー同士の対局で勝ったらの勝ちの報酬を与えて、負けたら負けの報酬を与えるという方法で学習させて強くしていくつもりでした。その方が0からの学習感がしていいので。
しかしうまく学習出来ず、色々考えてもよさげな方法が見つからなかったので、諦めていたんですが、いい感じの方法を思いついたのでそれなりにうまくいったらその事についても書こうと思います。最後にバトル時の探索についてです。
しばらくの間はpolicyの強化でバトルコマンドの精度を上げる事を考えてるのですが、最終的にはバトル時の探索も必要になってくるかもしれません。
前にも書いたように、ポケモンは不完全情報ゲームである為、通常の探索手法は使えません。そこで、私が考えているのは、現局面でわかっている相手の情報を元に、ネットワークに何種類かの有望なパーティを構築させて、その作成したパーティをランダムでサンプリングし、モンテカルロなどのシュミレーションを行うという手法です。この方法であれば、パーティの評価値の精度さえ上がれば、割とうまくいくんじゃないかなと思っています。ただし、これを本格的に試そうと思ったらそれなりの計算資源が必要になりそうです...手元のPCがせいぜいミドルスペックなので、気軽には試せないというのが現状です。というわけでずっとしたい思っていたポケモンバトルの強化学習の始めの一歩を何とか踏み出せました。今の人生の目標は、ポケモンソード・シールドが発売するまでに、基盤を作る事です。もし興味がいる人がいれば一緒に作って、コンピューター将棋みたいに盛り上がったら嬉しいなと思っています。
- 投稿日:2019-06-25T12:47:55+09:00
並列処理学習6-本当の意味での並列性
Pythonで、CPUを複数使用した複数スレッドによる実装を行うために用意されているのものがある。
それが、concurrent.futuresから利用できるmultiprocessingモジュール。複数CPUでの処理が可能となり、子プロセスを並列処理として扱うことが出来る。
GILは、プロセスごとに適用されるため、CPUの利用を完全に個別に扱うことが可能となる。
プロセスはリンクを持つので、データの受け渡しも可能。concurrent.futures
multiprocessingを拡張し、扱いやすくしたモジュール。
multiprocessingのみ使用しようとすると、とても複雑な処理を行う必要がある。特別理由がなければ、concurrent.futuresのThreadPoolExecutorを利用すると良い。
速度向上を求めたいのであれば、ProcessPoolExecutorの利用も検討する。
上記の判断は、処理の分離具合と、やりとりするデータ量を鑑みて判断するのが良い。どうしてもさらなる高速化が必要ならば、multiprocessingモジュールを利用を検討する。
- 投稿日:2019-06-25T11:53:31+09:00
並列処理学習5-平行実行はコルーチンを使用検討
スレッドにより、複数の関数を、見た目上ではあるが、同時に実行することが出来のがPython。
しかし、スレッドにはいくつか問題がある
問題
以下の3つが存在する
安全な協調性
互いの安全に動作させるには、Lock()だったりQueueの利用といった、特別な処理をほどこさなくてはならず、ソースが複雑化してしまい、協調性として安全とは言えなくなる。
使用メモリの肥大化
スレッドは、1つの実行に8MBもメモリが必要となってしまう。
数えられないほどのスレッド数を利用することになってしまったら、システムエラーの温床となってしまう。スレッド利用コスト
逐一、処理用関数を起動し、終了させるとなると、スレッド利用にオーバーヘッドが発生してしまうい、処理の低速化へ繋がってしまう。
解決策
上記問題には、コルーチンを使用することで回避できる。
コルーチンであれば、プログラム内で、複数の関数を擬似的に動かせる。コルーチンは、ジェネレータの拡張機能として実装されており、コルーチンの起動は関数呼び出しだけで済む。
また、使用するメモリは、1KB以下しか消費せず、パフォーマンスの向上へつながる。コルーチン作成方法
以下の実装が必要となる
- コルーチンとして実行できるよう、yield式進行を許容する関数(コルーチン)を実装
- next()、send()関数を用いて適切に実装コルーチン
永遠に実行され続けるジェネレータにて、処理を適時実行できる。
独立した処理として扱える。
スレッドとは異なり、必要に応じてyeild式を実行時にのみ処理を行えるようになる。
yieldを適切に利用して、多くの処理を並行処理的振る舞いをさせることが出来る。
このように、コルーチンはとても素晴らしい機能なのだ。