Skip to content

Anaconda #1607

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

Open
lilpetamoix opened this issue May 17, 2025 · 3 comments
Open

Anaconda #1607

lilpetamoix opened this issue May 17, 2025 · 3 comments

Comments

@lilpetamoix
Copy link

Hi, I've imported the following libraries in my pyscript.

import pymc as pm
import arviz as az

When running the script, I get the following warning message:
"WARNING (pytensor.configdefaults): g++ not available, if using conda: conda install gxx
WARNING (pytensor.configdefaults): g++ not detected! PyTensor will be unable to compile C-implementations and will default to Python. Performance may be severely degraded. To remove this warning, set PyTensor flags cxx to an empty string."

So I installed Anaconda which should have those components that pytensor is looking for.

However, the problem is I'm having difficulty in figuring out how to "point" WinPython to the Anaconda directory so that pytensor can utilize g++ properly.

Thanks in advance.

@stonebig
Copy link
Contributor

stonebig commented May 17, 2025

I'm not sure you can succeed quickly on this.
Did you try on pytensor forum ?
Or better nowodays, make an AI try to solve that question.
If I had to do it for my local use on an isolated planet with no AI, I would look into adding g++ external tool to a VisualStudio https://stackoverflow.com/questions/59923813/how-to-use-g-compiler-in-visual-studio

... a gordian node-like method would be to use Anaconda: can't you ?

@lilpetamoix
Copy link
Author

so I asked ChatGPT the following:
"I initially used WinPython to run pyscripts. I switched to PyCharm because I was able to run the pyscripts in the Anaconda environment. Is there a way to run pyscripts in WinPython but somehow link it to Anaconda environment?"

Response:
✅ Two Working Solutions
🔹 Option 1: Use WinPython IDE (Spyder or WinPython Control Panel) with Conda's Python
Find your Anaconda env's Python path
For pymc-env, it's usually:

makefile
Copy
Edit
C:\Users<you>\anaconda3\envs\pymc-env\python.exe
Configure WinPython to use it
If you're using WinPython Control Panel:

Open the WinPython Control Panel

Click “Register/Unregister” → point it to the conda env’s Python.exe

Alternatively, open WinPython Command Prompt, then launch:

bash
Copy
Edit
your_script.py

🔹 Option 2: Add Your Anaconda Env to WinPython Jupyter Kernel (if using notebooks)
If you want to use Jupyter from WinPython, but execute in your conda env:

bash
Copy
Edit
conda activate pymc-env
python -m ipykernel install --user --name pymc-env --display-name "Python (pymc-env)"
Then open Jupyter in WinPython, and select the "Python (pymc-env)" kernel.

I tried Option 1 by opening WPPM and tried to target the pymc-env in Anaconda but that failed, The Register functionality, correct me if I'm wrong, just registers the WinPython to the Windows environment but not necessarily set to Anaconda's environment.

@stonebig
Copy link
Contributor

stonebig commented May 17, 2025

ok, LLM are still not always perfect, or too perfect for us.

Option 1 doesn't make sense to me
Option 2 is unlikely Windows territory: it starts per "bash", as Anaconda is using a sort of compatibility layer to Windows

What I don't understand is the constraint that force you to try that exotic inter-breeding of Python stacks.
With a clearer picture of the problematic, maybe a clearer path may appear.

You need a master degree in IT, or a paid OpenAI, imho, to explore that world

Most users/electrons/watts are stuck on linux/anaconda/nvidia for these things, it's a heavy leafting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants