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
  Fatal Error in Python MrRobot 6 157 Feb-14-2019, 04:56 AM
Last Post: MrRobot
  Is there a way of improving this leaderboard system? Zelpha 2 84 Feb-11-2019, 06:32 PM
Last Post: ichabod801
  Login System Carbonix 4 249 Feb-04-2019, 02:19 PM
Last Post: Larz60+
  How to ignore - ERROR: The system was unable to find the specified registry key or va asheru93 9 221 Feb-04-2019, 06:35 AM
Last Post: asheru93
  error creating new object after loading pickled objects from file arogers 2 150 Feb-02-2019, 10:43 AM
Last Post: Larz60+
  how to load large data into dataframe. sandy 0 81 Feb-01-2019, 06:19 PM
Last Post: sandy
  [python]FileNotFoundError...System cannot find the path specified creichle 1 122 Jan-30-2019, 12:49 AM
Last Post: Larz60+
  Cant seem to load my image file jamshaid1997 0 98 Jan-18-2019, 02:54 PM
Last Post: jamshaid1997
  Error is wave file processing vipinv23 1 120 Jan-18-2019, 02:17 PM
Last Post: Larz60+
  Guizero HX711 Load Cell and python3 stdout? Tesla 1 132 Jan-16-2019, 01:15 PM
Last Post: Larz60+

Forum Jump:

Users browsing this thread: 1 Guest(s)