lateinit property envs has not been initialized

I'm running PyCharm 2024.2.3 (Professional Edition). 

I'm setting up a pixi environment.  I've installed python==3.12 and pixi-pycharm. 

Now, I'm trying to configure the python interpreter using Settings | Python Interpreter | Add Interpreter | Add Local Interpreter | Conda Environment.  Then I get the message “lateinit property envs has not been initialized”.  

All of my code is in Python.  There is no Kotlin code in my project.  
Any ideas what I'm doing wrong ? 

 

0

Hey,

Usually, this signifies that conda has initialization problems. 

If you haven't initialized conda, run conda init in the terminal. 

If you did it earlier, but conda was reinstalled, or other conda distribution was installed - try running conda init --reverse, restart PC, and run conda init again.

0

I followed your three steps, but still get the same error.  
Is there a file that is causing PyCharm to look for "lateinit envs"

0
To investigate this problem further, we need to check logs, please reproduce the problem, get idea.log with Help | Show Logs in..., upload it to our file hosting and tell us the upload ID: https://uploads.services.jetbrains.com/
0

upload id = Upload id: 2024_10_23_xqZBfavtuBLXq87URabdzN (file: idea.log) 

 

0
Hey Scott,
I'm still unable to reproduce the issue, and the logs, unfortunately, don't provide any additional clues. 
Could you please check if conda envs works correctly without pixi?
0

I uninstalled PyCharm (Professional) and reinstalled it using JetBrains Toolbox.  But still get the same problem. 

I will note that this happens regardless of the project.  So it doesn't appear to be related to the project's directory contents.  I believe this must be a problem with the common PyCharm installation – probably directory contents.  

Then I blew away my miniconda envs and recreated a couple of simple ones.  Then I reinstalled conda.  

Still same problem. 

What's the next step?  I'm unable to separate my environments in PyCharm now.  

0

If the lateinit is done inside PyCharm code, then I won't be able to fix it externally. 

If the lateinit is done from a file, then it is probably a problem with some file on my system.  But I don't know which file that might be. 

0

FYI.  I found that I had both conda and anaconda installed.  When I deleted the anaconda installation (which was pretty old), things started working again. 

0
Oh, that's interesting, thank you for the update. 

Probably, the problem was with the initialisation/uninitialisation; two conda instances on one machine simultaneously seem very controversial taking into account how conda init works.
0

请先登录再写评论。