Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.5.0
-
None
-
Windows 11 Pro 22H2
Python 3.11.3
Poetry 1.4.2
Description
Reproduction steps
- Create a new poetry project
poetry new example cd example
- Try to install PySide6 (with verbose logging)
poetry -vvv add PySide6
Expected Outcome
PySide6 installation is successful and the package is added to pyproject.toml.
Actual Outcome
Poetry reports the following error:
... Stack trace: 7 ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Lib\site-packages\poetry\installation\executor.py:280 in _execute_operation 278│ 279│ try: → 280│ result = self._do_execute_operation(operation) 281│ except EnvCommandError as e: 282│ if e.e.returncode == -2: 6 ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Lib\site-packages\poetry\installation\executor.py:382 in _do_execute_operation 380│ return 0 381│ → 382│ result: int = getattr(self, f"_execute_{method}")(operation) 383│ 384│ if result != 0: 5 ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Lib\site-packages\poetry\installation\executor.py:502 in _execute_install 500│ 501│ def _execute_install(self, operation: Install | Update) -> int: → 502│ status_code = self._install(operation) 503│ 504│ self._save_url_reference(operation) 4 ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Lib\site-packages\poetry\installation\executor.py:560 in _install 558│ self._remove(operation.initial_package) 559│ → 560│ self._wheel_installer.install(archive) 561│ finally: 562│ if cleanup_archive: 3 ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Lib\site-packages\poetry\installation\wheel_installer.py:108 in install 106│ except _WheelFileValidationError as e: 107│ self.invalid_wheels[wheel] = e.issues → 108│ install( 109│ source=source, 110│ destination=self._destination.for_source(source), 2 ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Lib\site-packages\installer\_core.py:109 in install 107│ root_scheme=root_scheme, 108│ ) → 109│ record = destination.write_file( 110│ scheme=scheme, 111│ path=destination_path, 1 ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Lib\site-packages\installer\destinations.py:207 in write_file 205│ ) 206│ → 207│ return self.write_to_fs(scheme, path_, stream, is_executable) 208│ 209│ def write_script( FileNotFoundError [Errno 2] No such file or directory: 'C:\\Users\\shaider\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\Local\\pypoetry\\Cache\\virtualenvs\\python-qt-cVqsZ-VA-py3.11\\Lib\\site-packages\\PySide6\\qml\\Qt5Compat\\GraphicalEffects\\private\\qtgraphicaleffectsprivateplugin.dll' at ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Lib\site-packages\poetry\installation\wheel_installer.py:56 in write_to_fs 52│ # Due to the parallel installation it can happen 53│ # that two threads try to create the directory. 54│ os.makedirs(parent_folder, exist_ok=True) 55│ → 56│ with open(target_path, "wb") as f: 57│ hash_, size = copyfileobj_with_hashing(stream, f, self.hash_algorithm) 58│ 59│ if is_executable: 60│ make_file_executable(target_path)
Additional Info
I was able to install PySide6 in my poetry project by installing PySide6 globally using pip and manually copying the folders into poetry's virtualenv cache. Seems like there is a mismatch when installing via poetry vs pip.