-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Spyder_kernels 2.4.0 mod installation in python 3.11 on M1 Macbook Air #20191
Comments
Hey @iayoung85, thanks for reporting. You said:
So, how did you install Spyder?
This part of the error
seem to point out to a problem with the Python version you installed. So, I think you have a Python 3.11 for Intel Macs, which is giving an error for one of the packages required by Spyder-kernels. My suggestion is that you remove your current Python 3.11 and reinstall the version that runs natively on the M1 chip. |
This version of python runs just fine from the macOS terminal. The problem only comes from spyder trying to use it.Best,IsaacOn Dec 14, 2022, at 10:28 PM, Carlos Cordoba ***@***.***> wrote:
Hey @iayoung85, thanks for reporting. You said:
I don't have anaconda.. I actually had it and i've gone ahead and done my best to try to uninstall it.. though i really don't know if i did a good job uninstalling it.. Do i really need anaconda?
So, how did you install Spyder?
An error occurred while starting the kernel
This part of the error
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site‑packages/psutil/_psutil_osx.abi3.so, 0x0002): tried: '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site‑packages/psutil/_psutil_osx.abi3.so' (mach‑o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site‑packages/psutil/_psutil_osx.abi3.so' (no such file), '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site‑packages/psutil/_psutil_osx.abi3.so' (mach‑o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
seem to point out to a problem with the Python version you installed. So, I think you have a Python 3.11 for Intel Macs, which is giving an error for one of the packages required by Spyder-kernels.
My suggestion is that you remove your current Python 3.11 and reinstall the version that runs natively on the M1 chip.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Sure, I guess it doesn't have a problem to run thanks to Rosetta2. But it seems to be confusing one of the libraries required by Spyder-kernels. So, as said, please uninstall it and install a version which works natively for the M1 chip, i.e. an ARM64 Mac Python version. |
ccordoba12, |
You're right. They don't release a specific version for M1 chips. So, my suggestion is for you to
I know you don't want to use Anaconda/Miniconda, but I think this is the simplest way to move forward. If you want to keep trying with your current Python installation, it's up to you because I have no idea how to solve that problem. |
Closing due to lack of response. |
I am having the same issues with my new MacBookPro2023 (M2 Max chip) and using the Python Universal Installer (ARM) so something weird is going on with Spyder that is not working: ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site‑packages/psutil/_psutil_osx.abi3.so, 0x0002): tried: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site‑packages/psutil/_psutil_osx.abi3.so' (mach‑o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site‑packages/psutil/_psutil_osx.abi3.so' (no such file), '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site‑packages/psutil/_psutil_osx.abi3.so' (mach‑o file, but is an incompatible architecture (have 'arm64', need 'x86_64')) |
@issimo007, it seems you are new to Python or Scientific Python. I say it because installing Spyder to the your system Python (i.e. the Python that comes pre-installed with Mac) is a really bad idea since you can quite easily break your system. If that's the case, please save yourself a lot of trouble by simply downloading our Mac application from here and use that instead. In case you observe strange problems with your computer (probably due to you messing with your system Python), I'd also recommend to reinstall your Mac version. |
Carlos not new at all to Python. The install is from Spyder directly and as I have pointed out there is an issue with the ARM64 architecture. It's ok if you say you don't know the answer to this problem but it is a problem so be aware. To be specific, the Python version that comes pre-installed with Spyder works but using v10 or v11 causes the issue only on the ARM64 Mac. On my intel Mac I have no issues at all. |
i did end up giving up on conda or miniconda or spyder due to this kind of errors.. I have moved to VScode and, while it's more complicated, It's well worth the trouble to learn it.. Though I am open to hearing what others think of VScode when compared to Spyder here! |
Spyder is great and I usually use PIP (I profoundly dislike the Conda business model) for all my packages and have had no issues until this new chip with Apple. The vanilla install with Spyder works out of the box but if I want to use Python v11 then the Spyder-kernels fail completely and the error seems to be related to psutil and the ARM64 architecture. I read on other forums this is an issue. Hopefully they can sort it out. |
Traceback (most recent call last): |
Above is the error I get when using 3.11 instead of the built in |
yes this is exactly the problem i feel i was facing.. I don't blame anyone.. I'm so amazed that Python developers keep working so hard to bring out new versions and it's very understandable that it can take months for these new versions to be fully ironed out. I should just never use the latest version.. stay with 3.10 until 3.12 comes out then try 3.11 maybe? haha i just get obsessed with trying to keep everything up to date. |
Ok, sorry for the wrong assumption. Perhaps installing from Python.org follows the same layout as the system Python one. And installing to system Python is a very rookie mistake, as you probably know.
That's why we created self-contained and error free apps for Windows and Mac years ago. If you want to keep fighting with Conda or Pip, up to you. We can't prevent that but try to discourage it because you can easily enter in dll or dependency hell.
See issue #17155.
Ok, I see what you're trying to do now and for that my advice of using our Mac app wouldn't help either. It seems that
It's the same error as before, so nothing we can do about it.
I think you'll find the same error even if you're using VSCode because it also requires to install IPykernel in Python envs in order to connect to them. |
ok this is weird but it seems to work performing the following (found it on the psutil open issues: giampaolo/psutil#2098):
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at pypa/pip#11453
I tried reinstalling psutil many times without using the "--no binary" command and it didn't work. Not sure why that works but it seems to do the trick. |
@ccordoba12 my quick trick didn't really work. For now I am using Spyder as is but unable to use an ARM based interpreter outside of Spyder's built in. I suspect the kernels are not working properly but I could be wrong. |
They are working just fine if you use Conda-forge packages, which support the new arm64 Mac architecture. |
Any progress on getting ARM based chip compatibilities fixed? |
There isn't and I'm sorry to say it but there's not going to be because that's something we can fix. If you don't want to use Conda and Conda-forge packages, there's no way to use Spyder natively on M1/M2 Macs, sorry. |
Hello folks I forgot to update this forum but it seems the simplest solution is to install packages as follows, including the Spyder kernels and everything works as long rosetta is installed (softwareupdate --install-rosetta): pip install --no-binary :all: pandas or any other package. |
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
sorry i'm kind of a noob here.. I usually use a PC but my laptop is a macbook.. so it makes life a little bit more difficult obviously trying to learn in both platforms..
i am trying to run an M1 macbook air and i'm trying to get spyder running with python3.11.
I don't have anaconda.. I actually had it and i've gone ahead and done my best to try to uninstall it.. though i really don't know if i did a good job uninstalling it.. Do i really need anaconda?
What steps reproduce the problem?
What is the expected output? What do you see instead?
I expect to see the python 3.11 interpreter kernel start running
instead i see:
An error occurred while starting the kernel
Paste Traceback/Error Below (if applicable)
Versions
Spyder version: 5.4.0
Python version: 3.11.0
Qt version: ??? idk what this is
PyQt version: ??? idk what this is
Operating System name/version:13.0.1 (22A400)
Dependencies
The text was updated successfully, but these errors were encountered: