0

I am trying to install jupyter notebook in my local.

If I run pip install jupyterlab I get the following output.

  Using cached jupyterlab-3.4.3-py3-none-any.whl (8.8 MB)
Collecting jupyterlab-server~=2.10
  Using cached jupyterlab_server-2.14.0-py3-none-any.whl (54 kB)
Collecting nbclassic~=0.2
  Using cached nbclassic-0.3.7-py3-none-any.whl (13 kB)
Collecting jinja2>=2.1
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting jupyter-server~=1.16
  Using cached jupyter_server-1.18.0-py3-none-any.whl (344 kB)
Collecting ipython
  Using cached ipython-8.4.0-py3-none-any.whl (750 kB)
Collecting jupyter-core
  Using cached jupyter_core-4.10.0-py3-none-any.whl (87 kB)
Collecting tornado>=6.1.0
  Using cached tornado-6.1.tar.gz (497 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: packaging in c:\msys64\mingw64\lib\python3.9\site-packages (from jupyterlab) (21.3)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.1.1.tar.gz (18 kB)
  Preparing metadata (setup.py) ... done
Collecting prometheus-client
  Using cached prometheus_client-0.14.1-py3-none-any.whl (59 kB)
Collecting traitlets>=5.1
  Using cached traitlets-5.3.0-py3-none-any.whl (106 kB)
Collecting websocket-client
  Using cached websocket_client-1.3.3-py3-none-any.whl (54 kB)
Collecting pywinpty
  Using cached pywinpty-2.0.5.tar.gz (23 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [63 lines of output]
      Collecting maturin<0.13,>=0.12.6
        Using cached maturin-0.12.20.tar.gz (156 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'error'
        error: subprocess-exited-with-error
     
        Getting requirements to build wheel did not run successfully.
        exit code: 1
     
        [40 lines of output]
        Traceback (most recent call last):
          File "C:\Users\SMaronas\AppData\Local\Temp\tmp8a0ebdap_in_process.py", line 363, in <module>
            main()
          File "C:\Users\SMaronas\AppData\Local\Temp\tmp8a0ebdap_in_process.py", line 345, in main
            json_out['return_val'] = hook(**hook_input['kwargs'])
          File "C:\Users\SMaronas\AppData\Local\Temp\tmp8a0ebdap_in_process.py", line 124, in get_requires_for_build_wheel            backend = _build_backend()
          File "C:\Users\SMaronas\AppData\Local\Temp\tmp8a0ebdap_in_process.py", line 89, in _build_backend
            obj = import_module(mod_path)
          File "C:\msys64\mingw64\lib\python3.9\importlib\__init__.py", line 127, in import_module
            return _bootstrap._gcd_import(name[level:], package, level)
          File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
          File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
          File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
          File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
          File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
          File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
          File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
          File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
          File "<frozen importlib._bootstrap_external>", line 850, in exec_module
          File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
          File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\__init__.py", line 241, in <module>
            monkey.patch_all()
          File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 99, in patch_all
            patch_for_msvc_specialized_compiler()
          File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 162, in patch_for_msvc_specialized_compiler
            patch_func(*msvc9('find_vcvarsall'))
          File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 149, in patch_params
            mod = import_module(mod_name)
          File "C:\msys64\mingw64\lib\python3.9\importlib\__init__.py", line 127, in import_module
            return _bootstrap._gcd_import(name[level:], package, level)
          File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
          File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
          File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
          File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
          File "<frozen importlib._bootstrap_external>", line 850, in exec_module
          File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
          File "C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-riviqm6h\overlay\lib\python3.9\site-packages\setuptools\_distutils\msvc9compiler.py", line 295, in <module>
            raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
        distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
        [end of output]
     
        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: subprocess-exited-with-error
     
      Getting requirements to build wheel did not run successfully.
      exit code: 1
      
      See above for output.
     
      note: This error originates from a subprocess, and is likely not a problem with pip.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I already tried pip install wheel and the result is that it is already installed.

Requirement already satisfied: wheel in c:\msys64\mingw64\lib\python3.9\site-packages (0.37.1)

I already tried uninstalling and reinstalling python entirely.

A few things to notice:

  • I am trying to do this on windows
  • I do have WSL installed and enabled (idk if that is causing some noise)
sebsmgzz
  • 361
  • 2
  • 11

1 Answers1

1

See this link. Apparently the GTK is this issue consider switching, or uninstalling setuptools (pip). And use pacman. msys2/mingw64: pip: VC 6.0 is not supported by this module

1extralime
  • 606
  • 3
  • 6
  • Thanks, should I do apt-get instead of pacman? My wsl is running ubuntu under the hood – sebsmgzz Jul 02 '22 at 08:53
  • I would assume so yes. – 1extralime Jul 02 '22 at 22:37
  • So, first I change to the wsl. Then run ```apt-get install mingw-w64-x86_x64-python3-setuptools``` which returns ``` Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package mingw-w64-x86_x64-python3-setuptools ``` – sebsmgzz Jul 02 '22 at 23:50
  • Alright, the actual package name for ubuntu was ```python3-setuptools```. I already had that installed, so I removed it and leftover dependencies (```apt autoremove```), and then reinstalled it. Now it complains about not having a rust compiler. ``` Building wheel for maturin (pyproject.toml) did not run successfully. ... creating build\lib.mingw_x86_64-3.9\maturin copying maturin\import_hook.py -> build\lib.mingw_x86_64-3.9\maturin copying maturin\__init__.py -> build\lib.mingw_x86_64-3.9\maturin running build_ext running build_rust error: can't find Rust compiler ``` – sebsmgzz Jul 02 '22 at 23:55
  • Have you searched for how to install the rust compiler? It seems like a lot of work to install jupyter notebook. Just be sure, did you run ```pip install jupyter``` prior to jupyterlab? – 1extralime Jul 03 '22 at 00:51
  • I... did not. Sorry I am new to Jupyter. After running that command I saw the error in ```Getting requirements to build wheel ... error``` fail with ```ImportError: cannot import name 'Feature' from 'setuptools' (C:\Users\SMaronas\AppData\Local\Temp\pip-build-env-qtxe1kn2\overlay\lib\python3.9\site-packages\setuptools\__init__.py)``` – sebsmgzz Jul 03 '22 at 21:45
  • 1
    You may need a specific version of setuptools. If these issues persist and you just want to use notebooks, id suggest installing with the anaconda suite. I know its not a resolution to this issue, but its a solution. https://www.anaconda.com/ – 1extralime Jul 03 '22 at 23:28
  • Alright, I gave up. But as stated by @1extralime, by installing anaconda I was able to launch the notebook. – sebsmgzz Jul 04 '22 at 10:20