16
13

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.

Juliaのパッケージをインストール

Posted at

Juliaでパッケージを(アン)インストールする時につい忘れちゃうことを備忘録的にまとめたいと思います。

パッケージをインストールする

基本的にはaddを使います

公式パッケージに登録されているパッケージをインストールする場合

# 基本
(v1.3) pkg> add Example

# バージョンを指定する場合
(v1.3) pkg> add Example@0.X.X

# ブランチを指定する場合
(v1.3) pkg> add Example#feature

# コミットを指定する場合
(v1.3) pkg> add Example#97e870d

公式パッケージに登録されていないパッケージをインストールする場合

GithubのURLからインストールできます

(v1.3) pkg> add https://github.com/hogehoge/Example.jl

# 同様にブランチ指定もできます
(v1.3) pkg> add https://github.com/hogehoge/Example.jl#feature

# 同じく同様にコミット指定もできます
(v1.3) pkg> add https://github.com/hogehoge/Example.jl#97e870d

開発中のパッケージをインストールする場合

addではなく devを使うことが多いです
devを使う理由(使うべき時)についてはこちらを参考にしてください

(v1.3) pkg> dev Example

パッケージをアンインストールする

rmを使います

(v1.3) pkg> rm Example

インストールしたパッケージをアップデートする

(v1.3) pkg> update Example

インストールしてある全てのパッケージをアップデートする場合は、updateだけで大丈夫です

(v1.3) pkg> update

参考

Juliaのパッケージ開発に便利なPkgTemplate, Revise, developコマンド
https://julialang.github.io/Pkg.jl/stable/managing-packages/

16
13
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
16
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?