I am unable to use conda
commands after upgrading from Python 3.6 to Python 3.7. For example, when I wanted to see the active environment using conda env list
, I get the following error:
Traceback (most recent call last):
File "$HOME/anaconda3/bin/conda", line 12, in <module>
from conda.cli import main
ModuleNotFoundError: No module named 'conda'
The same error appears for all conda
commands.
Running python
shows:
Python 3.7.3 (default, Mar 27 2019, 22:11:17)
[GCC 7.3.0] :: Anaconda, Inc. on linux
When I check the system path for Python 3.7 at $HOME/anaconda3/lib/python3.7/site-packages/
, I don't find the conda
directories but I find the same in the older Python version which I was previously using: $HOME/anaconda3/lib/python3.6/site-packages/conda
.
I thought to perform a clean uninstall and install of Anaconda starting with anaconda-clean
. But I get the following error:
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
File "$HOME/anaconda3/lib/python3.7/io.py", line 52, in <module>
File "$HOME/anaconda3/lib/python3.7/abc.py", line 147
print(f"Class: {cls.__module__}.{cls.__qualname__}", file=file)
^
SyntaxError: invalid syntax
Aborted (core dumped)
Is there a way I can fix these issues? Thanks.