error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [7 lines of output] traceback (most recent call last): file "<string>", line 2, in <module> file "<pip-setuptools-caller>", line 34, in <module> file "/tmp/pip-install-f_bzlwxx/pypiwin32_47ac0d70f6d549d9b5ac346414056e3a/setup.py", line 121 print "building pywin32", pywin32_version ^ syntaxerror: missing parentheses in


The error you're encountering is due to a syntax error in the `setup.py` script of the `pypiwin32` package. The `print` statement is using Python 2 syntax, which is not compatible with Python 3. Here are some steps you can take to resolve this issue: ### 1. Check Python Version Ensure that you are using the correct version of Python. The `pypiwin32` package might be outdated and may not support Python 3.x. You can check your Python version by running: ```sh python --version ``` or for Python 3 specifically: ```sh python3 --version ``` ### 2. Use a Compatible Version of pypiwin32 If you need to use `pypiwin32`, try installing an older version that supports Python 3. For example: ```sh pip install pypiwin32==223 ``` ### 3. Alternative Packages Consider using alternative packages that provide similar functionality and are actively maintained. For example, `pywin32` is a commonly used package for Windows-specific extensions: ```sh pip install pywin32 ``` ### 4. Manual Fix (Not Recommended) If you must use the specific version of `pypiwin32` and it's not available as an older version, you could manually edit the `setup.py` file to make it compatible with Python 3. This is generally not recommended because it involves modifying package source code directly. To do this: 1. Download the source code of the package. 2. Open the `setup.py` file. 3. Modify the print statements to use parentheses (Python 3 syntax). ```python print("building pywin32", pywin32_version) ``` 4. Install the modified package using: ```sh python setup.py install ``` ### Example Commands Here are some example commands to help you get started: #### Check Python Version ```sh python --version # or python3 --version ``` #### Install an Older Version of pypiwin32 ```sh pip install pypiwin32==223 ``` #### Install pywin32 as an Alternative ```sh pip install pywin32 ``` By following these steps, you should be able to resolve the issue and successfully install the required package. [2024-11-22 20:16:30 | AI写代码神器 | 559点数解答]
- error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [7 lines of output] traceback (most recent call last): file "<string>", line 2, in <module> file "<pip-setuptools-caller>", line 34, in <module> file "/tmp/pip-install-f_bzlwxx/pypiwin32_47ac0d70f6d549d9b5ac346414056e3a/setup.py", line 121 print "building pywin32", pywin32_version ^ syntaxerror: missing parentheses in(559点数解答 | 2024-11-22 20:16:30)182
- error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [7 lines of output] traceback (most recent call last): file "<string>", line 2, in <module> file "<pip-setuptoo(394点数解答 | 2024-11-22 11:44:29)219
- error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [7 lines of output] traceback (most recent call last): file "<string>", line 2, in <module> file "<pip-setuptoo(302点数解答 | 2024-11-22 11:44:31)137
- d:\anaconda3\python.exe c:\users\86139\pycharmprojects\10.6\jd.py traceback (most recent call last): file "c:\users\86139\pycharmprojects\10.6\jd.py", line 49, in <module> main() file "c:\users\86139\pycharmprojects\10.6\jd.py", line 45, in main save_to_mongodb(products) file "c:\users\86139\pycharmprojects\10.6\jd.py", line 40, in save_to_mongodb collection.insert_many(products) file "d:\anaconda3\lib\site-packages\pymongo\_csot.py", line 119, in csot_wrapper return fun(588点数解答 | 2024-12-12 00:27:27)179
- c:\python\venv\zzz\scripts\python.exe c:\python\main.py traceback (most recent call last): file "c:\users\意\appdata\local\programs\python\python311\lib\site-packages\urllib3\connection.py", line 199, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ file "c:\users\意\appdata\local\programs\python\python311\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection raise err file "c:\users\意\appdata\local\programs\python\pyt(161点数解答 | 2024-10-31 00:39:36)251
- "D:\Pycharm - base directory\venv\Scripts\python.exe" "D:\Pycharm - base directory\venv\test 2025\数学建模\问题二.py" Traceback (most recent call last): File "D:\Pycharm - base directory\venv\test 2025\数学建模\问题二.py", line 60, in <module> prob += total_width_count >= order["quantity"] * 2 File "D:\Pycharm - base directory\venv\Lib\site-packages\pulp\pulp.py", line 1773, in __iadd__ raise TypeError("A False object cannot be passed as a constraint") TypeError: A False object cannot be passed a(597点数解答 | 2025-08-08 09:33:27)49
- traceback (most recent call last): file "/users/yinman/desktop/python和计网/习题.py", line 312, in <module> monty_hall_simulation(10000) file "/users/yinman/desktop/python和计网/习题.py", line 298, in monty_hall_simulation switch_door = [0,1,2].remove(player_choice).remove(open_door)[0] attributeerror: 'nonetype' object has no attribute 'remove' 有什么错误提示(517点数解答 | 2024-11-27 19:10:59)152
- Traceback (most recent call last): File "/mnt/191/b/tommylee/AutoPresent/slidesbench/convert.py", line 104, in <module> convert_to_images(ppt_path, output_dir) File "/mnt/191/b/tommylee/AutoPresent/slidesbench/convert.py", line 97, in convert_to_images slide.export(fig, format='png') AttributeError: 'Slide' object has no attribute 'export' (171点数解答 | 2025-05-09 15:57:09)102
- Traceback (most recent call last): File "D:\pythonProject\venv\Scripts\词云图.py", line 19, in <module> import jieba ModuleNotFoundError: No module named 'jieba'为什么会出现这种情况,怎么解决 (340点数解答 | 2025-06-09 09:25:43)119
- traceback (most recent call last): file "d:\pycharmcode\chapter01\venv\dipproject0007\part02\作业03图像的转换.py", line 11, in <module> image[image == [127, 127, 127]] = [255, 255, 0] ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ valueerror: numpy boolean array indexing assignment cannot assign 3 input values to the 810000 output values where the mask is true(334点数解答 | 2024-10-17 10:29:31)263
- + make tini-static Scanning dependencies of target tini-static [100%] Building C object CMakeFiles/tini-static.dir/src/tini.c.o Linking C executable tini-static /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status make[3]: *** [tini-static] Error 1 make[2]: *** [CMakeFiles/tini-static.dir/all] Error 2 make[1]: *** [CMakeFiles/tini-static.dir/rule] Error 2 make: *** [tini-static] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.0XoVnu (%build)(264点数解答 | 2025-05-24 02:02:15)150
- + make tini-static Scanning dependencies of target tini-static [100%] Building C object CMakeFiles/tini-static.dir/src/tini.c.o Linking C executable tini-static /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status make[3]: *** [tini-static] Error 1 make[2]: *** [CMakeFiles/tini-static.dir/all] Error 2 make[1]: *** [CMakeFiles/tini-static.dir/rule] Error 2 make: *** [tini-static] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.0XoVnu (%build)(571点数解答 | 2025-05-24 02:03:08)107