Reputation: 497
I recently got a new mac. I am was trying to download Python 3.9 and Anaconda Navigator on it. I got both of those downloads from the web and followed all the standard instructions. However, here is what now happens when I type python3 into the terminal.
(base) myname@myname-MBP bin % python3
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/Users/myname/opt/anaconda3/bin/python3'
sys.base_prefix = '/Users/myname/opt/anaconda3'
sys.base_exec_prefix = '/Users/myname/opt/anaconda3'
sys.platlibdir = 'lib'
sys.executable = '/Users/myname/opt/anaconda3/bin/python3'
sys.prefix = '/Users/myname/opt/anaconda3'
sys.exec_prefix = '/Users/myname/opt/anaconda3'
sys.path = [
'/Users/myname/opt/anaconda3/lib/python39.zip',
'/Users/myname/opt/anaconda3/lib/python3.9',
'/Users/myname/opt/anaconda3/lib/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x0000000202f42600 (most recent call first):
<no Python frame>
I have been looking at resources online but am still very confused. I think part of the problem is that I am not comfortable with the notion of PATH. Some resources seem to suggest that I should be manually adding things or taking away things from the path, and others seem to suggest that I shouldn't be. I'm so confused and would be so grateful for any pointers either to resources that could help me learn relevant info to debug this issue, or for any ideas about how to fix this directly.
EDIT: I have no idea what I did (I'm pretty sure I did nothing), but now when I type python3 in the terminal I get the following:
myname@myname-MBP ~ % python3
Python 3.9.0 (v3.9.0:9cf6752276, Oct 5 2020, 11:29:23)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
However, I still have the same problem I discussed above when I try to use conda
myname@myname-MBP ~ % conda
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = '/Users/myname/opt/anaconda3/bin/python'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/Users/myname/opt/anaconda3/bin/python'
sys.base_prefix = '/Users/myname/opt/anaconda3'
sys.base_exec_prefix = '/Users/myname/opt/anaconda3'
sys.platlibdir = 'lib'
sys.executable = '/Users/myname/opt/anaconda3/bin/python'
sys.prefix = '/Users/myname/opt/anaconda3'
sys.exec_prefix = '/Users/myname/opt/anaconda3'
sys.path = [
'/Users/myname/opt/anaconda3/lib/python39.zip',
'/Users/myname/opt/anaconda3/lib/python3.9',
'/Users/myname/opt/anaconda3/lib/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x000000020379b600 (most recent call first):
<no Python frame>
Also, when I try to click on the graphical icon for AnacondaNavigator, nothing happens.
Upvotes: 0
Views: 470
Reputation: 497
The problem was solved by deleting and then re-installing Anaconda
Upvotes: 1