Skip to content
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

pip install pxd失败 #164

Open
wencan opened this issue Aug 19, 2023 · 5 comments
Open

pip install pxd失败 #164

wencan opened this issue Aug 19, 2023 · 5 comments
Assignees

Comments

@wencan
Copy link

wencan commented Aug 19, 2023

os: Fedora Linux 38 (Workstation Edition)
kernal: Linux fedora 6.4.10-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 11 12:20:29 UTC 2023 x86_64 GNU/Linux
pip: pip 22.3.1 from /usr/lib/python3.11/site-packages/pip (python 3.11)

升级pyyaml似乎可以解决这个问题: yaml/pyyaml#601

下面是pip install pxd详细输出

Defaulting to user installation because normal site-packages is not writeable
Collecting pxd
  Using cached pxd-0.5.3-py3-none-any.whl (79 kB)
Collecting certifi==2021.5.30
  Using cached certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting charset-normalizer==2.0.4
  Using cached charset_normalizer-2.0.4-py3-none-any.whl (36 kB)
Collecting click==8.0.1
  Using cached click-8.0.1-py3-none-any.whl (97 kB)
Collecting docker==5.0.0
  Using cached docker-5.0.0-py2.py3-none-any.whl (146 kB)
Collecting idna==3.2
  Using cached idna-3.2-py3-none-any.whl (59 kB)
Collecting colorama==0.4.4
  Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting pycryptodomex==3.10.1
  Using cached pycryptodomex-3.10.1-cp35-abi3-manylinux2010_x86_64.whl (1.9 MB)
Collecting PyMySQL==1.0.2
  Using cached PyMySQL-1.0.2-py3-none-any.whl (43 kB)
Collecting PyYAML==5.4.1
  Using cached PyYAML-5.4.1.tar.gz (175 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [68 lines of output]
      /tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!
      
              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.
      
              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      running egg_info
      writing lib3/PyYAML.egg-info/PKG-INFO
      writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
      writing top-level names to lib3/PyYAML.egg-info/top_level.txt
      Traceback (most recent call last):
        File "/usr/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/usr/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 271, in <module>
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 319, in run
          self.find_sources()
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 327, in find_sources
          mm.run()
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 549, in run
          self.add_defaults()
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 587, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 113, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<string>", line 201, in get_source_files
        File "/tmp/pip-build-env-vqqfut_b/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [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.

@vettalwu
Copy link
Collaborator

@wencan Do you create a new venv and upgrade pip version by pip install --upgrade pip

@vettalwu vettalwu self-assigned this Nov 23, 2023
@Su-yj
Copy link

Su-yj commented Jul 31, 2024

我也遇到了同样的问题
系统: Ubuntu 22.04
pip 版本:pip 24.2 from /root/venv/lib/python3.10/site-packages/pip (python 3.10)

@Su-yj
Copy link

Su-yj commented Jul 31, 2024

大概知道问题的根源了。主要问题是 PyYAML 锁定在了 5.4.1 版本上了。然而 5.4.1 版本在 Cython 3 上好像是有问题的

yaml/pyyaml#731

@vettalwu
Copy link
Collaborator

@Su-yj pxd 确实限定了 pyyaml 在5.4.1版本,你目前手工升级pyyaml 版本解决了吗?

大概知道问题的根源了。主要问题是 PyYAML 锁定在了 5.4.1 版本上了。然而 5.4.1 版本在 Cython 3 上好像是有问题的

yaml/pyyaml#731

@Su-yj
Copy link

Su-yj commented Jul 31, 2024

@Su-yj pxd 确实限定了 pyyaml 在5.4.1版本,你目前手工升级pyyaml 版本解决了吗?

大概知道问题的根源了。主要问题是 PyYAML 锁定在了 5.4.1 版本上了。然而 5.4.1 版本在 Cython 3 上好像是有问题的
yaml/pyyaml#731

@vettalwu 是的,我爬了下 pxd 的依赖库,把它列出来单独安装(PyYAML 忽略指定版本了)

certifi==2021.5.30
charset-normalizer==2.0.4
click==8.0.1
docker==5.0.0
idna==3.2
colorama==0.4.4
pycryptodomex==3.10.1
PyMySQL==1.0.2
PyYAML
requests==2.26.0
retrying==1.3.3
six==1.16.0
urllib3==1.26.6
websocket-client==1.2.1
spurplus==2.3.4
humanfriendly==10.0
packaging>=21.0

然后再安装 pxd,pxd 安装时不装指定依赖

pip install -i https://mirrors.aliyun.com/pypi/simple/ pxd --no-deps

但是在使用的时候,发现现在卡在 docker 镜像拉取那里了😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants