如何解决子进程退出并出错的问题?

问题描述 投票:0回答:1

我尝试在 PyCharm Community Edition 2023.3.2 中安装 pandas,但弹出以下错误。

(.venv) PS C:\Users\user\PycharmProjects\Save CSV> pip install pandas
Collecting pandas
  Using cached pandas-2.1.4.tar.gz (4.3 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [82 lines of output]
      Ignoring numpy: markers 'python_version >= "3.12"' don't match your environment
      Collecting meson-python==0.13.1
        Using cached meson_python-0.13.1-py3-none-any.whl (79 kB)
      Collecting meson==1.2.1
        Using cached meson-1.2.1-py3-none-any.whl.metadata (1.7 kB)
      Collecting wheel
        Using cached wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB)
      Collecting Cython<3,>=0.29.33
        Using cached Cython-0.29.37-py2.py3-none-any.whl.metadata (3.1 kB)
      Collecting oldest-supported-numpy>=2022.8.16
        Using cached oldest_supported_numpy-2023.12.21-py3-none-any.whl.metadata (9.8 kB)
      Collecting versioneer[toml]
        Using cached versioneer-0.29-py3-none-any.whl.metadata (16 kB)
      Collecting colorama (from meson-python==0.13.1)
        Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
      Collecting pyproject-metadata>=0.7.1 (from meson-python==0.13.1)
        Using cached pyproject_metadata-0.7.1-py3-none-any.whl (7.4 kB)
      Collecting tomli>=1.0.0 (from meson-python==0.13.1)
        Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
      Collecting numpy==1.21.6 (from oldest-supported-numpy>=2022.8.16)
        Using cached numpy-1.21.6.zip (10.3 MB)
        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\user\PycharmProjects\Save CSV\.venv\lib\python3.10\site-    packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
            main()
          File "C:\Users\user\PycharmProjects\Save CSV\.venv\lib\python3.10\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:\Users\user\PycharmProjects\Save CSV\.venv\lib\python3.10\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 112, in     get_requires_for_build_wheel
            backend = _build_backend()
          File "C:\Users\user\PycharmProjects\Save CSV\.venv\lib\python3.10\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend
            obj = import_module(mod_path)
          File "C:\msys64\mingw64\lib\python3.10\importlib\__init__.py", line 126, in import_module
            return _bootstrap._gcd_import(name[level:], package, level)
          File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
          File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
          File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
          File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
          File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
          File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
          File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
          File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
          File "<frozen importlib._bootstrap_external>", line 887, in exec_module
          File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
          File "C:\Users\user\AppData\Local\Temp\pip-build-env-7rjwvzg3\overlay\lib\python3.10\site-packages\setuptools\__init__.py", line 242, in <module>
            monkey.patch_all()
          File "C:\Users\user\AppData\Local\Temp\pip-build-env-7rjwvzg3\overlay\lib\python3.10\site-packages\setuptools\monkey.py", line 99, in patch_all
            patch_for_msvc_specialized_compiler()
          File "C:\Users\user\AppData\Local\Temp\pip-build-env-7rjwvzg3\overlay\lib\python3.10\site-packages\setuptools\monkey.py", line 162, in patch_for_msvc_specialized_compiler        
            patch_func(*msvc9('find_vcvarsall'))
          File "C:\Users\user\AppData\Local\Temp\pip-build-env-7rjwvzg3\overlay\lib\python3.10\site-packages\setuptools\monkey.py", line 149, in patch_params
            mod = import_module(mod_name)
          File "C:\msys64\mingw64\lib\python3.10\importlib\__init__.py", line 126, in import_module
            return _bootstrap._gcd_import(name[level:], package, level)
          File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
          File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
          File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
          File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
          File "<frozen importlib._bootstrap_external>", line 887, in exec_module
          File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
          File "C:\Users\user\AppData\Local\Temp\pip-build-env-7rjwvzg3\overlay\lib\python3.10\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]

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.

我不知道如何解决这个问题。

Python 版本 3.10.11

操作系统:Windows 10 Python 版本 3.10.11 环境:Pycharm社区版2023.3.2

我曾尝试升级pip版本、setuptools和wheel。 我还在 Windows 上安装了 Visual C++ 构建工具。

但是还是没有解决问题。

请帮我解决这个问题

python pandas installation pip pycharm
1个回答
0
投票

看来你得更换

setuptools
包了。在这个线程中,错误是相同的。

尝试:

PS> pip uninstall setuptools
PS> pacman -S mingw-w64-x86_64-python-setuptools

然后重新安装pandas:

PS> pip install pandas
© www.soinside.com 2019 - 2024. All rights reserved.