Problem while installing package in pycharm - python

i'm trying to install ivi package in pycharm, but received the following error:
running build_ext
building 'ivi.optimizations' extension
optimizations.c
C:\Users\tester\AppData\Local\Programs\Python\Python38\include\pyconfig.h(205): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
Encountered error while trying to install package.
Error log screenshot
Full log
using windows 7, and python 3.8.10 is installed.

Related

I can't install eth-brownie on windows

I also installed microsoft c++ 14.... but i really don't know how to get around this
Here is the error:
Fatal error from pip prevented installation. Full pip output in file:
C:\Users\aiatu\.local\pipx\logs\cmd_2022-12-23_22.25.32_pip_errors.log
pip failed to build packages:
bitarray
cytoolz
yarl
Some possibly relevant errors from pip install:
error: subprocess-exited-with-error
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
cytoolz/dicttoolz.c(209): fatal error C1083: Non Š possibile aprire il file inclusione: 'longintrepr.h': No such file or directory
yarl/_quoting_c.c(196): fatal error C1083: Non Š possibile aprire il file inclusione: 'longintrepr.h': No such file or directory
Error installing eth-brownie.
Once again, here answering my own queston.
I had python 3.11.1, i deleted this python version and installed 3.10.9. and then i installed brownie via: pip install eth-brownie

Failed building wheel for python-rtmidi

I'm trying to import magenta to use wavenet, however it always fails and I cannot find any useful information online.
It keeps give me this error information
Building wheels for collected packages: numba, python-rtmidi, llvmlite
Building wheel for numba (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\13003\AppData\Local\Temp\pip-install-417gts98\numba_d67d4f03411546d299e8418ef12a08c5\setup.py", line 358, in <module>
metadata['ext_modules'] = get_ext_modules()
File "C:\Users\13003\AppData\Local\Temp\pip-install-417gts98\numba_d67d4f03411546d299e8418ef12a08c5\setup.py", line 94, in get_ext_modules
import numpy.distutils.misc_util as np_misc
File "D:\Anaconda\envs\venv\lib\site-packages\numpy\distutils\__init__.py", line 24, in <module>
from . import ccompiler
File "D:\Anaconda\envs\venv\lib\site-packages\numpy\distutils\ccompiler.py", line 20, in <module>
from numpy.distutils import log
File "D:\Anaconda\envs\venv\lib\site-packages\numpy\distutils\log.py", line 4, in <module>
from distutils.log import Log as old_Log
ImportError: cannot import name 'Log' from 'distutils.log' (D:\Anaconda\envs\venv\lib\site-packages\setuptools\_distutils\log.py)
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numba
Running setup.py clean for numba
error: subprocess-exited-with-error
c:\users\13003\appdata\local\temp\pip-install-417gts98\python-rtmidi_e5f4214911f54de8b049d39f4499d15a\src\RtMidi.h(48): fatal error C1083: Cannot open include file: 'exception': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-rtmidi
Running setup.py clean for python-rtmidi
Building wheel for llvmlite (setup.py) ... error
error: subprocess-exited-with-error
Message: '"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -D__WINDOWS_MM__ -Isrc -ID:\\Anaconda\\envs\\venv\\include -ID:\\Anaconda\\envs\\venv\\Include /EHsc /Tpsrc\\RtMidi.cpp /Fobuild\\temp.win-amd64-cpython-39\\Release\\src\\RtMidi.obj /EHsc'
Arguments: ()
RtMidi.cpp
c:\users\13003\appdata\local\temp\pip-install-417gts98\python-rtmidi_e5f4214911f54de8b049d39f4499d15a\src\RtMidi.h(48): fatal error C1083: Cannot open include file: 'exception': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
Rolling back uninstall of python-rtmidi
Moving to d:\anaconda\envs\venv\lib\site-packages\python_rtmidi-1.4.9.dist-info\
from D:\Anaconda\envs\venv\Lib\site-packages\~ython_rtmidi-1.4.9.dist-info
Moving to d:\anaconda\envs\venv\lib\site-packages\rtmidi\
from D:\Anaconda\envs\venv\Lib\site-packages\~tmidi
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> python-rtmidi
I'm sure I have installed python-rtmidi, numba,llvmlite but it keeps finding them in an unexit path.
Anyone can help me out?? I really appreciate it T_T
Try setting this environment variable first:
export SETUPTOOLS_USE_DISTUTILS=stdlib
or alternatively prefix your command, e.g. change poetry install to:
SETUPTOOLS_USE_DISTUTILS=stdlib poetry install
(source)

how to fix error while installing chatterbot

i get this error when trying to install chatterbot
im using python 3.10
c1xx: fatal error C1083: Cannot open source file: 'preshed/maps.cpp': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2
[end of output]

Failed building wheel for nes-py

Info: I am using Windows 10 with python 3.7.7 and pip 19.2.3
Problem: I was trying to install nes-py in cmd prompt using pip install nes-py, but during the Building wheel for nes-py (setup.py) ... error stage of the install I got the following error:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include\yvals.h(12): fatal error C1083: Cannot open include file: 'crtdbg.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for nes-py
Edit: I copy and pasted over many files from the Windows SDK and now have a new error:
Generating code
Finished generating code
LINK : fatal error LNK1158: cannot run 'rc.exe'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x64\\link.exe' failed with exit status 1158
----------------------------------------
ERROR: Failed building wheel for nes-py
I solved this issue by installing node.js. This installed all the needed files for me and allowed me to install any packages that had a wheel. This isn't a very elegant fix since it also installed many files that I do not need, but it seems to work and is very simple.
I only solved this issue by installing Visual Studio Community (I had Visual Studio Code).
I did this following the comment here about the requirements to install py-nes that are already inside Visual Studio Community.
Try with completely new enviorment using conda create -n your_env_name python=3.7. I have created with python 3.7. It resolves the issue.
You just download and install this program and run the command again https://visualstudio.microsoft.com/visual-cpp-build-tools/
I can solve the problem - install SDK for Windows 10
screenshot

Biopython install error anaconda on windows

from c:/users/me/anaconda3/scripts I pip install biopythonbut it fails with the following errors:
c:\users\steph\anaconda3\include\pyconfig.h(243): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
Confusingly, I do have a pyconfig.h in c:\users\steph\anaconda3\include. Cannot find what an exit status 2 is either...
Biopython recommends installing through conda if your python is also installed through conda. See here.

Categories

Resources