I am trying to activate qiime2 on my Mac terminal again after a while, so when I run:
source activate qiime2-2018.11
I get the following error:
Fatal Python error: Py_Initialize: unable to load the file system codec
Traceback (most recent call last):
File "/Users/user1/miniconda3/lib/python3.5/encodings/init.py", line 31, in <module>
File "/Users/user1/miniconda3/lib/python3.5/codecs.py", line 322, in <module>
NameError: name 'open' is not defined
Is this due to a photon version/upgrade? What do I need to do to fix this? Do I need to modify the scripts, or downgrade photon?
Hey there @ecg - it looks like you have a few miniconda deployments in your PATH --- any idea what is going on there? I'm not sure if that is the problem, but, that can probably cause some issues.
Can you try installing 2019.1? I wonder if your env just got corrupted... :qiime2:
Hi @thermokarst ,
I have recently been updating other software, and had other errors when using phyton. I wonder if I have been updating/changing environments... Maybe best to do is uninstall all environments and photon and re-install the newest qiime 2019?
Fatal Python error: Py_Initialize: unable to load the file system codec
Traceback (most recent call last):
File "/Users/user1/miniconda3/lib/python3.5/encodings/init.py", line 31, in <module>
File "/Users/user1/miniconda3/lib/python3.5/codecs.py", line 322, in <module>
That should set your PATH to something mostly sane, if source activate or conda start working after that, then there's something we should be correcting in your .bash_profile/.bashrc to make sure things work.
Thanks @thermokarst and @ebolyen but I had no luck sorry, after running the export command and trying the conda command, still gives me the same "fatal python error".
I wonder if I should uninstall all pythons from my device and re-install it from scratch?
Fatal Python error: Py_Initialize: unable to load the file system codec
Traceback (most recent call last):
File "/Users/user1/miniconda3/lib/python3.5/encodings/init.py", line 31, in <module>
File "/Users/user1/miniconda3/lib/python3.5/codecs.py", line 322, in <module>
NameError: name 'open' is not defined
Abort trap: 6
Yeah, I strongly suspect that your PATH (and maybe PYTHONPATH) env vars are implicated here --- this looks like the two different miniconda deployments you have are conflicting (one is at /Users/user1/miniconda3 and the other at /Users/ecg1g15/miniconda3, plus, who knows what other pythons are lurking in there). I think if I were in your shoes I would tidy up my workspace a bit and make sure that everything is squared away first (e.g. uninstall your extra python deployments, clean up your env vars, consider reducing your two users accounts to one, etc.). Sorry, wish I could be more help here, but please keep us posted if you get stuck! :qiime2:
Turns out that I had about 7 different versions of python installed, I have installed them using brew and others so I had python on system, mac port and miniconda.
Since qiime is using miniconda, I have moved miniconda to be top of the list to be the priority one when using python from the miniconda3 bin. Does this make sense? A couple of IT friends helped me out here. Thanks a lot for helping me anyways, I need to be more careful with how I install apps/packages.. etc.