-
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
Projects won't upload with error: python3: No such file or directory #7346
Comments
Thank you. I think it would be useful to document this problem and the solution somewhere more accessible. |
The issue template, which you ignored here, has a checklist with an item directing to search for a similar issue before opening. It took me 15s to search "python" and find it. |
The problem is that the solution is buried in the middle of that long thread. I'm not familiar enough with GitHub to be comfortable making a pull request, but I suggest you add the following to the FAQ at:
On MacOS uploading from the Arduino IDE fails with the error: python3: No such file or directoryThe latest versions of the ESP8266 core (later than 2.5.2) require Python 3 which is not installed by default on MacOS. You can install it as follows:
https://www.python.org/downloads/
You may also need to update the symlink in the ESP8266 core files to point to the copy of Python you've installed by giving the following commands from the Terminal:
|
Thanks, @technoblogy, that seems like a good writeup. Unfortunately, none of the maintainers use a Mac so we've been using the Travis-CI Mac instances. FWIW, the CI actually does run just fine (compile a sketch to a BIN) MacOS builds in VMs so I'm curious what the difference is between the MacOS VM and whatever OS version you're running. Could you take a look at the build steps in: And are you aware of any way to do a portable install of Python3 on the Mac? We do that on Windows so users don't have to install a thing other than the base IDE. |
@technoblogy, there's something fishy in your installation. The 2.7.1 install does not have a 3.7.2-post1 dir, that's from a much older version. Maybe the tools weren't updated properly or something (this is a tool tarball). That said, I've had success on a clean Mac and Arduino just following the steps in: |
@earlephilhower thanks for your replies. I'll try and test what you're suggesting, but I don't understand some of your explanations. What is "CI" and what are "Travis-CI Mac instances"? |
@earlephilhower I've just deleted the installation and reinstalled and I get this: which definitely does have a 3.7.2-post1 dir. |
Ah, looks like it's added by your IDE. If you go to the tarball itself, https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/python3-via-env.tar.gz In any case, there is now a script which uses |
OK, I don't quite understand, but you're saying that people shouldn't get my problem in future? Perhaps the FAQ should still suggest they'll need to manually install Python 3 on Mac? |
The latest Mac OS actually prompts the user with a dialog to install it on first use (see the screenshot from the linked comment above). So, I don't think the FAQ needs anything...Apple has taken care of it and made it pretty painless. After reinstall of the toolchain, does the build work w/o the symlink for you, then? |
No, unfortunately not. I again get:
but doing this again fixed it:
|
Oh, I just noticed that you're on a very old MacOS 10.3 (Panther? early 2000s?). I had no idea that was still viable today. That's the root of things here. That version only had Python 2 (many years obsolete, and completely unsupported as of 1/1/2020 or so)...Python 3 wasn't even a thing back then. Apple added the automatic Python3 install goodness in modern versions. For your own case, sure make the link or install a proper version so that I'm against putting a symlink hack into the FAQ because in most cases it's just not needed and it's not really the right way to get things working for most people. |
No, I'm on High Sierra (10.13.6). Sorry, that was a typo. |
Whew. I thought you were still rocking a PowerPC based Mac. :) The proper way would be to say "Install Xcode as a prerequisite for OS X prior to 10.(14?15?)" 15 has the nice auto-installer, bet that was only just added) and give the URL in the FAQ. The alternative would be to prepackage a portable Python (say that 5 times fast) just like we do with Windows. Let me see if I can throw together a tarball that can be used by OSX. |
OK, I've got something that passes CI so can you manually try the blob pr #7348 attempts to use for
These steps would be automatically done by the Arduino IDE should a 2.7.2 release be done which includes this #7348 patch, so end users will just click and no, no need for these gymnastics or making symlinks manually. |
Yes, that works like a dream - no errors to report! Thanks for getting to the bottom of this. |
I have just upgraded the Arduino ESP8266 core to 2.7.1 and my projects no longer load, with the error:
I'm on MacOS 10.13.6. I've installed Python 3 but this hasn't fixed it. Downgrading to the 2.5.2 version of the core works OK. Any suggestions?
The text was updated successfully, but these errors were encountered: