Skip to content
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

pip fails to build wheels #7

Open
HourGlss opened this issue Jul 22, 2022 · 2 comments
Open

pip fails to build wheels #7

HourGlss opened this issue Jul 22, 2022 · 2 comments

Comments

@HourGlss
Copy link

`python -m pip install pqcrypto
Collecting pqcrypto
Downloading pqcrypto-0.1.3.tar.gz (1.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 30.2 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: cffi<2.0.0,>=1.14.2 in c:\users\xxxx\appdata\local\pypoetry\cache\virtualenvs\name-jqwtno7e-py3.10\lib\site-packages (from pqcrypto) (1.15.1)
Requirement already satisfied: pycparser in c:\users\xxxx\appdata\local\pypoetry\cache\virtualenvs\name-jqwtno7e-py3.10\lib\site-packages (from cffi<2.0.0,>=1.14.2->pqcrypto) (2.21)
Building wheels for collected packages: pqcrypto
Building wheel for pqcrypto (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pqcrypto (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
A setup.py file already exists. Using it.
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Temp\pip-install-zll00t4x\pqcrypto_ef98106e2dcc4d0da07fbdab776d7b06\setup.py", line 2, in
from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\pypoetry\Cache\virtualenvs\name-jQWtNO7e-py3.10\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 363, in
main()
File "C:\Users\xxxx\AppData\Local\pypoetry\Cache\virtualenvs\name-jQWtNO7e-py3.10\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\xxxx\AppData\Local\pypoetry\Cache\virtualenvs\name-jQWtNO7e-py3.10\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "C:\Users\xxxx\AppData\Local\Temp\pip-build-env-3ysnkxmg\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 68, in build_wheel
return unicode(WheelBuilder.make_in(poetry, Path(wheel_directory)))
File "C:\Users\xxxx\AppData\Local\Temp\pip-build-env-3ysnkxmg\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 78, in make_in
wb.build()
File "C:\Users\xxxx\AppData\Local\Temp\pip-build-env-3ysnkxmg\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 110, in build
self._build(zip_file)
File "C:\Users\xxxx\AppData\Local\Temp\pip-build-env-3ysnkxmg\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 162, in _build
self._run_build_command(setup)
File "C:\Users\xxxx\AppData\Local\Temp\pip-build-env-3ysnkxmg\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 190, in _run_build_command
subprocess.check_call(
File "C:\Python\Python310\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:/Users/xxxx/AppData/Local/pypoetry/Cache/virtualenvs/name-jQWtNO7e-py3.10/Scripts/python.exe', 'C:\Users\xxxx\AppData\Local\Temp\pip-install-zll00t4x\pqcrypto_ef98106e2dcc4d0da07fbdab776d7b06\setup.py', 'build', '-b', 'C:\Users\xxxx\AppData\Local\Temp\pip-install-zll00t4x\pqcrypto_ef98106e2dcc4d0da07fbdab776d7b06\build']' returned non-zero exit status 1.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pqcrypto
Failed to build pqcrypto
ERROR: Could not build wheels for pqcrypto, which is required to install pyproject.toml-based projects`

@claudefalbriard
Copy link

Same issue here when using a default pip install of pqcrypto package. When installing it manually from a poetry output, a wheel file (.whl) using pip and which completes successfully, I get an error at import like:
from pqcrypto.kem.mceliece8192128 import generate_keypair, encrypt, decrypt
ModuleNotFoundError
My environment is Linux and conda.

@claudefalbriard
Copy link

Just found the reason for the error in my environment. The install via poetry wheel file worked Ok. In order to test it the code must be executed in a separate directory, not inside the project source directory. Imports are working fine. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants