-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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 building on MacOS due to python3 not found #6931
Comments
the "Multiple libraries were found for " is a bug in Arduino IDE (builder). it reports it at any error. |
Thanks, I will investigate further! |
on arduino forum was discussed that the python3 link is wrong on Mac and should be set to correct path @earlephilhower, do you know about the problem? |
@JAndrassy I think the problem is that there are now 2 spots where python3 may be on the Mac. We're actually building on MacOS as part of CI, now, and when homebrew installs python3, it's in the directory linked in the tarball. Maybe there was an OS update/release recently where python3 is already installed? MacOS in CI (sorry, no idea what rev but a Mac guy might be able to look at any build log and tell from any PR) only had the obsolete Python2 installed under /usr/bin/python and no Python3 at all (hence the homebrew installation). Can anyone with a Mac confirm? |
I have an up to date Mac |
Thanks, @liebman . So it looks like on an updated Mac the link in the tarball is correct (at least when brew is used). @harveydobson, how did you install Python3 on your Mac? |
I get the same error (no such file or directory) |
@tonywhitfort , how did you get Python3 on your Mac? Is it now part of the standard distro, did you download a standalone installer, use brew, or something else? |
I didn’t install Python3 myself it was possibly installed by one of these
Eclipse IDE (which I installed earlier this year for some Arduino projects)
Platform IO and also Xcode (which I installed earlier this year but haven’t used since)
Python3 version is 3.7.3 dated 15 Nov 2019, so something is keeping it up to date.
I installed MacOS Catalina as an upgrade, I haven’t done a clean install for years
… On 29 Dec 2019, at 5:27 am, Earle F. Philhower, III ***@***.***> wrote:
@tonywhitfort </~https://github.com/tonywhitfort> , how did you get Python3 on your Mac? Is it now part of the standard distro, did you download a standalone installer, use brew, or something else?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#6931?email_source=notifications&email_token=AE3IZCW5XHWRME2SRWA3MWLQ26LCTA5CNFSM4J6G5DOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYPTLQ#issuecomment-569440686>, or unsubscribe </~https://github.com/notifications/unsubscribe-auth/AE3IZCVAUPJDXSVQE7HTIN3Q26LCTANCNFSM4J6G5DOA>.
|
Just chiming in, I have this problem as well on my Mac OS. Currently /Users/USER/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3 points at /usr/local/bin/python3 But it should point at /usr/bin/python3 |
My workaround that seems to work: cd ~/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1 |
Anyway, does MacOS have |
UPDATE: I've updated xcode and now I have a python3 in /usr/bin. (and one from brew in /usr/local/bin) @earlephilhower - yes /usr/bin/env exists and is functional on MacOS. |
It's odd, but because Windows requires a full Python3 install we must have an executable called "tools/python3/python3" to use Python3 in the toolchain. Before, we simply symlinked to /usr/bin/python3 (for Linux) or /usr/local/bin/python3 (Mac). Unfortunately, depending on the method of installation, on MacOS the Python3 executable can be in /usr/bin/python3 instead. To avoid the entire issue, unify the Mac and Linux python3 placeholders to use python3 itself to jump to the real executable. Fixes esp8266#6931
@farthinder, @tonywhitfort , others with /usr/bin/python3 : Can you please try #6960 and report? You'll need to re-run the get.py to retrive the new python3 redirect stuff? You'll want to remove any symlinks you made in /usr/bin/local to make the old version work, of course. This new one uses the |
@earlephilhower I happened to be setting up a new mac so I gave this a try to the best of my abilities. First of, on a clean mac when running python3 you get asked if you want to install "command line dev tools" which I declined at first. Then when cloning your pullrequest #6960 I got the same dialogbox when running git so I allowed the "command line dev tools" to get installed. esp8266 % git fetch origin pull/6960/head:pythonfix During handling of the above exception, another exception occurred: Traceback (most recent call last): |
That's a MacOS python problem, unfortunately, and not much we can do. When Python3 is installed (any way) it doesn't register the SSL certificates needed to actually do any internet access and dumps the error you're seeing. You'll have the same problem running any other Python3 wget-like thing that needs HTTPS. The solution is included in the Python3 readme, or should be if it's been repackaged.
You're going to have to adjust the CD to wherever you've got the Python3 directory installed. That script from the python team does the registration of those certs. After that, https connections in Python should work. |
* Use a python3 script to call python3 It's odd, but because Windows requires a full Python3 install we must have an executable called "tools/python3/python3" to use Python3 in the toolchain. Before, we simply symlinked to /usr/bin/python3 (for Linux) or /usr/local/bin/python3 (Mac). Unfortunately, depending on the method of installation, on MacOS the Python3 executable can be in /usr/bin/python3 instead. To avoid the entire issue, unify the Mac and Linux python3 placeholders to use python3 itself to jump to the real executable. Fixes #6931 * Explicitly remove old symlink to python3 The tar extraction for the updated python3 tarball will fail on systems that already have a symlink in /tools/python3/python3 because the tar extractor attempts to open the *target of the symlink* (i.e. the actual interpreter in /usr/bin or /usr/local/bin). Add a commented hack to destroy this symlink before expanding the tarballs, if the file exists. This is safe to do since it will be overwritten by any extractions of the python3 tarball later in the process. Co-authored-by: david gauchard <gauchard@laas.fr>
Workaround without admin permissions (i.e. in a corporate environment): cd ~/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1
unlink python3
ln -s /usr/bin/python3 python3 The symlink can be created without the need for |
the first you must run command to identify your current python:
|
After 12 hrs of headaches trying to figure out how to bypass iMac SIP, so to get python3 path to work with my Wemos d1.. This worked like a charm! Thank you so much. |
I get the same error and when I run |
This seems to be still an issue? Latest versions of all IDE and ESP8266 core except I run High Sierra.
this works |
No, it's no longer an issue for me at least. |
Yes but I updated the esp core from 2.7.0 to 2.7.1 and the problem resurfaced. |
Mine was an update as well. I had to remove something else to get it to work. Sad that macos is still shipping python 2. |
High Sierra was released September 25, 2017. I don't know if it's worth accommodating the brew installed python3 package. They're pretty common. The symlink is at /usr/local/bin/python3 right. |
I have python3 installed by HomeBrew and the issue resurfaces every time I update ESP8266 board. |
I propose to change default python3 location to /usr/bin/python3 as this is system python3 location |
solve problem by adding this symlink here Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1
|
Basic Infos
Platform
Settings in IDE
Problem Description
Edit by @devyte:
The problem seems to be that the build process doesn't find python3 on MacOS. Duplicate WiFi libs warning is unrelated.
Original Problem Description follows.
--------------------------------------------------------------------------------------------------------------------
When including the library and selecting the board, any code i use whether it is the wifi search or the code I was looking to use in my project, I get the following error:
If i remove the library it finds nothing. This is a new installation on my mac so there wouldn't be any conflicts. Not sure if anyone has experienced the same..? Seems likely unless i'm doing something very wrong, but looking at the current issue list I cannot see anything like this.
Thanks
MCVE Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: