Skip to content
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

createmodule.sh failed to work within the pyenv-based conda environment. #320

Closed
hongyi-zhao opened this issue Mar 2, 2020 · 1 comment

Comments

@hongyi-zhao
Copy link

Hi,

I use pyenv to manage python versions, and I installed the miniconda-lastest with pyenv.

Then I do the following testing on createmodule.sh within and outof the pyenv-based conda environment:

Outside of the pyenv-based conda environment:

$ ./createmodule.sh /opt/intel/parallel_studio_xe_2020/psxevars.sh intel64 | grep CONDA
setenv		_CE_CONDA	
setenv		CONDA_DEFAULT_ENV	base
setenv		CONDA_EXE	/opt/intel/intelpython3/bin/conda
setenv		CONDA_PREFIX	/opt/intel/intelpython3
setenv		CONDA_PROMPT_MODIFIER	(base) 
setenv		CONDA_PYTHON_EXE	/opt/intel/intelpython3/bin/python
setenv		CONDA_SHLVL	1

Within the pyenv-based conda environment:

$ pyenv local miniconda3-latest
$ ./createmodule.sh /opt/intel/parallel_studio_xe_2020/psxevars.sh intel64 | grep CONDA
Unhandled change of CONDA_PREFIX
Before </home/werner/.repo/github.com/pyenv/versions/linux-x86_64/miniconda3-latest>
After  </opt/intel/intelpython3>
Unhandled change of CONDA_PYTHON_EXE
Before </home/werner/.pyenv/versions/miniconda3-latest/bin/python>
After  </opt/intel/intelpython3/bin/python>
Unhandled change of CONDA_SHLVL
Before <0>
After  <1>
Unhandled change of CONDA_EXE
Before </home/werner/.pyenv/versions/miniconda3-latest/bin/conda>
After  </opt/intel/intelpython3/bin/conda>
Unhandled change of CONDA_DEFAULT_ENV
Before <root>
After  <base>
setenv		CONDA_PROMPT_MODIFIER	(base) 

As you can see, the latter will fail to do the job.

Any hints?
Regards

@xdelaruelle
Copy link
Member

Thanks for the report. createmodule.sh finds some variables changed during the execution of the analyzed shell script and does not handle this situation. Outputing a setenv statement with the value set during shell script evaluation should be more appropriate.

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

No branches or pull requests

2 participants