Не устанавливаются модули в Python 3.9 через pip на новом ПК AMD Ryzen 3 PRO 3200G
Пробовал установить matplotlib и numpy и через командную строку сmd и через PyCharm Мучаюсь с 7 октября. Перечитал всё на обоих языках - русском и английском. В чём может быть загвоздка. Делаю всё правильно!) Cистема на скриншоте:
Текст ошибки:
Collecting matplotlib
Using cached matplotlib-3.3.2.tar.gz (37.9 MB)
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Command errored out with exit status 1:
command: 'C:\Python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Пользователь\\AppData\\Local\\Temp\\pycharm-packaging\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Пользователь\\AppData\\Local\\Temp\\pycharm-packaging\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Пользователь\AppData\Local\Temp\pip-pip-egg-info-7nuhteiy'
cwd: C:\Users\Пользователь\AppData\Local\Temp\pycharm-packaging\matplotlib\
Complete output (98 lines):
Edit setup.cfg to change the build options; suppress output with --quiet.
BUILDING MATPLOTLIB
matplotlib: yes [3.3.2]
python: yes [3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC
v.1927 64 bit (AMD64)]]
platform: yes [win32]
sample_data: yes [installing]
tests: no [skipping due to configuration]
macosx: no [Mac OS-X only]
WARNING: The wheel package is not available.
ERROR: Command errored out with exit status 1:
command: 'C:\Python39\python.exe' 'C:\Python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\73B5~1\AppData\Local\Temp\tmpqitnznq3'
cwd: C:\Users\Пользователь\AppData\Local\Temp\pip-wheel-2nmosds8\numpy
Complete output (49 lines):
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xcf in position 0: invalid continuation byte (sitecustomize.py, line 21)
Running from numpy source directory.
setup.py:470: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
Cythonizing sources
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xcf in position 0: invalid continuation byte (sitecustomize.py, line 21)
Processing numpy/random\_bounded_integers.pxd.in
Processing numpy/random\bit_generator.pyx
Traceback (most recent call last):
File "C:\Users\Пользователь\AppData\Local\Temp\pip-wheel-2nmosds8\numpy\tools\cythonize.py", line 59, in process_pyx
from Cython.Compiler.Version import version as cython_version
ModuleNotFoundError: No module named 'Cython'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Пользователь\AppData\Local\Temp\pip-wheel-2nmosds8\numpy\tools\cythonize.py", line 235, in <module>
main()
File "C:\Users\Пользователь\AppData\Local\Temp\pip-wheel-2nmosds8\numpy\tools\cythonize.py", line 231, in main
find_process_files(root_dir)
File "C:\Users\Пользователь\AppData\Local\Temp\pip-wheel-2nmosds8\numpy\tools\cythonize.py", line 222, in find_process_files
process(root_dir, fromfile, tofile, function, hash_db)
File "C:\Users\Пользователь\AppData\Local\Temp\pip-wheel-2nmosds8\numpy\tools\cythonize.py", line 188, in process
processor_function(fromfile, tofile)
File "C:\Users\Пользователь\AppData\Local\Temp\pip-wheel-2nmosds8\numpy\tools\cythonize.py", line 64, in process_pyx
raise OSError('Cython needs to be installed in Python as a module')
OSError: Cython needs to be installed in Python as a module
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 280, in <module>
main()
File "C:\Python39\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Python39\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 133, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "C:\Python39\lib\site-packages\setuptools\build_meta.py", line 157, in prepare_metadata_for_build_wheel
self.run_setup()
File "C:\Python39\lib\site-packages\setuptools\build_meta.py", line 248, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Python39\lib\site-packages\setuptools\build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 499, in <module>
setup_package()
File "setup.py", line 479, in setup_package
generate_cython()
File "setup.py", line 274, in generate_cython
raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Python39\python.exe' 'C:\Python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\73B5~1\AppData\Local\Temp\tmpqitnznq3' Check the logs for full command output.
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "C:\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Python39\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\73B5~1\\AppData\\Local\\Temp\\tmpiu6dw24m', '--quiet', 'numpy>=1.15']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Пользователь\AppData\Local\Temp\pycharm-packaging\matplotlib\setup.py", line 242, in <module>
setup( # Finally, pass this all along to distutils to do the heavy lifting.
File "C:\Python39\lib\site-packages\setuptools\__init__.py", line 164, in setup
_install_setup_requires(attrs)
File "C:\Python39\lib\site-packages\setuptools\__init__.py", line 159, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "C:\Python39\lib\site-packages\setuptools\dist.py", line 699, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "C:\Python39\lib\site-packages\pkg_resources\__init__.py", line 779, in resolve
dist = best[req.key] = env.best_match(
File "C:\Python39\lib\site-packages\pkg_resources\__init__.py", line 1064, in best_match
return self.obtain(req, installer)
File "C:\Python39\lib\site-packages\pkg_resources\__init__.py", line 1076, in obtain
return installer(requirement)
File "C:\Python39\lib\site-packages\setuptools\dist.py", line 758, in fetch_build_egg
return fetch_build_egg(self, req)
File "C:\Python39\lib\site-packages\setuptools\installer.py", line 130, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['C:\\Python39\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\73B5~1\\AppData\\Local\\Temp\\tmpiu6dw24m', '--quiet', 'numpy>=1.15']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Ответы (2 шт):
Например, модули numpy и numba в python 3.9 на windows 10 x64 не устанавливаются. Ошибки читать бесполезно. Под линуксом numpy встала, numba также не устанавливается. Под 3.8 ставится всё со свистом. Напрашивается вывод - причина в 3.9. Или в том, что модули с установщиком 3.9 ещё не подружились. pygame и opencv-python тоже не лезут под 3.9
попробуй через командную строку скачай архив, распакуй и закинь папку туда где Pithon, я сократил название чтобы не ругался. строка выглядит так, (pip так же по этой команде обновился норм)
pip install C:\Python3.10\matplotlib
