You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create 32 bit venv (e.g. pdm venv create --with-pip 3.12-32)
Create the lock file (pdm lock)
Install project (pdm install -v):
Output
STATUS: Resolving packages from lockfile...
STATUS: Fetching hashes for resolved packages...
unearth.preparer: The file . is a local directory, use it directly
Synchronizing working set with resolved packages: 1 to add, 0 to update, 0 to remove
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/83/1c/25b79fc3ec99b19b0a0730cc47356f7e2959863bf9f3cd314332bddb4f68/pywin32-306-cp312-cp312-win_amd64.whl (from https://pypi.org/simple/pywin32/)>
✔ Install pywin32 306 successful
Installing the project as an editable package...
pdm.termui: Preparing environment(Isolated mode) for PEP 517 build...
pdm.termui: Running PEP 517 backend to build a wheel for <Link file:///F:/pywin32-test (from None)>
pdm.termui: ======== Start resolving requirements ========
pdm.termui: pdm-backend
pdm.termui: python>=3.12,<3.12.1
pdm.termui: Adding requirement pdm-backend
pdm.termui: Adding requirement python>=3.12,<3.12.1
pdm.termui: ======== Starting round 0 ========
pdm.termui: Pinning: python None
pdm.termui: ======== Ending round 0 ========
pdm.termui: ======== Starting round 1 ========
pdm.termui: Pinning: pdm-backend 2.1.7
pdm.termui: ======== Ending round 1 ========
pdm.termui: ======== Starting round 2 ========
pdm.termui: ======== Resolution Result ========
pdm.termui: Stable pins:
pdm.termui: python None
pdm.termui: pdm-backend 2.1.7
pdm.termui: Installing [email protected]...
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/38/d8/0a932c1172645bebcd379ea0604a5db50b0410888fa8c5fe56b0ea12d87c/pdm_backend-2.1.7-py3-none-any.whl (from https://pypi.org/simple/pdm-backend/)>
pdm.termui: Synchronization complete.
pdm.termui: ======== Start resolving requirements ========
pdm.termui: editables
pdm.termui: python>=3.12,<3.12.1
pdm.termui: Adding requirement editables
pdm.termui: Adding requirement python>=3.12,<3.12.1
pdm.termui: ======== Starting round 0 ========
pdm.termui: Pinning: python None
pdm.termui: ======== Ending round 0 ========
pdm.termui: ======== Starting round 1 ========
pdm.termui: Pinning: editables 0.5
pdm.termui: ======== Ending round 1 ========
pdm.termui: ======== Starting round 2 ========
pdm.termui: ======== Resolution Result ========
pdm.termui: Stable pins:
pdm.termui: python None
pdm.termui: editables 0.5
pdm.termui: Installing [email protected]...
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/6b/be/0f2f4a5e8adc114a02b63d92bf8edbfa24db6fc602fca83c885af2479e0e/editables-0.5-py3-none-any.whl (from https://pypi.org/simple/editables/)>
pdm.termui: Synchronization complete.
pdm.termui: C:\Users\P291F~1.ROG\AppData\Local\Temp\pdm-build-env-akd7_251-shared\Lib\site-packages\pdm\backend\wheel.py:226: PDMWarning: No license files are matched with glob patterns ['LICENSES/*', 'LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*'].
pdm.termui: for file in self.find_license_files():
pdm.termui: - Adding .pdm-build\.gitignore -> .gitignore
pdm.termui: - Adding .pdm-build\my_package-0.0.1+editable.dist-info\METADATA -> my_package-0.0.1+editable.dist-info/METADATA
pdm.termui: - Adding .pdm-build\my_package-0.0.1+editable.dist-info\WHEEL -> my_package-0.0.1+editable.dist-info/WHEEL
pdm.termui: - Adding .pdm-build\my_package.pth -> my_package.pth
pdm.termui: - Adding my_package-0.0.1+editable.dist-info\RECORD -> my_package-0.0.1+editable.dist-info/RECORD
✔ Install my-package 0.0.1 successful
🎉 All complete!
Try to import a pywin32 module, e.g. pythoncom
Actual behavior
A 64-bit wheel of pywin32 is installed into the 32-bit venv (see pdm install -v output). This produces the following error when trying to import e.g. pythoncom:
Python 3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 12:49:59) [MSC v.1935 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pythoncom
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "F:\pywin32-test\.venv\Lib\site-packages\pythoncom.py", line 2, in <module>
import pywintypes
File "F:\pywin32-test\.venv\Lib\site-packages\win32\lib\pywintypes.py", line 126, in <module>
__import_pywin32_system_module__("pywintypes", globals())
File "F:\pywin32-test\.venv\Lib\site-packages\win32\lib\pywintypes.py", line 52, in __import_pywin32_system_module__
import _win32sysloader
ImportError: DLL load failed while importing _win32sysloader: %1 is not a valid Win32 application.
Expected behavior
A 32-bit wheel of pywin32 should be installed into the 32-bit venv.
Environment Information
# Paste the output of `pdm info && pdm info --env` below:
PDM version:
2.10.4
Python Interpreter:
F:\pywin32-test\.venv\Scripts\python.exe (3.12-32)
Project Root:
F:/pywin32-test
Local Packages:
{
"implementation_name": "cpython",
"implementation_version": "3.12.0",
"os_name": "nt",
"platform_machine": "AMD64",
"platform_release": "11",
"platform_system": "Windows",
"platform_version": "10.0.22621",
"python_full_version": "3.12.0",
"platform_python_implementation": "CPython",
"python_version": "3.12",
"sys_platform": "win32"
}
The text was updated successfully, but these errors were encountered:
Make sure you run commands with
-v
flag before pasting the output.Steps to reproduce
Use following minimal
pyproject.toml
:Create 32 bit venv (e.g.
pdm venv create --with-pip 3.12-32
)Create the lock file (
pdm lock
)Install project (
pdm install -v
):Output
Try to import a
pywin32
module, e.g.pythoncom
Actual behavior
A 64-bit wheel of
pywin32
is installed into the 32-bit venv (seepdm install -v
output). This produces the following error when trying to import e.g.pythoncom
:Expected behavior
A 32-bit wheel of
pywin32
should be installed into the 32-bit venv.Environment Information
The text was updated successfully, but these errors were encountered: