msys2 / MSYS2-packages

Package scripts for MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
1.28k stars 486 forks source link

MSYS2 can not load anaconda's python interpreter #2959

Open hitbuyi opened 2 years ago

hitbuyi commented 2 years ago

Describe the issue

After add following lines in .bash_profile eval "$('/c/Users/YTX/Anaconda3/Scripts/conda.exe' 'shell.bash' 'hook')" MSYS2 recognizes the conda environments, conda list, conda activate base ,etc woks python --version
it gives the right result

the weird thing is MSYS2 don not recognizes python interpreter: $ python it gives nothing why?

Steps to Reproduce the Problem

  1. Add eval "$('/c/Users/YTX/Anaconda3/Scripts/conda.exe' 'shell.bash' 'hook')" in .bash_profile
  2. conda activate base
  3. Run python in MSYS2 terminal, can not enter python interactive shell

Additional Context: Operating System, Screenshots

hitbuyi commented 2 years ago

I found python -i work BUT python without "-i" not work

revelator commented 2 years ago

windows python has a tendency to misbehave in a bash shell you can actually see the same with some of the older mingw-w64-python2 packages where executing python2 gives no output unless you apply some switch in which case it will print to the screen. the newer versions have been patched to work in our environment.

shula commented 1 year ago

@revelator it still happens (without the anaconda thing; just plain "vanila" python) mintty 3.6.1 win10, python 3.10 (from python.org/) (MSys2 downloaded 2022-10-06)

Biswa96 commented 1 year ago

What errors did you see? can you use msys2 provided python or mingw python?

revelator commented 1 year ago

no problems using the mingw* python3 some older python2 models we used had the bug but im not seing it with current versions so ???