how to install causalml packages - python

windows 10
IDE:Spyder
Python 3.7.9
I failed to install this package and the error in cmd is shown as follow:
python setup.py install running install running bdist_egg running
egg_info writing causalml.egg-info\PKG-INFO writing dependency_links
to causalml.egg-info\dependency_links.txt writing requirements to
causalml.egg-info\requires.txt writing top-level names to
causalml.egg-info\top_level.txt reading manifest file
'causalml.egg-info\SOURCES.txt' reading manifest template
'MANIFEST.in' warning: no files found matching '.pxd' under directory
'causalml' warning: no files found matching '.h' under directory
'causalml' adding license file 'LICENSE' writing manifest file
'causalml.egg-info\SOURCES.txt' installing library code to
build\bdist.win-amd64\egg running install_lib running build_py running
build_ext building 'causalml.inference.tree.causaltree' extension
C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe
/c /nologo /Ox /W3 /GL /DNDEBUG /MD
-IC:\Users\absence\AppData\Local\Programs\Spyder\pkgs\numpy\core\include
-IC:\Users\absence\AppData\Local\Programs\Spyder\pkgs\numpy\core\include
-IC:\Users\absence\AppData\Local\Programs\Spyder\Python\include -IC:\Users\absence\AppData\Local\Programs\Spyder\Python\include "-IC:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include"
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt"
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared"
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um"
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt"
"-IC:\Program Files (x86)\Windows
Kits\10\include\10.0.19041.0\cppwinrt"
/Tccausalml/inference/tree/causaltree.c
/Fobuild\temp.win-amd64-3.7\Release\causalml/inference/tree/causaltree.obj
-O3 causaltree.c causalml/inference/tree/causaltree.c(31): fatal error C1083: “Python.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 status 2
May I ask a help for how to solve it?

Related

when building python Django project it exiting with an error

i am getting below error when building the project. I have installed pymssql using pip -m install pymssql and visual studio installer as well.
tree = Parsing.p_module(s, pxd, full_module_name)
building '_mssql' extension
creating build
creating build\temp.win-amd64-cpython-39
creating build\temp.win-amd64-cpython-39\Release
creating build\temp.win-amd64-cpython-39\Release\src
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\anallamilli\AppData\Local\Temp\pip-install-_ebszunz\pymssql_8c3eaa8f4e074feda79e1cd9e7617f9e\freetds\vs2015_64\include -IC:\Users\anallamilli\AppData\Local\Temp\pip-install-_ebszunz\pymssql_8c3eaa8f4e074feda79e1cd9e7617f9e\build\include "-Ic:\users\anallamilli\onedrive - fireangel\desktop\local build\admin_v2_pipeline\comp_admin_system\env1\include" -IC:\Users\anallamilli\AppData\Local\Programs\Python\Python39\include -IC:\Users\anallamilli\AppData\Local\Programs\Python\Python39\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwinrt" /Tcsrc\_mssql.c /Fobuild\temp.win-amd64-cpython-39\Release\src\_mssql.obj -DMSDBLIB
_mssql.c
src\_mssql.c(699): fatal error C1083: Cannot open include file: 'sqlfront.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.32.31326\\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.
WARNING: No metadata found in c:\users\anallamilli\onedrive - fireangel\desktop\local build\admin_v2_pipeline\comp_admin_system\env1\lib\site-packages
Rolling back uninstall of pymssql
Moving to c:\users\anallamilli\onedrive - fireangel\desktop\local build\admin_v2_pipeline\comp_admin_system\env1\lib\site-packages\pymssql-2.2.5.dist-info
from C:\Users\anallamilli\OneDrive - FireAngel\Desktop\Local build\Admin_V2_Pipeline\COMP_Admin_System\env1\Lib\site-packages~ymssql-2.2.5.dist-info
Moving to c:\users\anallamilli\onedrive - fireangel\desktop\local build\admin_v2_pipeline\comp_admin_system\env1\lib\site-packages\pymssql
from C:\Users\anallamilli\OneDrive - FireAngel\Desktop\Local build\Admin_V2_Pipeline\COMP_Admin_System\env1\Lib\site-packages~ymssql
error: legacy-install-failure
Encountered error while trying to install package.
pymssql
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure."

fatal error grib_api.h no such file directory

I am going to install pygrib. However, whenever I try to install it, fatal error C1083 appears and says I can't find grib_api.h. Visual studio was also reinstalled, and github found grib_api.h and put it in the path, but it changed to a new error that there was no times in sys. When I solved this error, the error suddenly increased. No matter how hard I try with pip install, that error keeps coming out.
E:\pygrib-master>python setup.py install
eccodes not found, build may fail...
running install
C:\Users\zingg\AppData\Local\Programs\Python\Python310\lib\site-
packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py
install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
C:\Users\zingg\AppData\Local\Programs\Python\Python310\lib\site-
packages\setuptools\command\easy_install.py:160: EasyInstallDeprecationWarning:
easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing src\pygrib.egg-info\PKG-INFO
writing dependency_links to src\pygrib.egg-info\dependency_links.txt
writing requirements to src\pygrib.egg-info\requires.txt
writing top-level names to src\pygrib.egg-info\top_level.txt
reading manifest file 'src\pygrib.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.def' under directory 'eccodes'
adding license file 'LICENSE'
writing manifest file 'src\pygrib.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
skipping 'src/pygrib\_pygrib.c' Cython extension (up-to-date)
building 'pygrib._pygrib' extension
"C:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe" /c /nologo /O2
/W3 /GL /DNDEBUG /MD -IC:\Users\zingg\AppData\Local\Programs\Python\Python310\include -
IC:\Users\zingg\AppData\Local\Programs\Python\Python310\Include -
IC:\Users\zingg\AppData\Local\Programs\Python\Python310\lib\site-
packages\numpy\core\include "-IC:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Tools\MSVC\14.31.31103\ATLMFC\include" "-IC:\Program
Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\include" "-
IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files
(x86)\Windows Kits\10\\include\10.0.19041.0\\shared" "-IC:\Program Files (x86)\Windows
Kits\10\\include\10.0.19041.0\\um" "-IC:\Program Files (x86)\Windows
Kits\10\\include\10.0.19041.0\\winrt" "-IC:\Program Files (x86)\Windows
Kits\10\\include\10.0.19041.0\\cppwinrt" /Tcsrc/pygrib\_pygrib.c /Fobuild\temp.win-
amd64-3.10\Release\src/pygrib\_pygrib.obj
_pygrib.c
C:\Users\zingg\AppData\Local\Programs\Python\Python310\lib\site-
packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using
deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
src/pygrib\_pygrib.c(697): fatal error C1083: 포함 파일을 열 수 없습니다. 'grib_api.h': No
such file or directory
error: command 'C:\\Program Files\\Microsoft Visual
Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX86\\x64\\cl.exe' failed
with exit code 2

error installing openssl for python (pip)

i'm trying to install openssl using pip in order to use it with python.
i tried several versions and i get the same error!
i tried pip install cryptography and got the same error !
visual studion sdk builder is installed and worked for other packages.
please help, i attached the log after running "pip install pyopenssl !
log with the end error:
building '_openssl' extension
creating build\temp.win32-3.8\Release\build
creating build\temp.win32-3.8\Release\build\temp.win32-3.8
creating build\temp.win32-3.8\Release\build\temp.win32-3.8\Release
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\teich\PycharmProjects\first\venv\include -ID:\Users\teich\A
ppData\Local\Programs\Python\Python38-32\include -ID:\Users\teich\AppData\Local\Programs\Python\Python38-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\
INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Wind
ows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" "-IC:\Program Files\OpenSSL-Win6
4\OpenSSL-win64" /Tcbuild\temp.win32-3.8\Release\_openssl.c /Fobuild\temp.win32-3.8\Release\build\temp.win32-3.8\Release\_openssl.obj
_openssl.c
build\temp.win32-3.8\Release\_openssl.c(498): fatal error C1083: Cannot open include file: 'openssl/opensslv.h': No such file or directory

Getting issues Installing Regex via PIP [duplicate]

This question already has answers here:
Visual Studio can't build due to rc.exe
(28 answers)
Closed 3 years ago.
Ongoing adventures trying to get GPT-2 working under W10
I've installed the relevant version of VC++ Build Tools, however, I'm now getting the following error.
ERROR: Command errored out with exit status 1:
command: 'c:\users\ianholdsworth\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\IANHOL~1\\AppData\\Local\\Temp\\pip-install-ti712svq\\regex\\setup.py'"'"'; __file__='"'"'C:\\Users\\IANHOL~1\\AppData\\Local\\Temp\\pip-install-ti712svq\\regex\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\IANHOL~1\AppData\Local\Temp\pip-wheel-mhweepz9' --python-tag cp37
cwd: C:\Users\IANHOL~1\AppData\Local\Temp\pip-install-ti712svq\regex\
Complete output (26 lines):
c:\users\ianholdsworth\appdata\local\programs\python\python37\lib\site-packages\setuptools\dist.py:470: UserWarning: Normalizing '2017.04.05' to '2017.4.5'
normalized_version,
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying Python3\regex.py -> build\lib.win-amd64-3.7
copying Python3\_regex_core.py -> build\lib.win-amd64-3.7
copying Python3\test_regex.py -> build\lib.win-amd64-3.7
running build_ext
building '_regex' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\Python3
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\ianholdsworth\appdata\local\programs\python\python37\include -Ic:\users\ianholdsworth\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" /TcPython3\_regex.c /Fobuild\temp.win-amd64-3.7\Release\Python3\_regex.obj
_regex.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\ianholdsworth\appdata\local\programs\python\python37\include -Ic:\users\ianholdsworth\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" /TcPython3\_regex_unicode.c /Fobuild\temp.win-amd64-3.7\Release\Python3\_regex_unicode.obj
_regex_unicode.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\ianholdsworth\appdata\local\programs\python\python37\libs /LIBPATH:c:\users\ianholdsworth\appdata\local\programs\python\python37\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64" /EXPORT:PyInit__regex build\temp.win-amd64-3.7\Release\Python3\_regex.obj build\temp.win-amd64-3.7\Release\Python3\_regex_unicode.obj /OUT:build\lib.win-amd64-3.7\_regex.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\Python3\_regex.cp37-win_amd64.lib
_regex.obj : warning LNK4197: export 'PyInit__regex' specified multiple times; using first specification
Creating library build\temp.win-amd64-3.7\Release\Python3\_regex.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\Python3\_regex.cp37-win_amd64.exp
Generating code
Finished generating code
LINK : fatal error LNK1158: cannot run 'rc.exe'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1158
----------------------------------------
ERROR: Failed building wheel for regex
Any thoughts?
Visual Studio can't build due to rc.exe
To fix the issue, do next steps:
Add this to your PATH environment variables:
C:\Program Files (x86)\Windows Kits\10\bin\x64
Copy these files rc.exe & rcdll.dll from C:\Program Files (x86)\Windows Kits\8.1\bin\x86
to C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
In newer Windows these files might also be in the highest version: C:\Program Files (x86)\Windows Kits\10\bin\10.0.VERSION\x86

Compilation of Python extension on windows fails with missing source filename error D8003

I'm trying to build qpython (the kdb python interface) for python 3.6.3 (Anaconda) running on windows 7.
After downloading and unpacking qPython-qPython-1.2.2.zip
Executing "python setup.py build_ext --inplace"
gives...
running build_ext
building 'qpython.fastutils' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\wilsoroh\AppData\Local\Continuum\Anaconda3\lib\site-packages\numpy\core\inclu
de -IC:\Users\wilsoroh\AppData\Local\Continuum\Anaconda3\include -IC:\Users\wilsoroh\AppData\Local\Continuum\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\
Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\u
m" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt" "-IC:\Program Files\Sy
base\OCS-15_0\include\" /Tcqpython/fastutils.c /Fobuild\temp.win-amd64-3.6\Release\qpython/fastutils.obj
cl : Command line error D8003 : missing source filename
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
Which looks like setup is simply not setting the paths up correctly for the compiler.
A look in the qpython directory below shows fastutils.c sitting there waiting to be compiled.
This kind of thing seems to be a regular problem when trying to build python extensions on windows.
Any help / suggestions greatly appreciated.

Categories