I mount the conda environment in the linux. Then I activate the environment in the linux.
export PATH=$PATH:/opt/miniconda/bin
source activate /anaconda_env/personal/env1
Then I got this error:
/anaconda_env/miniconda/bin/conda: line 3: import: command not found
/anaconda_env/miniconda/bin/conda: line 6: syntax error near unexpected token `sys.argv'
/anaconda_env/miniconda/bin/conda: line 6: `if len(sys.argv) > 1 and sys.argv[1].startswith('shell.') and sys.path and sys.path[0] == '':'
When I check conda --version, the same error is shown.
Can anyone help me with this?
Inside the miniconda/bin/conda, the script is as follow
#!/anaconda_env/miniconda/bin/python
# -*- coding: utf-8 -*-
import sys
# Before any more imports, leave cwd out of sys.path for internal 'conda shell.*' commands.
# see https://github.com/conda/conda/issues/6549
if len(sys.argv) > 1 and sys.argv[1].startswith('shell.') and sys.path and sys.path[0] == '':
# The standard first entry in sys.path is an empty string,
# and os.path.abspath('') expands to os.getcwd().
del sys.path[0]
if __name__ == '__main__':
from conda.cli import main
sys.exit(main())