pertpy
pertpy copied to clipboard
pertpy cannot be imported on windows
Report
When I install pertpy and then try to import it, I always encounter an error that cannot be loaded successfully. The error message is: import pertpy Fatal error: unable to initialize the JIT.
Specifically, the error occurs when trying to import pertpy:
Error in .makeMessage(..., domain = domain) : 3 arguments passed to .Internal(gettext) which requires 2 Error in gettext(fmt, domain = domain, trim = trim) : 3 arguments passed to .Internal(gettext) which requires 2 Error in Ops.numeric_version(R_version_built_under, "4.0.0") : there is no . .Internal function 'compareNumericVersion'.
It seems there may be an issue with the Just-In-Time (JIT) compiler, and it could be related to the version of R or some internal functions. The version of yy installed pertpy is 0.6.0, R is 4.1.1.
Version information
session_info 1.0.0
nt NA
Python 3.9.18 (main, Sep 11 2023, 14:09:26) [MSC v.1916 64 bit (AMD64)] Windows-10-10.0.22621-SP0
Could you please tell me how R is related to this? Are you attempting to use pertpy through reticulate?
Could you please tell me how R is related to this? Are you attempting to use pertpy through reticulate?
In fact, I initially used pip install pertpy to install pertpy, and the installation process seemed to proceed without errors. However, when I attempted to import pertpy, I encountered the following error:
import pertpy
Installed version 0.4.0 of pertpy is outdated. Newest version is 0.6.0!
AttributeError: module 'ml_dtypes' has no attribute 'float8_e4m3b11'
Traceback (most recent call last):
File "
Subsequently, I created a new environment in Conda and installed pertpy within this environment. I also installed R-4.1.1 in this environment and configured os.environ["R_HOME"] and os.environ['R_path']. However, when I tried to import pertpy in this new environment, I still encountered the same error as before.
Ah okay.
So
- You're not installing the latest pertpy version. Please run
pip install -U pertpy
- You're using Windows which is the root of all evil here. We cannot provide perfect support for Windows at this stage because we have no developers using it. Please use WSL or Docker or something. Jax also has limited support for Windows.
Yes, I initially installed the latest version 0.6.0 using "pip install pertpy --user" on Windows. After the installation, I encountered the following error when trying to import pertpy:
"ImportError: cannot import name '_compare_version' from 'torchmetrics.utilities.imports' (C:\Users\erzac\AppData\Roaming\Python\Python39\site-packages\torchmetrics\utilities\imports.py)."
So, I switched to using Anaconda, created a new environment for installation, but I still encountered numerous errors, and the import was unsuccessful.
Yeah, as mentioned above, we cannot provide Windows support at the moment. Please use WSL or a Linux machine for now.