Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summary of the successful message-ix installation on macOS #483

Closed
marek-iiasa opened this issue Jun 11, 2021 · 2 comments
Closed

Summary of the successful message-ix installation on macOS #483

marek-iiasa opened this issue Jun 11, 2021 · 2 comments

Comments

@marek-iiasa
Copy link
Contributor

marek-iiasa commented Jun 11, 2021

I summarize the message-ix installation on macOS Big Sur version 11.4 based on (to a large extend overlapping) comments by Francesco and Oliver.

Francesco in #480:
conda config --prepend channels conda-forge
conda config --set channel_priority strict
conda create --name message_env
conda activate message_env
conda install message-ix
---
Oliver in #482:
I did the install this morning on macOS:
step1. I deleted Anaconda and GAMS.
step2. rebooted machine.
step3. installed GAMS 35.2 (including ticking the box to add to PATH)
step4. installed anaconda3-2021.05
step5. installed messageix via anaconda following each step of the instructions with the addition of setting channel priority to strict.
step5. downloaded tutorials
step6. started jupyter notebook from the command-line ensuring environment 'message_env' is active.
---

I skipped Oliver's steps 1 through 4 (didn't want to risk loosing the stuff in another, earlier created, env; I also wanted to avoid GAMS reinstallation). Based on further comments of Oliver I didn't define JAVA_HOME, and have hidden the JDK.

Therefore, the only preparation I found necessary: GAMS properly installed and included in $PATH.

Here are the steps of my installation:

Ba4:wrksp marek$ conda update --all
Ba4:wrksp marek$ conda config --prepend channels conda-forge
Warning: 'conda-forge' already in 'channels' list, moving to the top
Ba4:wrksp marek$ conda config --set channel_priority strict
Ba4:wrksp marek$ conda create --name msg_env
Ba4:wrksp marek$ cat ~/.condarc
ssl_verify: true
channels:
  - conda-forge
  - defaults
auto_activate_base: false
channel_priority: strict
Ba4:wrksp marek$ conda --version
conda 4.10.1
Ba4:wrksp marek$ conda activate msg_env
(msg_env) Ba4:wrksp marek$ echo $PATH
/Users/marek/anaconda3/envs/msg_env/bin:/Library/Frameworks/GAMS.framework/Resources:/Applications/anaconda3/condabin:/anaconda3/bin:.:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/marek/bin:/Users/marek/src/mcma/ScriptsMac:/Library/TeX/texbin:/Library/Apple/usr/bin
(msg_env) Ba4:wrksp marek$ conda install message-ix
(msg_env) Ba4:wrksp marek$ message-ix show-versions

ixmp:        3.3.0
message_ix:  3.3.0
message_ix_models: None
message_data: None

click:       8.0.1
dask:        2021.06.0
genno:       installed
graphviz:    None
jpype:       1.2.1
… JVM path:  /Users/marek/anaconda3/envs/msg_env/lib/jli/libjli.dylib
openpyxl:    3.0.7
pandas:      1.2.4
pint:        0.17
xarray:      0.18.2
yaml:        5.4.1

iam_units:   installed
jupyter:     installed
matplotlib:  3.4.2
plotnine:    0.8.0
pyam:        0.11.0

GAMS:        35.2.0

python:      3.9.4 | packaged by conda-forge | (default, May 10 2021, 22:13:15) 
[Clang 11.1.0 ]
python-bits: 64
OS:          Darwin
OS-release:  20.5.0
machine:     x86_64
processor:   i386
byteorder:   little
LC_ALL:      None
LANG:        None
LOCALE:      (None, 'UTF-8')

(msg_env) Ba4:wrksp marek$ jupyter notebook

Thus, Oliver's and mine environments appear to be the same (except of versions of pyam and macOS).

I run without problems both the coffee-machine and westeros_baseline notebooks. BTW: initial run resulted in errors; then I figured out that one should restart the kernel & clean output at starting the already run *.ipynb. The latter might be a useful tip for less experienced in jupyter, like myself.

Summing-up the message-ix installation prerequisites: it appears that neither definition of JAVA_HOME nor installation of JDK are needed; whether or not one of them caused problems with my earlier installations remains unclear.

I do hope that the above summary can help in improving the installation instructions, and maybe also in answering future questions about the installation.

@marek-iiasa marek-iiasa changed the title Summary of the finally successful message-ix install on macOS Summary of the successful message-ix installation on macOS Big Sur ver. 11.4 Jun 12, 2021
@marek-iiasa marek-iiasa changed the title Summary of the successful message-ix installation on macOS Big Sur ver. 11.4 Summary of the successful message-ix installation on macOS Jun 12, 2021
@francescolovat
Copy link
Contributor

Thank you @marek-iiasa!

It then seems that the sequence of steps that I posted (based on testing efforts from @awais307) is a quite robust way to install message-ix from conda -it also worked with other participants in Slack.

We'll account for that and improve the documentation where needed.

@LauWien
Copy link
Contributor

LauWien commented Oct 11, 2021

Thank you for this summary! Since PR #501 got merged and handling Jupyter Notebooks is covered in the Prerequisite knowledge & skills, I'm closing this issue.

@LauWien LauWien closed this as completed Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants