Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running Swift in REPL #2712

Closed
3 tasks done
jonathancbarros opened this issue Jul 4, 2016 · 5 comments
Closed
3 tasks done

Error when running Swift in REPL #2712

jonathancbarros opened this issue Jul 4, 2016 · 5 comments

Comments

@jonathancbarros
Copy link

Please follow the general troubleshooting steps first:

  • Ran brew update and retried your prior step?
  • Ran brew doctor, fixed as many issues as possible and retried your prior step?
  • If you're seeing permission errors tried running sudo chown -R $(whoami) $(brew --prefix)?
  • When trying to run the System-installed Swift directly on the terminal, this error shows up:
  • I am creating this issue because I've seen this same error cited as related to the Homebrew Python version on other forums.

$ swift
Traceback (most recent call last):
File "", line 1, in
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 "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "", line 1, in
NameError: name 'run_one_line' is not defined

@MikeMcQuaid
Copy link
Member

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.

@DavidAntliff
Copy link

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

@raahimm
Copy link

raahimm commented Feb 28, 2017

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.

@bolerap
Copy link

bolerap commented Jul 10, 2017

Great thank @DavidAntliff on My machine only work with pip install six for python2 (python3 not work)

@markhdavid
Copy link

Wow pip install six worked great thanks!

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants