Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Fatal Python error: Py_Initialize: unable to load the file system codec
#1
Hi,

I am using the terminal on a OS X El Capitan. Recently I have used python to run some software until I got some error and started updating the python versions to 3.5... through brew.

Error:
Traceback (most recent call last): File "/Users/samsa2/python_scripts/DIAMOND_subsystems_analysis_counter.py", line 119, in <module> for line in db: File "/Users/miniconda3/lib/python3.5/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 3173: invalid start byte
And now every time I run or try to activate an environment I have the following error:

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
I suspect I have installed different versions of python and there are problems with the PATH environment variable
When running "which python"
Quote:/Users/user1/miniconda3/bin/python

And my echo $PATH seems to be this
Quote:/usr/local/share/python:/Users/ecg1g15/miniconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

1. What is the best way to make python work again?
2. Is there anyway I could uninstall all python versions and install the one I desire (ideally 2.7)?

Thanks in advance

E
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  pygame.error: /etc/timidity.cfg: No such file or directory lsepolis123 3 120 Aug-23-2019, 07:53 AM
Last Post: lsepolis123
  python file output to log file Rsh 4 200 Aug-13-2019, 09:00 PM
Last Post: DeaD_EyE
  Get system info from PI (cpu load and temp) korenron 2 131 Aug-04-2019, 08:45 AM
Last Post: korenron
  Internal Server Error 500 on creating .py file patrickluethi 0 84 Aug-02-2019, 01:57 PM
Last Post: patrickluethi
  Error -3 when opening matlab file in python python_newbie09 0 65 Aug-02-2019, 11:51 AM
Last Post: python_newbie09
  Error :unable to detect undefined names created in spyder ide error at line 2 milind_eac 2 113 Jul-30-2019, 10:29 PM
Last Post: milind_eac
  FileNotFoundError...System cannot find the path specified alex9745 28 3,606 Jul-23-2019, 05:14 AM
Last Post: alex9745
  Unable to install pyaudio junzhi 1 312 Jul-21-2019, 05:00 PM
Last Post: snippsat
  python and load balancer pythonFresher 1 118 Jul-18-2019, 07:23 AM
Last Post: pythonFresher
  Unable to allocate specific memory VirtualDreamer 1 103 Jul-13-2019, 07:04 AM
Last Post: Gribouillis

Forum Jump:


Users browsing this thread: 1 Guest(s)