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
  Unable to allocate specific memory VirtualDreamer 1 47 Jul-13-2019, 07:04 AM
Last Post: Gribouillis
  Load JSON file data into mongodb using pymongo klllmmm 1 176 Jun-28-2019, 12:47 AM
Last Post: klllmmm
  plugin:xxx.py hasfailed to load 1204eray 1 125 Jun-26-2019, 09:23 PM
Last Post: micseydel
  Unable to parse xml file avi1990pr 1 138 Jun-21-2019, 04:56 AM
Last Post: mcmxl22
  CPU load at approx. 30% when multiprocessing freak14 4 185 Jun-20-2019, 10:29 AM
Last Post: DeaD_EyE
  Difference between os.system("clear") and os.system("cls") chmsrohit 6 367 Jun-16-2019, 11:38 AM
Last Post: DeaD_EyE
  pydev error pydev debugger: warning: trying to add breakpoint to file that does not e kwhhst 8 392 Jun-15-2019, 02:52 PM
Last Post: kwhhst
  Unable to get the data pythonFresher 5 194 May-22-2019, 03:16 PM
Last Post: buran
  json.load causing IndexError: list index out of range WallyZ 5 267 May-20-2019, 01:11 PM
Last Post: WallyZ
  Fatal error in launcher: Unable to create process using '"' rsmldmv 0 167 May-13-2019, 01:34 AM
Last Post: rsmldmv

Forum Jump:


Users browsing this thread: 1 Guest(s)