简体   繁体   中英

why do I get an error when trying to run swift language in mac terminal with $ swift

I'm trying to run swift in mac terminal with this simple command:

$ swift

but I get a load of errors every time

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

continued for about a thousand lines ...

do I need to install a package or something

Are you using Brew to install Python versions on your macOS ?

I fix it uninstall python version installed from Brew.

brew uninstall --force python

That suited me !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM