-
Notifications
You must be signed in to change notification settings - Fork 81
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
initialise.py determine classy_path issue #333
Comments
Hi, I've never seen this issue before. Do you think it might be related to a recent Python change? What version of Python are you using? You gave me the impression it only happens sometimes, for some of your CLASS versions, is this right? Do you understand why? Best, |
I don't think this is a Python version issue, since I tried an online python interpreter with Python 3.7 and I got the same behavior for I use Python Python 3.11.3. It always happens. In my case, I encountered the error only when calling one of the CLASS versions as the other had its library copied to the default The bottom line is that MontePython does not add the new Cheers, |
Hi Tal, Thanks, that's helpful! I'll see what's the best option for restoring the intended behavior. Now that you mention it, I've always recompiled the CLASS version I wanted to use to make sure that I get the right CLASS version and that shouldn't be the case and I thought it didn't used to be. Best, |
I'm having the same issue. But Tal's fix didn't work for me =( (thanks though, Tal!) |
Hi,
I've tried running MontePython with two different versions of CLASS, specifying
path['cosmo']
in the.conf
file accordingly.However, for one of the versions I got an error saying CLASS did not read parameters so and so.
After trying to debug this, I narrowed it down to the
initialise.py
module, where it runs:I found that
elem.find(sys.version)
will always return-1
sincesys.version
returns'3.11.3 (main, May 15 2023, 15:45:52) [GCC 11.2.0]'
while theclassy
file name islib.linux-x86_64-cpython-311
. Therefore MontePython reads CLASS from the default environment library instead of thepath['cosmo']
location.I cross checked the behavior on both the Linux cluster and my macOS machine and the
classy
file name is similar.I've improvised a workaround by replacing the condition as follows:
One can also remove the
sys.version
condition altogether if it is of no concern...The text was updated successfully, but these errors were encountered: