microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.58k stars 908 forks source link

Python not working #26043

Open PyMach opened 1 week ago

PyMach commented 1 week ago

Steps to Reproduce:

  1. Got the new machine and installed python 3.13
  2. Install ADS 1.49.0 or 1.49.1
  3. Open the existing Python notebook file
  4. the below dialog comes up Image
  5. Click "NEXT" and below screen shows up Image
  6. Click "Install" you will get the attached error message

Does this issue occur when all extensions are disabled?: Yes

Error Message

Notebook dependencies installation is in progress

"C:\Program Files\Python313\python.exe" -m pip install --user "jupyter>=1.0.0" "notebook==6.5.6" "ipykernel==5.5.5" stdout: Collecting jupyter>=1.0.0 stdout: stdout: Using cached jupyter-1.1.1-py2.py3-none-any.whl.metadata (2.0 kB) stdout: stdout: Collecting notebook==6.5.6 stdout: stdout: Using cached notebook-6.5.6-py3-none-any.whl.metadata (2.5 kB) stdout: stdout: Collecting ipykernel==5.5.5 stdout: stdout: Using cached ipykernel-5.5.5-py3-none-any.whl.metadata (1.1 kB) stdout: stdout: Collecting jinja2 (from notebook==6.5.6) stdout: stdout: Using cached jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB) stdout: stdout: Collecting tornado>=6.1 (from notebook==6.5.6) stdout: stdout: Using cached tornado-6.4.1-cp38-abi3-win_amd64.whl.metadata (2.6 kB) stdout: stdout: Collecting pyzmq<25,>=17 (from notebook==6.5.6) stdout: stdout: Using cached pyzmq-24.0.1.tar.gz (1.2 MB) stdout: stdout: Installing build dependencies: started stdout: stdout: Installing build dependencies: finished with status 'done' stdout: stdout: Getting requirements to build wheel: started stdout: stdout: Getting requirements to build wheel: finished with status 'error' stdout: stderr: error: subprocess-exited-with-error stderr:
stderr: Getting requirements to build wheel did not run successfully. stderr: exit code: 1 stderr:
stderr: [85 lines of output] stderr: C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools_distutils\dist.py:261: UserWarning: Unknown distribution option: 'cffi_modules' stderr: warnings.warn(msg) stderr: running egg_info stderr: writing pyzmq.egg-info\PKG-INFO stderr: writing dependency_links to pyzmq.egg-info\dependency_links.txt stderr: writing requirements to pyzmq.egg-info\requires.txt stderr: writing top-level names to pyzmq.egg-info\top_level.txt stderr: running configure stderr: Traceback (most recent call last): stderr: File "C:\Program Files\Python313\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in stderr: main() stderr: ~~~~^^ stderr: File "C:\Program Files\Python313\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main stderr: json_out['return_val'] = hook(hook_input['kwargs']) stderr: ~~~~^^^^^^^^^^^^^^^^^^^^^^^^ stderr: File "C:\Program Files\Python313\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel stderr: return hook(config_settings) stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\build_meta.py", line 333, in get_requires_for_build_wheel stderr: return self._get_build_requires(config_settings, requirements=[]) stderr: ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\build_meta.py", line 303, in _get_build_requires stderr: self.run_setup() stderr: ~~~~~~^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\build_meta.py", line 319, in run_setup stderr: exec(code, locals()) stderr: stderr: ~~~~^^^^^^^^^^^^^^^^ stderr: File "", line 1376, in stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools__init__.py", line 117, in setup stderr: return distutils.core.setup(attrs) stderr: ~~~~^^^^^^^^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools_distutils\core.py", line 183, in setup stderr: return run_commands(dist) stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools_distutils\core.py", line 199, in run_commands stderr: dist.run_commands() stderr: ~~~~~^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 954, in run_commands stderr: self.run_command(cmd) stderr: ~~~~^^^^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\dist.py", line 999, in run_command stderr: super().run_command(command) stderr: ~~~~~~~^^^^^^^^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 973, in run_command stderr: cmd_obj.run() stderr: ~~~^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 312, in run stderr: self.find_sources() stderr: ~~~~~^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 320, in find_sources stderr: mm.run() stderr: ~~^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 541, in run stderr: self.add_defaults() stderr: ~~~~~^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 579, in add_defaults stderr: sdist.add_defaults(self) stderr: ~~~~~~^^^^^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\command\sdist.py", line 109, in add_defaults stderr: super().add_defaults() stderr: ~~~~^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools_distutils\command\sdist.py", line 238, in add_defaults stderr: self._add_defaults_ext() stderr: ~~~~~~^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools_distutils\command\sdist.py", line 322, in _add_defaults_ext stderr: build_ext = self.get_finalized_command('build_ext') stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools_distutils\cmd.py", line 303, in get_finalized_command stderr: cmd_obj.ensure_finalized() stderr: ~~~~~~~~^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools_distutils\cmd.py", line 111, in ensure_finalized stderr: self.finalize_options() stderr: ~~~~~^^ stderr: File "", line 1112, in finalize_options stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\dist.py", line 999, in run_command stderr: super().run_command(command) stderr: ~~~~~~~^^^^^^^^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 972, in run_command stderr: cmd_obj.ensure_finalized() stderr: ~~~~~~~~^^ stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools_distutils\cmd.py", line 111, in ensure_finalized stderr: self.finalize_options() stderr: ~~~~~^^ stderr: File "", line 359, in finalize_options stderr: File "C:\Users\localusername\AppData\Local\Temp\pip-install-reyc2ze5\pyzmq_21c8931b7a0341b3ab31f7d911ba6b31\buildutils\misc.py", line 71, in locate_vcredist_dir stderr: vcvars = msvc.msvc14_get_vc_env(plat) stderr: ^^^^^^^^^^^^^^^^^^^^^^ stderr: AttributeError: module 'setuptools.msvc' has no attribute 'msvc14_get_vc_env' stderr: [end of output] stderr:
stderr: note: This error originates from a subprocess, and is likely not a problem with pip. stderr: stderr: stderr: [notice] A new release of pip is available: 24.2 -> 24.3.1 stderr: stderr: [notice] To update, run: python.exe -m pip install --upgrade pip stderr: stderr: error: subprocess-exited-with-error stderr: stderr: Getting requirements to build wheel did not run successfully. stderr: exit code: 1 stderr: stderr: See above for output. stderr: stderr: note: This error originates from a subprocess, and is likely not a problem with pip. stderr: Installing Notebook dependencies failed with error: Process exited with error code: 1. StdErr Output: error: subprocess-exited-with-error

Getting requirements to build wheel did not run successfully. exit code: 1

[85 lines of output] C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools_distutils\dist.py:261: UserWarning: Unknown distribution option: 'cffi_modules' warnings.warn(msg) running egg_info writing pyzmq.egg-info\PKG-INFO writing dependency_links to pyzmq.egg-info\dependency_links.txt writing requirements to pyzmq.egg-info\requires.txt writing top-level names to pyzmq.egg-info\top_level.txt running configure Traceback (most recent call last): File "C:\Program Files\Python313\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main()


    File "C:\Program Files\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Program Files\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\build_meta.py", line 333, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
             ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\build_meta.py", line 303, in _get_build_requires
      self.run_setup()
      ~~~~~~~~~~~~~~^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\build_meta.py", line 319, in run_setup
      exec(code, locals())
      ~~~~^^^^^^^^^^^^^^^^
    File "<string>", line 1376, in <module>
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\__init__.py", line 117, in setup
      return distutils.core.setup(**attrs)
             ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 183, in setup
      return run_commands(dist)
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 199, in run_commands
      dist.run_commands()
      ~~~~~~~~~~~~~~~~~^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 954, in run_commands
      self.run_command(cmd)
      ~~~~~~~~~~~~~~~~^^^^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\dist.py", line 999, in run_command
      super().run_command(command)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
      cmd_obj.run()
      ~~~~~~~~~~~^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 312, in run
      self.find_sources()
      ~~~~~~~~~~~~~~~~~^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 320, in find_sources
      mm.run()
      ~~~~~~^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 541, in run
      self.add_defaults()
      ~~~~~~~~~~~~~~~~~^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 579, in add_defaults
      sdist.add_defaults(self)
      ~~~~~~~~~~~~~~~~~~^^^^^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\command\sdist.py", line 109, in add_defaults
      super().add_defaults()
      ~~~~~~~~~~~~~~~~~~~~^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 238, in add_defaults
      self._add_defaults_ext()
      ~~~~~~~~~~~~~~~~~~~~~~^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 322, in _add_defaults_ext
      build_ext = self.get_finalized_command('build_ext')
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 303, in get_finalized_command
      cmd_obj.ensure_finalized()
      ~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 111, in ensure_finalized
      self.finalize_options()
      ~~~~~~~~~~~~~~~~~~~~~^^
    File "<string>", line 1112, in finalize_options
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\dist.py", line 999, in run_command
      super().run_command(command)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 972, in run_command
      cmd_obj.ensure_finalized()
      ~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "C:\Users\localusername\AppData\Local\Temp\pip-build-env-w55y4woj\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 111, in ensure_finalized
      self.finalize_options()
      ~~~~~~~~~~~~~~~~~~~~~^^
    File "<string>", line 359, in finalize_options
    File "C:\Users\localusername\AppData\Local\Temp\pip-install-reyc2ze5\pyzmq_21c8931b7a0341b3ab31f7d911ba6b31\buildutils\misc.py", line 71, in locate_vcredist_dir
      vcvars = msvc.msvc14_get_vc_env(plat)
               ^^^^^^^^^^^^^^^^^^^^^^
  AttributeError: module 'setuptools.msvc' has no attribute 'msvc14_get_vc_env'
  [end of output]

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

[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: python.exe -m pip install --upgrade 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.
bedalus commented 3 days ago

I have a user with the same issue. Azure Data Studio appears to be set with exact versions being required. From the first line of PyMach's log above:

pip install --user "jupyter>=1.0.0" "notebook==6.5.6" "ipykernel==5.5.5"

If exact versions are required, then pyzmq is a problem, see: https://github.com/zeromq/pyzmq/issues/2030 "pyzmq>=25.1.1 for 3.12 support."

You can see from the PyMach's log above that an earlier version is installed:

stdout: Using cached pyzmq-24.0.1.tar.gz (1.2 MB)