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.
This is a list of shared libraries. 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
--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/
python 3.5 series, 3.6 series, 3.7 series
https://github.com/qcore-info/advent-calendar-2019
Open in VScode
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
Add the Qore SDK to the folder
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
Set VSCode python to the library specified by pyenv
Since the python version and the library that refers to it are different, rewrite it according to the environment.
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.
It worked safely.
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