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

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.

Traceback (most recent call last): File "/Users/samsa2/python_scripts/", line 119, in <module> for line in db: File "/Users/miniconda3/lib/python3.5/", 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:

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/”, line 31, in <module> File “/Users/user1/miniconda3/lib/python3.5/”, 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"

And my echo $PATH seems to be this

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


Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Opening Directories on anothe File System mickrobinson567812 1 39 Apr-18-2019, 08:11 AM
Last Post: DeaD_EyE
  Openpyxl - while saving excel file getting error shubhamjainj 1 76 Apr-09-2019, 12:05 PM
Last Post: Larz60+
  unable to pass a input after changing the user from root to non root using python avinash 3 128 Apr-08-2019, 10:05 AM
Last Post: avinash
  Help me with python read file and save file wereak 9 314 Apr-02-2019, 04:17 PM
Last Post: wereak
  Unable to run array using numpy module vitalstrike82 2 120 Apr-01-2019, 01:15 AM
Last Post: perfringo
  Mass load images Linuxdesire 1 82 Mar-29-2019, 06:24 PM
Last Post: Larz60+
  Cannot add dot executable to system path bobsmith76 2 155 Mar-05-2019, 03:17 PM
Last Post: bobsmith76
  Getting error while loading excel(.xlsx) file using openpyxl module shubhamjainj 1 165 Mar-01-2019, 01:05 PM
Last Post: buran
  running python script from shell invoked with os.system("x-terminal-emulator -e /bin/ markhaus 2 215 Feb-21-2019, 11:55 PM
Last Post: markhaus
  Getting a desired vector from lsqr in python when solving a linear system SJ001 0 105 Feb-21-2019, 04:19 PM
Last Post: SJ001

Forum Jump:

Users browsing this thread: 1 Guest(s)