Closed maximikos closed 2 years ago
Thanks for the thorough report!
tl;dr: install pint != 0.19.0, != 0.19.1.
The pint ValueError you show is hgrecco/pint#1498; this affects pint 0.19.0 and 0.19.1 but should be fixed in pint 0.19.2 that was just released (hgrecco/pint#1408 / hgrecco/pint#1512).
Without tracing in detail, I think whatever you did to "try installing message-ix via pip" created a strange mix of conda and pip-managed packages—although your show-versions
output indicates pint 0.18, this error will definitely never occur with versions of pint before 0.19. So I guess that the package(s) loaded when you "start Jupyter Lab and import message_ix
" are different from the package(s) loaded when you invoke the message_ix
command-line tool for message-ix show-versions
. This could also be the cause of the GAMS path issue.
You may want to:
where
CLI utility, like where message_ix
, as well as conda list
and conda info
.Hi @khaeru, thanks for your reply!
Yes, you were right - when I tried setting up via pip in a conda environment, there was some mix-up of stuff, even after down-/upgrading pint
. I also couldn't really figure out why Jupyter Lab calls the packages from somewhere else than where conda installs them originally, or rather: how to relocate (if you know, mind dropping a comment?). So, for instance, when having pip-installed pint=0.19.2
, everything looked fine; I could import message_ix
; but when calling mp = ixmp.Platform()
, the kernel interrupted with the following message, after which it restarted straight away:
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff9d2348db9, pid=16588, tid=18344
#
# JRE version: (11.0.6+8) (build )
# Java VM: OpenJDK 64-Bit Server VM (11.0.6+8-b765.1, mixed mode, sharing, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C 0x00007ff9d2348db9
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\maximiko\Box Sync\Coursework\IAM\hs_err_pid16588.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
Anyway, when doing everything with conda in a conda environment, it worked for me with downgrading pint
to version 0.18. Version 0.19.2 is apparently not available through the conda-forge
channel yet (just noticed you commented on that in #585), so I didn't try that.
Great news that it works!
I use Jupyter only rarely, and JupyterLab not at all. So while I know the former allows a selection of kernels and it matters from which conda environment you start it, I don't know how this translates to the latter, sorry. You might try posting your experience in the Dicussions for the benefit/input of other users.
Meanwhile, hearing that this issue is resolved from your point of view, I'll close it.
Version 0.19.2 is apparently not available through the
conda-forge
channel yet, so I didn't try that.
We are tracking the upstream PR that will eventually make that happen; see https://github.com/iiasa/message_ix/pull/585#issuecomment-1107845032
Context
Having detected some irregularities in my modelling results, I decided to re-install message_ix v3.4. This, however, fails, showing a value error message (see below), and I cannot seem to get it running again. My previous installation was installed via conda on a Windows 10 machine.
Approach
My approach for re-installing the message_ix package was as follows:
A - using conda
ctrl + del
- I tried it once, but it did not make a difference)B - using pip (since conda did not work...)
Conda
The conda commands used for the above were:
The last line, however, yields the following error message:
I tried different variations of the above, but none worked. That's when I wanted to try installing message-ix via pip.
Pip
Although the installation itself finished smoothly, when I start Jupyter Lab and
import message_ix
, the same ValueError as for the above conda installation shows.When I close Jupyter Lab and rerun the version check command, I run into the "jpype._jvmfinder.JVMNotFoundException", which is solved through
conda install -c anaconda openjdk
. Checking again the version yields:This is strange, though, because GAMS is already added to the PATH. In addition, when running
import message_ix
in Jupyter Lab, the above ValueError is shown yet again.What to do?
How can I get message-ix running again?