brew update and retried your prior step?brew doctor, fixed as many issues as possible and retried your prior step?sudo chown -R $(whoami) $(brew --prefix)?$ swift
Traceback (most recent call last):
File "
File "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/init.py", line 98, in
import six
ImportError: No module named six
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "
NameError: name 'run_one_line' is not defined
When trying to run the System-installed Swift directly on the terminal, this error shows up:
This is an error with the system-installed Swift and not Homebrew's Swift so should be reported to Apple rather than Homebrew.
I am creating this issue because I've seen this same error cited as related to the Homebrew Python version on other forums.
Even if this was due to the Homebrew Python it would require modifying the system Swift which we cannot do.
For anyone finding this, I fixed this issue (with system swift) by installing 'six' with 'pip install six'. It is a python2-3 compatibility library and seems to be a missing dependency of lldb, which swift uses in its REPL. This might occur if you're not using system python (e.g. installed python via homebrew, pythonbrew, pyenv, etc).
Thank you @DavidAntliff you are right and if any one have "easy_install" on his/her machine then just type "easy_install six" and press enter. Then it will be install automatically.
Great thank @DavidAntliff on My machine only work with pip install six for python2 (python3 not work)
Wow pip install six worked great thanks!
Most helpful comment
For anyone finding this, I fixed this issue (with system swift) by installing 'six' with 'pip install six'. It is a python2-3 compatibility library and seems to be a missing dependency of lldb, which swift uses in its REPL. This might occur if you're not using system python (e.g. installed python via homebrew, pythonbrew, pyenv, etc).