Trying to install python-mbedtls on Windows using VSCode - python-3.x

I am trying to install the python-mbedtls package using pip installer in my venv on Windows, but I am getting the below error:
build\3.10.2\temp.win-amd64-3.10\Release\pyrex\mbedtls\exceptions.c(685): fatal error C1083: Cannot open include file: 'mbedtls/error.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\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: Failed building wheel for python-mbedtls
Failed to build python-mbedtls
ERROR: Could not build wheels for python-mbedtls, which is required to install pyproject.toml-based projects
I know that this library uses the C lib mbedtls and I have no experience using C, or C libraries in my python code directly.
I have made sure to install the C/C++ build tools on my VSCode, and I'm using Python 3.10. I am completely lost on how to proceed

Related

getting error while installing tronpy , tronweb , tronapi

i tried install tronpy but it shows legacy-install-failur
full error code below
sing legacy 'setup.py install' for trx-utils, since package 'wheel' is not installed.
Using legacy 'setup.py install' for bitarray, since package 'wheel' is not installed.
Installing collected packages: bitarray, cytoolz, attrdict, trx-utils, eth-utils, rlp, eth-keys, eth-abi, eth-rlp, eth-keyfile, eth-account, tronweb
Running setup.py install for bitarray ... error
error: subprocess-exited-with-error
× Running setup.py install for bitarray did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\bitarray
copying bitarray\test_bitarray.py -> build\lib.win-amd64-3.10\bitarray
copying bitarray\test_util.py -> build\lib.win-amd64-3.10\bitarray
copying bitarray\util.py -> build\lib.win-amd64-3.10\bitarray
copying bitarray_init_.py -> build\lib.win-amd64-3.10\bitarray
running build_ext
building 'bitarray._bitarray' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\bitarray
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 /M
D -IC:\Users\Pugazhenthi\AppData\Local\Programs\Python\Python310\include -IC:\Users\Pugazhenthi\AppData\Local\Programs\Python\Python310\Include -IC:\Pro
gram Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include /Tcbitarray/_bitarray.c /Fobuild\temp.win-amd64-3.10\Release\bitarray/_bitarray.obj
_bitarray.c
C:\Users\Pugazhenthi\AppData\Local\Programs\Python\Python310\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.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.
╰─> bitarray
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Until now, tronapi still does not support python 3.10 and above, so you should use python 3.9

Cygwin -- installing `tcl-devel` packages does not provide header files

I have some makefile that is used to compile a program. During compilation I get an error:
In file included from kernel/driver.cc:20:
./kernel/yosys.h:81:12: fatal error: tcl.h: No such file or directory
81 | # include <tcl.h>
| ^~~~~~~
compilation terminated.
make: *** [Makefile:696: kernel/driver.o] Error 1
Then I rerun Cygwin setup application and install new package tcl-devel. I restart the Cygwin terminal and try again. The same error pops up. I don't understand! Why aren't headers found?
My tcl and tcl-devel are both of version 8.6.11-1.

Build protobuf with bazel error: repeated_composite_container.cc(267) fatal error C1057

I'm trying to build TensorFlow with Bazel on Windows.
But i'm getting this error:
ERROR: C:/users/spenh/appdata/local/temp/_bazel_spen/icnq02mb/external/protobuf/BUILD:623:1: C++ compilation of rule '#protobuf//:python/google/protobuf/pyext/_message.so' failed: msvc_cl.bat failed: error executing command external/local_config_cc/wrapper/bin/msvc_cl.bat /DOS_WINDOWS=OS_WINDOWS /DCOMPILER_MSVC /DNOGDI /DNOMINMAX /DPRAGMA_SUPPORTED /D_WIN32_WINNT=0x0600 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS ... (remaining 42 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 2.
C:\users\spenh\appdata\local\temp\_bazel_spen\icnq02mb\execroot\org_tensorflow\external\protobuf\python\google\protobuf\pyext\repeated_composite_container.cc(267): fatal error C1057: Unerwartetes Dateiende bei der Erweiterung eines Makros
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Any idea what i can try to solve this? Or what information i could provide you to solve this?
Bazel: git/master (13.06.2017)
TensorFlow: v1.2.0-rc2
Python 3.6.1 x64
Visual Studio 2017 v15.0.26430.6 x64
Java JDK 1.8.0_60
Windows 10
Build command:
bazel build -c opt --cpu=x64_windows_msvc --host_cpu=x64_windows_msvc --copt=-w --host_copt=-w tensorflow/tools/pip_package:build_pip_package

Build message - Unknown compiler version, for dealii-4.8.1 library on visual studios

My build output gives many error messages of:
"Unknown compiler version - please run the configure tests and report the results"
...when attempting to build INSTALL for the dealii-8.4.1 library (open source, finite element library - graphics library) on Visual studios 14.0 (v 2015) c++.
A portion of the build is shown below.
Can anyone advise on what this means? and how to: "run the configure tests and report the results?" I Configured dealii-8.4.1 using cmake to start with.
Using deal.II on native Windows (dealii webpage and instructions)
https://github.com/dealii/dealii/wiki/Windows
PORTION OF BUILD OUTPUT on Visual Studios
44> vector_tools_point_value.cc
44> Unknown compiler version - please run the configure tests and report the results
44>C:\dealii-8.4.1\source\numerics\vector_tools_point_value.cc(22): fatal error C1083: Cannot open include file: 'vector_tools_point_value.inst': No such file or directory
44> vector_tools_point_gradient.cc
44> Unknown compiler version - please run the configure tests and report the results
44>C:\dealii-8.4.1\source\numerics\vector_tools_point_gradient.cc(22): fatal error C1083: Cannot open include file: 'vector_tools_point_gradient.inst': No such file or directory
44> vector_tools_project.cc
44> Unknown compiler version - please run the configure tests and report the results
44>C:\dealii-8.4.1\source\numerics\vector_tools_project.cc(22): fatal error C1083: Cannot open include file: 'vector_tools_project.inst': No such file or directory
44> vector_tools_rhs.cc
44> Unknown compiler version - please run the configure tests and report the results
44>C:\dealii-8.4.1\source\numerics\vector_tools_rhs.cc(83): fatal error C1083: Cannot open include file: 'vector_tools_rhs.inst': No such file or directory
The issue may be due to deal.II on native Windows, as for the windows version it states:
"Warning: please be aware that the following is experimental and you will likely encounter bugs in compilers and deal.II itself. Only continue if you are willing to experiment."
https://github.com/dealii/dealii/wiki/Windows
And: "deal.II is mostly developed on Linux using the GCC compiler."
http://www.dealii.org/8.4.1/readme.html
So it may be better to install Linux (Ubuntu) to see if that solves it.

Node.js npm installing websocket fails

I am installing websocket through npm in Windows 7 64 bit. The websocket version is 1.0.8
I am getting a linking error even though I have Visual Studio 2010 and Python 2.7 :
C:\Windows\system32\node_modules\websocket>node "C:\Program Files (x86)\nodejs\n
ode_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" r
ebuild
validation.cc
C:\Users\User\.node-gyp\0.10.30\deps\v8\include\v8.h(184): warning C4506: no d
efinition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Hand
le<T>)' [C:\Windows\system32\node_modules\websocket\build\validation.vcxproj]
with
[
T=v8::Object
]
LINK : fatal error LNK1104: cannot open file 'C:\Windows\system32\node_modules\w
ebsocket\build\Release\validation.node' [C:\Windows\system32\node_modules\websoc
ket\build\validation.vcxproj]
xor.cpp
C:\Users\User\.node-gyp\0.10.30\deps\v8\include\v8.h(179): warning C4506: no d
efinition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Hand
le<T>)' [C:\Windows\system32\node_modules\websocket\build\xor.vcxproj]
with
[
T=v8::Object
]
LINK : fatal error LNK1104: cannot open file 'C:\Windows\system32\node_modules\w
ebsocket\build\Release\xor.node' [C:\Windows\system32\node_modules\websocket\bui
ld\xor.vcxproj]
gyp[websocket v1.0.8]
Native code compile failed!!
Please note that this module DOES NOT REQUIRE the native components
and will still work without them, though not quite as efficiently.
On Windows, native extensions require Visual Studio and Python.
On Unix, native extensions require Python, make and a C++ compiler.
Start npm with --websocket:verbose to show compilation output (if any).
websocket#1.0.8 node_modules\websocket
C:\Windows\system32>
Is there a way to skip this compilation stuff and just use this module right away ? Or someway to fix this error ?
PS: the command prompt was started with Admin rights.

Resources