-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
_ctypes fail to import when using Conda in poetry 1.1.13 #5907
Comments
I'm having the same issue here also with poetry 1.1.13 using pycharm. |
Same here! |
Same here |
It seems that poetry/src/poetry/utils/env.py Lines 1089 to 1105 in 2def357
Copying Use |
Above actually only solved the |
Hello everyone , you haven't come back to this issue for a long while. So I assume this is solved in the meantime and I can close this ticket. Feel free to leave a comment if you disagree. fin swimmer |
Nope, still happens for me on Poetry 1.5.1: C:\code\[..]>poetry update
Creating virtualenv [env_name] in C:\code\[..]\.venv
Updating dependencies
Resolving dependencies... (8.7s)
Package operations: 9 installs, 0 updates, 0 removals
• Installing atomicwrites (1.4.1): Failed
ChefBuildError
Backend subprocess exited when trying to invoke build_wheel
Traceback (most recent call last):
File "C:\Users\[user]\AppData\Roaming\pypoetry\venv\lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\[user]\AppData\Roaming\pypoetry\venv\lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\[user]\AppData\Roaming\pypoetry\venv\lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "C:\Users\[user]~1\AppData\Local\Temp\tmpxwyiw_k_\.venv\lib\site-packages\setuptools\build_meta.py", line 416, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "C:\Users\[user]~1\AppData\Local\Temp\tmpxwyiw_k_\.venv\lib\site-packages\setuptools\build_meta.py", line 401, in _build_with_temp_dir
self.run_setup()
File "C:\Users\[user]~1\AppData\Local\Temp\tmpxwyiw_k_\.venv\lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\[user]~1\AppData\Local\Temp\tmpxwyiw_k_\.venv\lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 16, in <module>
File "C:\Users\[user]~1\AppData\Local\Temp\tmpxwyiw_k_\.venv\lib\site-packages\setuptools\__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
File "C:\Users\[user]~1\AppData\Local\Temp\tmpxwyiw_k_\.venv\lib\site-packages\setuptools\_distutils\core.py", line 172, in setup
ok = dist.parse_command_line()
File "C:\Users\[user]~1\AppData\Local\Temp\tmpxwyiw_k_\.venv\lib\site-packages\setuptools\_distutils\dist.py", line 475, in parse_command_line
args = self._parse_command_opts(parser, args)
File "C:\Users\[user]~1\AppData\Local\Temp\tmpxwyiw_k_\.venv\lib\site-packages\setuptools\dist.py", line 1132, in _parse_command_opts
nargs = _Distribution._parse_command_opts(self, parser, args)
File "C:\Users\[user]~1\AppData\Local\Temp\tmpxwyiw_k_\.venv\lib\site-packages\setuptools\_distutils\dist.py", line 534, in _parse_command_opts
cmd_class = self.get_command_class(command)
File "C:\Users\[user]~1\AppData\Local\Temp\tmpxwyiw_k_\.venv\lib\site-packages\setuptools\dist.py", line 979, in get_command_class
self.cmdclass[command] = cmdclass = ep.load()
File "C:\Users\[user]\Miniconda3\envs\conda-poetry\lib\importlib\metadata\__init__.py", line 171, in load
module = import_module(match.group('module'))
File "C:\Users\[user]\Miniconda3\envs\conda-poetry\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\[user]~1\AppData\Local\Temp\tmpxwyiw_k_\.venv\lib\site-packages\wheel\bdist_wheel.py", line 28, in <module>
from .macosx_libfile import calculate_macosx_platform_tag
File "C:\Users\[user]~1\AppData\Local\Temp\tmpxwyiw_k_\.venv\lib\site-packages\wheel\macosx_libfile.py", line 43, in <module>
import ctypes
File "C:\Users\[user]\Miniconda3\envs\conda-poetry\lib\ctypes\__init__.py", line 8, in <module>
from _ctypes import Union, Structure, Array
ImportError: DLL load failed while importing _ctypes: The specified module could not be found.
at ~\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\installation\chef.py:147 in _prepare
143│
144│ error = ChefBuildError("\n\n".join(message_parts))
145│
146│ if error is not None:
→ 147│ raise error from None
148│
149│ return path
150│
151│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
Note: This error originates from the build backend, and is likely not a problem with poetry but with atomicwrites (1.4.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "atomicwrites (==1.4.1)"'.
• Installing attrs (23.1.0)
• Installing colorama (0.4.6)
• Installing more-itertools (9.1.0)
• Installing packaging (23.1)
• Installing pluggy (0.13.1)
• Installing py (1.11.0)
• Installing wcwidth (0.2.6)
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
This is the same issue as #4566 and #5059 and was supposed to be fixed in #5008 (I did make sure my local
1.1.13
installation had the same changes in it). I'm unsure if I missed a step, or if there is something more i should do to make sure my environments are correct? I have tried purging the cache and completely uninstalling and reinstalling poetry, but that did not seem to fix the issue for me.Thanks
- Grant
Some relevant stack traces:
...
The text was updated successfully, but these errors were encountered: