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
  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)