Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Missing xcode dependency: Python module "six" #16428
Steps to Reproduce
On macOS High Sierra
Everything is checked except for "Missing Xcode dependency: Python module "six". Install via 'pip install six' or 'sudo easy_install six'."
I have both the built-in macOS dependent Python2.7 as well as Python3.6 (latest). I ran both pip and pip3 commands to install six. Then ran Flutter Doctor again. Still the same error. Then tried 'sudo easy_install six'. Still the same error in Flutter Doctor.
Edit: got this error when trying to install six:
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.4.1)
Tried to install the 3 module mentioned above:
I believe that I can't install anything for the macOS default version of Python because it will break lower level dependencies within the OS.
I then uninstalled Python3.6 (which was a pain to find all the directories associated with it), as well as all the symlinks. Reinstalled Python3.6, ran Flutter Doctor. Still the same error. Restarted, etc, still the same error.
Also, if I try to make Python3.6 the default python on the mac, it will likely break OS level services that depend on python2.7.
Please tell us what you were doing and what went wrong. If you are running flutter tools from the command line, please try adding the
I'm not even at the stage of building a flutter app yet. Just trying to install and setup.
Paste the output of running
[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
[!] iOS toolchain - develop for iOS devices (Xcode 9.2)
[✓] Android Studio (version 3.1)
[✓] Connected devices (1 available)
@uinz Thanks a lot :). May I know what makes you sceptic? I'll try to elaborate my issue.
The root cause for me is the fact that Mac Os Sierra uses python 2.x and when you manage to install a parallel python3 things go south with the flutter installation since the pip installer defaults to 3.x installation directory instead of OS default i.e 2.x and flutter doc doesn't detect it.
You're original solution would be perfect if people haven't installed python 3 side by side. The latter one worked for me but I guess maybe its just me.
@uinz I tried literally every option and when I run flutter doctor -v, I get
[✓] Flutter (Channel beta, v0.2.8, on Mac OS X 10.13.4 17E199, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
[✓] Android Studio (version 3.1)
[✓] Connected devices (2 available)
• No issues found!
Everything is said to be working fine until I try to debug and run the the original code when you start a new flutter project and I get this:
Missing Xcode dependency: Python module "six".
I don't know what else to do to get this to work.
@Kenny1610 clearly the case is that six is installed in python 3.6 and your system python is 2.x so six is being looked up in 2.x repo and is not found.
what's the output for?
if it has 2.7 then try
else insert the appropriate 2.x version number
@humblerookie 2.7 is the current version, so I ran the 'python2.7 -m pip install six' command and got:
I tried running the program again and still got the exact same error for some reason.
If you have already installed Python 3 on MacOS, just copy file six.py to folder /usr/local/lib/python2.7/site-packages.
You can get file six.py from https://github.com/benjaminp/six
"...Six supports every Python version since 2.6. It is contained in only one Python file, so it can be easily copied into your project. (The copyright and license notice must be retained.)..."
Christ! This one of the many reasons I loathe Python and it's ecosystem. Can we at least get accurate messaging in
Clarity is our friend.
I have reformatted two different Mac Computers with macOS Sierra but received the same errors:
Was there any progress on this issue?
#Flutter Doctor -v
@mit-mit this comes down to a bug (mis-feature?) in Xcode, which is that it's using the version of python at the front of the PATH as opposed to the system-default python it expects. Xcode itself relies on the
As a temporary workaround, I'd suggest everyone run
One thing I'll look into is whether we can stomp on any user-customisations to the PATH just for the duration of any Xcode invocations. That's certainly doable for invocations via the flutter tool itself, but I'm not 100% certain it'll work for Xcode builds that occur from the Xcode UI -- it'll depend on whether the error is occurring during the build of the Obj-C/Swift bits of the app or during our build of the AOT assembly.
Running the commands get rid of the pip six error but... when you compile a project for release you receive an error:
Error by running ->