Ber*_*ken 8 python wxpython pip
用pip安装wxpython报错ModuleNotFoundError: No module named \'attrdict\'
py -3.10-64 -m pip install -U wxpython
\nCollecting wxpython\n Using cached wxPython-4.2.0.tar.gz (71.0 MB)\n Preparing metadata (setup.py) ... error\n error: subprocess-exited-with-error\n\n \xc3\x97 python setup.py egg_info did not run successfully.\n \xe2\x94\x82 exit code: 1\n \xe2\x95\xb0\xe2\x94\x80> [8 lines of output]\n Traceback (most recent call last):\n File "<string>", line 2, in <module>\n File "<pip-setuptools-caller>", line 34, in <module>\n File "C:\\Users\\Bernard\\AppData\\Local\\Temp\\pip-install-dokcizpt\\wxpython_662eefb4314c47eba7b194b4d07a8e18\\setup.py", line 27, in <module>\n from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName\n File "C:\\Users\\Bernard\\AppData\\Local\\Temp\\pip-install-dokcizpt\\wxpython_662eefb4314c47eba7b194b4d07a8e18\\buildtools\\config.py", line 30, in <module>\n from attrdict import AttrDict\n ModuleNotFoundError: No module named \'attrdict\'\n [end of output]\n\n note: This error originates from a subprocess, and is likely not a problem with pip.\nerror: metadata-generation-failed\n\n\xc3\x97 Encountered error while generating package metadata.\n\xe2\x95\xb0\xe2\x94\x80> See above for output.\n\nnote: This is an issue with the package mentioned above, not pip.\nhint: See above for details.\nRun Code Online (Sandbox Code Playgroud)\n安装其他软件包有效,例如
\npy -3.10-64 -m pip install -U mido\n已满足要求:c:\\python311\\lib\\site-packages 中的 mido (1.2.10)
\nWindows 10 22H2\npip 23.0.1 来自 C:\\Python311\\Lib\\site-packages\\pip (python 3.11)
\n这是在fluidpatcher安装程序中使用的,我在这里记录了一个错误。
\n似乎是此处报告的已知问题:https ://github.com/wxWidgets/Phoenix/issues/2296
\n尝试过手动安装的解决方法
\npy -3.10-64 -m pip install -U attrdict3\nRun Code Online (Sandbox Code Playgroud)\n哪个安装。
\n然后重试wxpython安装
\npy -3.10-64 -m pip install -U wxpython\nRun Code Online (Sandbox Code Playgroud)\n失败了,这次有不同的错误消息
\nCollecting wxpython\n Using cached wxPython-4.2.0.tar.gz (71.0 MB)\n Preparing metadata (setup.py) ... done\nRequirement already satisfied: pillow in c:\\python311\\lib\\site-packages (from wxpython) (9.4.0)\nRequirement already satisfied: six in c:\\python311\\lib\\site-packages (from wxpython) (1.16.0)\nRequirement already satisfied: numpy in c:\\python311\\lib\\site-packages (from wxpython) (1.24.2)\nInstalling collected packages: wxpython\n DEPRECATION: wxpython is being installed using the legacy \'setup.py install\' method, because it does not have a \'pyproject.toml\' and the \'wheel\' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the \'--use-pep517\' option. Discussion can be found at https://github.com/pypa/pip/issues/8559\n Running setup.py install for wxpython ... error\n error: subprocess-exited-with-error\n\n \xc3\x97 Running setup.py install for wxpython did not run successfully.\n \xe2\x94\x82 exit code: 1\n \xe2\x95\xb0\xe2\x94\x80> [49 lines of output]\n C:\\Python311\\Lib\\site-packages\\setuptools\\dist.py:771: UserWarning: Usage of dash-separated \'license-file\' will not be supported in future versions. Please use the underscore name \'license_file\' instead\n warnings.warn(\n C:\\Python311\\Lib\\site-packages\\setuptools\\config\\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.\n warnings.warn(msg, warning_class)\n C:\\Python311\\Lib\\site-packages\\setuptools\\dist.py:317: DistDeprecationWarning: use_2to3 is ignored.\n warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)\n running install\n C:\\Python311\\Lib\\site-packages\\setuptools\\command\\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\n warnings.warn(\n running build\n Will build using: "C:\\Python311\\python.exe"\n 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]\n Python\'s architecture is 64bit\n cfg.VERSION: 4.2.0\n\n Running command: build\n Running command: build_wx\n Command \'"C:\\Python311\\python.exe" -c "import os, sys, setuptools.msvc; setuptools.msvc.isfile = lambda path: path is not None and os.path.isfile(path); ei = setuptools.msvc.EnvironmentInfo(\'x64\', vc_min_ver=14.0); env = ei.return_env(); env[\'vc_ver\'] = ei.vc_ver; env[\'vs_ver\'] = ei.vs_ver; env[\'arch\'] = ei.pi.arch; env[\'py_ver\'] = sys.version_info[:2]; print(env)"\' failed with exit code 1.\n Traceback (most recent call last):\n\n File "<string>", line 1, in <module>\n\n File "C:\\Python311\\Lib\\site-packages\\setuptools\\msvc.py", line 1120, in __init__\n\n self.si = SystemInfo(self.ri, vc_ver)\n\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n File "C:\\Python311\\Lib\\site-packages\\setuptools\\msvc.py", line 596, in __init__\n\n vc_ver or self._find_latest_available_vs_ver())\n\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n File "C:\\Python311\\Lib\\site-packages\\setuptools\\msvc.py", line 610, in _find_latest_available_vs_ver\n\n raise distutils.errors.DistutilsPlatformError(\n\n distutils.errors.DistutilsPlatformError: No Microsoft Visual C++ version found\n Finished command: build_wx (0m1.80s)\n Finished command: build (0m1.80s)\n WARNING: Building this way assumes that all generated files have been\n generated already. If that is not the case then use build.py directly\n to generate the source and perform the build stage. You can use\n --skip-build with the bdist_* or install commands to avoid this\n message and the wxWidgets and Phoenix build steps in the future.\n\n "C:\\Python311\\python.exe" -u build.py build\n Command \'"C:\\Python311\\python.exe" -u build.py build\' failed with exit code 1.\n [end of output]\n\n note: This error originates from a subprocess, and is likely not a problem with pip.\nerror: legacy-install-failure\n\n\xc3\x97 Encountered error while trying to install package.\n\xe2\x95\xb0\xe2\x94\x80> wxpython\nRun Code Online (Sandbox Code Playgroud)\n解决方法:安装 Python 3.10。
\n对于那些仍然感兴趣的人:我已经在 Windows 上成功安装了 wxPython,在 WinPython 3.11.1 下(从 SouceForge 获取):
pip install -U attrdict3
pip install wxpython
Run Code Online (Sandbox Code Playgroud)
安装后,在\Lib\site-packages\wx目录中,您必须手动重命名所有没有扩展名的文件,以便它们具有.pyd扩展名。
| 归档时间: |
|
| 查看次数: |
6768 次 |
| 最近记录: |