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 1 year has passed since last update.

個人メモ:Miniconda パッケージ

Last updated at Posted at 2022-06-02

必要なPython環境を作るにあたり、Apple M1 chip での試行錯誤を備忘録としてまとめておく。

今回はメインのモジュールの依存関係のために最新の Anaconda が使えなかったため、 環境を miniconda から作ることにした。

参考
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#cloning-an-environment

$ conda create -n myenv python=3.8

===
base
===
Miniconda Python 3.8

===
agama_202206
===
(base) $ conda create --name agama_202206 python=3.8
(base) $ conda activate agama_202206
(agama_202206) $ conda install -c conda-forge numpy
agama install

===
gaia_dr3-env
===
conda create --name gaia_dr3-env --clone agama_202206


===
gaia_dr3_try1-env
===
$ conda create --name gaia_dr3_try1-env --clone agama_202206
$ conda activate gaia_dr3_try1-env
$ conda install -c conda-forge ***

*** のリスト(上から順番に入れた)
scipy
matplotlib
jupyter
astropy
astroquery
corner
mpi4py
schwimmbad
pandas # already installed
wget
cython
scikit-learn
seaborn
pytest

===
gaia_dr3_try2-env
===

$ conda create --name gaia_dr3_try2-env --clone gaia_dr3_try1-env
$ conda activate gaia_dr3_try2-env

(gaia_dr3_try2-env)$ pip install cubature # これはうまく入らなかったので、pip で入れた。

mwdust

===
gaia_dr3_try3-env
===

$ conda create --name gaia_dr3_try3-env --clone gaia_dr3_try2-env
$ conda activate gaia_dr3_try3-env

(1) healpy
(gaia_dr3_try3-env)$ conda install -c conda-forge healpy

(2) mwdust
.bash_profile で
export DUST_DIR=$HOME/my_libs_3/mwdust_DATA_directory
としてから

$ sudo -E python setup.py build
$ sudo -E python setup.py install

### sudo env PATH="$PATH" python setup.py build
### sudo -E env PATH="$PATH" python setup.py install


(3) gaiadr3_zeropoint
gaiadr3_zeropoint  ダウンロードしてmy_libs_3 に展開し、
$ cd gaiadr3_zeropoint
$ python setup.py install

# sudo -E env PATH="$PATH" python setup.py install

(4) Agama

$ sudo -E env PATH="$PATH"  python setup.py install

...
>>> import agama
>>> agama.setUnits(mass=1,velocity=1,length=1)

===
gaia_dr3_try4-env
===

$ conda create --name gaia_dr3_try4-env --clone gaia_dr3_try3-env

(1) gdr3apcal

(2) fastkde

$ pip install fastkde
(GitHub はversionに関して文句を言われるので諦めてpipにする。)

>>> from fastkde import fastKDE
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/[user_name]/miniconda3/envs/gaia_dr3_try4-env/lib/python3.8/site-packages/fastkde-1.0.19-py3.8-macosx-11.1-arm64.egg/fastkde/__init__.py", line 1, in <module>
    from .version import version as __version__


===
gaia_dr3_try5-ispec-env
===

$ conda create --name gaia_dr3_try5-ispec-env --clone gaia_dr3_try5-env

(1)
(2) ispec


===
gaia_dr3_try5-quantile_forest-env
===

conda create --name gaia_dr3_try5-quantile_forest-env --clone gaia_dr3_try5-env

pip install quantile-forest
conda update astropy

(astropy が古いと、numpy<1.23 でのみ使えるnumpy.asscalar がエラーを吐く。)

===
gaia_dr3_try5-naif-env
===
conda create --name gaia_dr3_try5-naif-env --clone gaia_dr3_try5-env

conda update astropy
pip install naif
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?