0

I just installed s3cmd via homebrew on Mac High Sierra. Immediately when I go to run it, I get this error ...

davea$ s3cmd
Python path configuration:
  PYTHONHOME = '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7'
  PYTHONPATH = '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin'
  program name = '/usr/local/Cellar/s3cmd/2.0.2_2/libexec/bin/python3.8'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = '/usr/local/Cellar/s3cmd/2.0.2_2/libexec/bin/python3.8'
  sys.base_prefix = '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7'
  sys.base_exec_prefix = '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7'
  sys.executable = '/usr/local/Cellar/s3cmd/2.0.2_2/libexec/bin/python3.8'
  sys.prefix = '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7'
  sys.exec_prefix = '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7'
  sys.path = [
    '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin',
    '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python38.zip',
    '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.8',
    '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.8/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 0x00007fff9f066380 (most recent call first):
<no Python frame>

I have verified that my $PYTHONHOME and $PYTHONPATH paths actually exist but am unclear what the errors mean. I have also tried reinstalling Python via homebrew.

What do I need to set PYTHONHOME and PYTHONPATH env vars to get this to work?

Dave
  • 15,639
  • 133
  • 442
  • 830
  • It looks like you have two different Python versions installed, 3.7 and 3.8 and there's some conflict. You probably should figure out why there are two versions stomping on one another. – l'L'l Mar 05 '20 at 22:33
  • Side-note: These days, it is recommended to use the official [AWS Command-Line Interface (CLI)](http://aws.amazon.com/cli/) rather than `s3cmd` (which hasn't been updated in years). – John Rotenstein Mar 06 '20 at 00:00

0 Answers0