6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

コマンドラインからSwiftを実行したらImportError: No module named six

Posted at

コマンドラインからSwiftを実行してみようと思ったら、エラーメッセージが大量に出た

$ swift
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 98, in <module>
    import six
ImportError: No module named six

Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined

  ・
(省略)上記3行のエラーが繰り返し大量に表示
  ・
  
Welcome to Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.30). Type :help for assistance.
  1>  

ImportError: No module named sixでググって、下記のようにしたらエラーメッセージが消えた。

$ easy_install six

おそらく、どこかでPythonのプログラムが使われていて
sixというPythonのモジュールが足りなかった模様。

参考
python - ImportError: No module named six - Stack Overflow

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?