Knowledge for those who are only thinking about running the Qore SDK on a Mac

Introduction

I thought that I would set up Docker because it runs on ubuntu, but I checked the list of libraries I have summarized what I found to be possible in more various environments.

The environment where the operation was actually confirmed is Mac only.

Library type

This is a list of shared libraries. スクリーンショット 2020-01-09 6.44.49.png I received a share in the trial permission email, and I have refrained from mentioning it because I could not find it in the published content. I also checked the terms and I think it's okay, but I couldn't judge whether it was appropriate to put the URL of google drive here.

The following is estimated from the file name

Target OS

--linux (armv7l: armhf architecture, x86_64 architecture)

Impression that the target OS of Mac is one generation ago and the current latest and there is no problem And I noticed this time, it seems that it can be operated from raspberry Pi 2 or later. It's nice.

https://ubuntu-mate.org/

Supported python versions

python 3.5 series, 3.6 series, 3.7 series

Operation check

Operating environment

procedure

  1. Download the demo
  2. Adjust the python version with pyenv.
  3. Added Qore SDK library

Download demo

https://github.com/qcore-info/advent-calendar-2019

スクリーンショット 2020-01-09 9.39.30.png

Open in VScode

スクリーンショット 2020-01-09 9.44.15.png

pyenv

I think I installed pyenv with brew on mac. (It was included when building the environment)

$ brew install pyenv

Check the installed python version

$ pyenv versions

If you don't have the version you want, look for it

$ pyenv install --list | grep 3.7
  2.3.7
  3.3.7
  3.7.0
  3.7-dev
  3.7.1
  3.7.2
  miniconda-3.7.0
  miniconda3-3.7.0
  stackless-3.3.7

install

$ pyenv install 3.7.2

There was a problem that Mojave couldn't install (I'm forgetting it). I avoided it by referring to the part with Countermeasure.

https://reasonable-code.com/pyenv-zlib-error/

$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

Go to the demo downloaded folder and specify the python version.

$ cd advent-calendar-2019-master
$ pyenv local 3.7.2
スクリーンショット 2020-01-09 9.58.10.png

Add the Qore SDK to the folder

スクリーンショット 2020-01-09 10.02.53.png

https://github.com/qcore-info/advent-calendar-2019#%E4%BE%9D%E5%AD%98%E3%83%A9%E3%82%A4%E3%83%96%E3%83%A9%E3%83%AA%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB Than

$ pip install -r requirements.txt
$ pip install qore_sdk-0.1.0-cp37-cp37m-macosx_10_14_x86_64.whl

Run the demo

Set VSCode python to the library specified by pyenv

スクリーンショット 2020-01-09 10.48.20.png

Qore sample 1_with_UCI.ipynb

Since the python version and the library that refers to it are different, rewrite it according to the environment.

スクリーンショット 2020-01-09 10.43.47.png

Assuming that the data folder is created under ʻadvent-calendar-2019-master`

%cd /content/data/

Two places in a certain place

% cd / Users / [username] / work / qiita / sample / advent-calendar-2019-master / data /

I rewrote it like this.

Set the user name, password, and endpoint that are issued for trial purposes. スクリーンショット 2020-01-09 20.27.09.png

It worked safely.

スクリーンショット 2020-01-09 20.29.11.png

at the end

At the moment, I didn't have anything I wanted to learn, so the content was written from that interesting perspective of building an environment.

The machine learning environment of Mac is honestly harsh, and in order to use CUDA, you should not raise the OS from High Sierra It could be used as an alternative! (I don't even know what it really is).

There are various environments that work with the provided library, and I fully felt the possibility that it would be interesting to move it. Docker, raspberry Pi, and here I hope to take on the next challenge. It's a pity that the trial period is over.

Recommended Posts

Knowledge for those who are only thinking about running the Qore SDK on a Mac
A story about an engineer who came only on the server side created a portfolio
ABC's A problem analysis for the past 15 times to send to those who are new to Python
Impressions of receiving a long-term AI seminar (for those who are uncertain about attending seminars, etc.)
[Solved] I have a question for those who are familiar with Python mechanize.
Dart grammar for those who only know Python
A story about running Python on PHP on Heroku
For Debian users who are having trouble with a bug in the Linux kernel 5.10