LoginSignup
2
2

More than 5 years have passed since last update.

Julialangで入れたpythonにモジュールを追加するには

Last updated at Posted at 2016-07-13

背景

JuliaにはPythonを呼べるPyCallなるパッケージがある。
これを利用したPyPlot.jlや、PySym.jlなどあり、
matplotlibや、pysymはこれらのパッケージを入れると、自動的に
Julia内のPythonに該当のモジュールが追加される。

今回は、これを手動で行うことを調べた。

pyimport_conda を使えば良い

よくよくPyCallのGithubのページを読むと書いてあった。

using PyCall
pyimport_conda("scipy", "scipy")

引数の意味は、よくわかってない。condaが分かる人なら
分かるのでは。

確認

@pyimport scipy.stats as stats
stats.hmean([1, 2, 4])

念のため

PyCallを入れる際に、明示的に利用したいPythonを指定している方は、
この方法は使えないと思われ、適宜、pipなりで使いたいモジュールを
入れる必要がありそう。

関連投稿

関連記事

2
2
1

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
2
2