0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WinPython に Julia を導入する

Posted at

WinPython使うとWindowsでポータブルなPython環境が簡単に作れるので重宝します。
今回はPythonだけでなくJuliaでも使えるようにしたので備忘録ついでに共有します。

WinPythonのダウンロード

お好きなダウンロードをどうぞ。

私は Winpython64-3.8.1.0.exe をダウンロード。D:\Apps フォルダに展開しました。

Juliaのダウンロード

Juliaをダウンロードします。

Windows 64bit版 v1.3.1のexeファイルをダウンロードしました。

Juliaのインストール

image.png

インストール(といっても展開するだけ?)先はWinPythonを展開したフォルダ配下の t\Julia-1.3.1 フォルダにしました。

WinPythonの設定ファイルを書き換える

[WinPythonの展開フォルダ]\settings\winpython.ini ファイルを編集します。

[environment]
JULIADIRBASE=%WINPYDIR%\..\t\Julia-1.3.1
JULIADIR=%JULIADIRBASE%\bin
JULIA_DEPOT_PATH=%JULIADIRBASE%\share\julia
JULIA_HISTORY=%JULIADIRBASE%\logs\repl_history.jl
JUPYTER=%WINPYDIR%\Scripts\jupyter.exe
PATH=%PATH%;%JULIADIR%
BINARYPROVIDER_DOWNLOAD_ENGINE=curl

Julia-1.3.1 のバージョンの部分は適宜修正してください。

BINARYPROVIDER_DOWNLOAD_ENGINE=curl の行については、Juliaのバージョンによっては必須で、
無くても動くバージョンもありそうです(要調査)。

Julia設定

Juliaを起動するには WinPythonのインストールディレクトリにある WinPython Command Prompt.exe で開くコマンドプロンプトから実行します。

image.png

では、必要なパッケージをインストールしていきます。

Juliaが開いたら ] キーを打つと、 (v1.3) pkg> みたいな表示に切り替わります。

image.png

このモードだとパッケージの追加/削除ができるようになるので、下記コマンドを実行します。

add IJulia

実行するとJupyterにカーネルが追加されます。
確認方法はWinPython Command Promptで以下のコマンド。

jupyter kernelspec list

image.png

…他とは違うディレクトリにカーネル設定が書かれてしまった…!!!!
(が、とりあえず動くので放置…解決方法があれば教えてほしいです)

Jupyterの使用

いつもどおりWinPythonの展開ディレクトリからJupyter Lab.exe を実行します。

New Launcher で開く画面に Juliaが追加されていればオッケー!

image.png

Juliaを使う

あとはお好きなように!

image.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?