LoginSignup
0
0

More than 5 years have passed since last update.

neo-pythonの環境構築

Last updated at Posted at 2018-11-25

はじめに

Windows PCでNEO-pythonを動かすまでのメモです

このドキュメントのゴール
- Dockerがインストールできていること (private netへの接続に必要です)
- neoのprivate netに繋いでneo-pythonが使用できること

NEO-PythonをWindowsに入れる方法

頑張れば動くかもしないけど大変そうなのでやめておく。
公式ドキュメントにも、このようにあります。

Currently, you should use the Linux subsystem with Ubuntu, or a Virtual Machine with Linux. You can find more information and a guide for setting up the Linux subsystem here.

Installing "Ubuntu" from Microsoft Store installs Ubuntu 16.04. You should install Ubuntu 18.04 from Microsoft Store found here: https://www.microsoft.com/en-us/p/ubuntu-1804/9n9tngvndl3q?activetab=pivot%3aoverviewtab

Help needed for running natively. Installing the Python package plyvel seems to require C++ compiler support tied to Visual Studio and libraries. Refer to documentation.

WindowsでLinuxを動かす

WindowsOS上で動かすのを諦め、Linuxの仮想環境を準備しました。
VirtualBoxでUbuntuを動かすことにしました。

VirtualBoxでUbuntuを動かす

  1. まずはBIOSで仮想化機能を有効にしました。詳しい方法については各メーカーのサポートページなどをご参照ください。
  2. https://www.virtualbox.org/ からVirtualBoxをDLしてインストールします
  3. https://www.ubuntulinux.jp/download から、「日本語Remixイメージをダウンロード」を選択し、イメージをDLします
  4. 新規仮想マシンを作成して、DLしたUbuntuイメージを指定し、Ubuntuをインストールします

Ubuntu上でのセットアップ

  1. Ubuntuのインストールが完了したら、「端末」を起動してください
  2. https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce を参考にDockerをインストールしてください

Pythonとpipのインストール

https://github.com/CityOfZion/neo-python を参考に必要なパッケージをインストールしていきます

$ sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install python3.7 python3.7-dev python3.7-venv python3-pip libleveldb-dev libssl-dev g++
$ pip3 install neo-python
$ source ~/.profile
$ np-prompt

起動ができたら完了です!!

0
0
0

Register as a new user and use Qiita more conveniently

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