Python Forum
Setting up new Python kernel for JupyterLab Desktop on M1 Mac
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting up new Python kernel for JupyterLab Desktop on M1 Mac
#1
I am trying to set up a Python kernel running the latest version of Python - 3.10.5 - to use within JupyterLab on my M1 MacMini. I have tried a variety of approaches and keep running into what seems to be the same root problem. In my latest attempt, I followed https://queirozf.com/entries/jupyter-ker...hon-kernel. When I tried to install jupyter in the virtual environment, all was going well until I ran into an Unsupported architecture error (see below) resulting in a failure to build wheels for psutil:


creating build/temp.macosx-10.9-universal2-cpython-310/psutil/arch/osx
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=591 -DPSUTIL_OSX=1 -I/Users/dsr/custom_venv/include -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c psutil/_psutil_common.c -o build/temp.macosx-10.9-universal2-cpython-310/psutil/_psutil_common.o
In file included from psutil/_psutil_common.c:9:
In file included from /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:11:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/limits.h:21:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/limits.h:63:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture


I also tried following the instructions at https://support.esri.com/en/technical-article/000019210. In this case, I ran into a problem when I got to python -m ipykernel install --user --name <python environment> --display-name "Python (<python environment>)", because I had not installed ipykernel. When I tried to install ipykernel, with python -m pip install ipykernel, though, I got the same error related to a failure to build wheels for psutil.

I look forward to any assistance you can provide.

Sincerely, Dale
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Anaconda 2.4.2: The JupyterLab 3.5.3 fails to run the python code of the Geographical jamalnuman 0 335 Aug-23-2023, 07:48 AM
Last Post: jamalnuman
  A question about setting up Python JanOlvegg 1 571 Feb-20-2023, 10:21 PM
Last Post: deanhystad
Question Python and Power BI Desktop dangermaus33 1 1,310 Jan-19-2023, 06:54 AM
Last Post: GetOnData
  Jupyter kernel restarts russellm10 0 1,490 Sep-14-2021, 04:24 AM
Last Post: russellm10
  Problem: Restart kernel onPydev console when trying to install a python package poppy2020 1 7,709 Nov-25-2020, 06:13 PM
Last Post: Larz60+
  JupyterLab Dictionary Content Output Format Ourkid123uk 0 1,314 Sep-04-2020, 02:18 PM
Last Post: Ourkid123uk
  Kernel needs to restart ErnestTBass 0 2,355 May-06-2020, 08:37 PM
Last Post: ErnestTBass
  Cannot install R kernel or R essentials ErnestTBass 4 4,463 May-01-2020, 12:28 AM
Last Post: Larz60+
  Iterating kernel through image for filtering davlovsky 0 3,507 Sep-29-2019, 02:45 PM
Last Post: davlovsky
  Advice on Setting Up the Python Environment punksnotdead 1 2,377 May-15-2019, 04:29 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020