Tell us what’s happening:
.
i am getting following error , my code works perfectly tried on pycharm, can you please help with the below . i tried installing different numpy version nothing works
→ poetry lock --no-update
Resolving dependencies…
Writing lock file
→ poetry install
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
• Installing numpy (1.18.5)
ChefBuildError
Backend subprocess exited when trying to invoke build_wheel
Running from numpy source directory.
/tmp/tmpy757e5qs/numpy-1.18.5/tools/cythonize.py:75: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
required_version = LooseVersion(‘0.29.14’)
/tmp/tmpy757e5qs/numpy-1.18.5/tools/cythonize.py:77: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(cython_version) < required_version:
Error compiling Cython file:
…
for i in range(1, RK_STATE_LEN):
self.rng_state.key[i] = val[i]
self.rng_state.pos = i
self._bitgen.state = &self.rng_state
self._bitgen.next_uint64 = &mt19937_uint64
^
_mt19937.pyx:138:35: Cannot assign type ‘uint64_t (*)(void ) except? -1 nogil’ to 'uint64_t ()(void *) noexcept nogil’. Exception values are incompatible. Suggest adding ‘noexcept’ to type ‘uint64_t (void *) except? -1 nogil’.
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_mt19937.pyx
Traceback (most recent call last):
File “/tmp/tmpy757e5qs/numpy-1.18.5/tools/cythonize.py”, line 238, in
main()
File “/tmp/tmpy757e5qs/numpy-1.18.5/tools/cythonize.py”, line 234, in main
find_process_files(root_dir)
File “/tmp/tmpy757e5qs/numpy-1.18.5/tools/cythonize.py”, line 225, in find_process_files
process(root_dir, fromfile, tofile, function, hash_db)
File “/tmp/tmpy757e5qs/numpy-1.18.5/tools/cythonize.py”, line 191, in process
processor_function(fromfile, tofile)
File “/tmp/tmpy757e5qs/numpy-1.18.5/tools/cythonize.py”, line 80, in process_pyx
subprocess.check_call(
File “/nix/store/xf54733x4chbawkh1qvy9i1i4mlscy1c-python3-3.10.11/lib/python3.10/subprocess.py”, line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[’/tmp/tmpv0_nq40c/.venv/bin/python’, ‘-m’, ‘cython’, ‘-3’, ‘–fast-fail’, ‘-o’, ‘_mt19937.c’, ‘_mt19937.pyx’]’ returned non-zero exit status 1.
Cythonizing sources
Traceback (most recent call last):
File “/nix/store/kglgy8nffq9gpdnh517h73w3x8zcqhsn-poetry-in-venv/env/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py”, line 353, in
main()
File “/nix/store/kglgy8nffq9gpdnh517h73w3x8zcqhsn-poetry-in-venv/env/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py”, line 335, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
File “/nix/store/kglgy8nffq9gpdnh517h73w3x8zcqhsn-poetry-in-venv/env/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py”, line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File “/nix/store/icx0zbk2r2qrpnqpd41q4h4xzr856d4f-python3.10-setuptools-67.4.0/lib/python3.10/site-packages/setuptools/build_meta.py”, line 413, in build_wheel
return self._build_with_temp_dir([‘bdist_wheel’], ‘.whl’,
File “/nix/store/icx0zbk2r2qrpnqpd41q4h4xzr856d4f-python3.10-setuptools-67.4.0/lib/python3.10/site-packages/setuptools/build_meta.py”, line 398, in _build_with_temp_dir
self.run_setup()
File “/nix/store/icx0zbk2r2qrpnqpd41q4h4xzr856d4f-python3.10-setuptools-67.4.0/lib/python3.10/site-packages/setuptools/build_meta.py”, line 484, in run_setup
super(_BuildMetaLegacyBackend,
File “/nix/store/icx0zbk2r2qrpnqpd41q4h4xzr856d4f-python3.10-setuptools-67.4.0/lib/python3.10/site-packages/setuptools/build_meta.py”, line 335, in run_setup
exec(code, locals())
File “”, line 488, in
File “”, line 469, in setup_package
File “”, line 275, in generate_cython
RuntimeError: Running cythonize failed!
at /nix/store/kglgy8nffq9gpdnh517h73w3x8zcqhsn-poetry-in-venv/env/lib/python3.10/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 numpy (1.18.5) not supporting PEP 517 builds. You can verify this by running ‘pip wheel --use-pep517 “numpy (==1.18.5)”’.
exit status 1
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Challenge Information:
Data Analysis with Python Projects - Mean-Variance-Standard Deviation Calculator