1

When I open my terminal and type in "swift", following Import error occurs

Air-zyx:~ zhangyongxu$ 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

and here is my python version.

Air-zyx:~ zhangyongxu$ python --version
Python 3.6.4 :: Anaconda, Inc.

I have already downloaded the "six" module, but it is still not working.

Manmohan_singh
  • 1,776
  • 3
  • 20
  • 29
zyxnine9
  • 13
  • 4

1 Answers1

0

Run it like this: PATH=/usr/bin:$PATH swift so that the proper system Python is picked up.

hnh
  • 13,957
  • 6
  • 30
  • 40