Error with installation of pycocotools for Detr Tensorflow - tensorflow

I'm trying to use Detr Tensorflow models and need to install pycocotools. On a Windows 10 PC, I'm executing this in a Visual Studio Code. I'm following the steps provided in this
GitHub repo : https://github.com/Visual-Behavior/detr-tensorflow#install
I attempted to pip-install pycocotools and received the following error (fails to construct wheel):
Screenshot of Error
Any idea on how to remove this error ?

The solution is in the error output.
You need to install Microsoft C++ Build Tools.

Related

OSError: WinError 193 %1 is not a valid Win32 application

I have been working on a project in Visual Studio Code with Python 3.8.5, and I have a windows 64 bit operating system. I decided to upgrade to Python 3.11.1, and downloaded the official 64 bit installer and followed the instructions. All the packages I import at the beginning of my project that were previously working now give this error "[WinError 193] %1 is not a valid Win32 application" when I run the import statements for them.
For some of the packages (pandas, numpy, matploblib) this was solved by using an approach I saw on a few similar questions to this, by opening the command prompt and typing "pip uninstall pandas" etc and then doing "pip install pandas".
However, for the other packages (sklearn, umap, nltk), this isn't working even after trying that process a few times. I've also tried updating pip. Does anybody have any ideas on what could be causing this to work for some packages but not for others? It allows me to install all of the packages via the command prompt, the issue only arises when I actually try and import them via VSCode, and it's the same error for every package. I've seen some suggestions saying to ensure the environment path is clean, but I'm still quite a beginner so I'm a bit unsure as to what that means.
Any help would be really appreciated.

Visual Studio Code: ModuleNotFoundError: No module named 'tensorflow'

Setup:
Anaconda3, TensorFlow 2.6.3, cuDNN Archive v8.1.0, CUDA Toolkit 11.2.0, VS Vode 1.64.2
Hello everyone,
since the beginning of this week I have problems importing the tensorflow module.
After pressing the "Run Python File" button in VS Code I get the following error message (highlighted in red):
error module tensorflow
If I start the Python script "manually" (python test.py) everything works as usual (see picture above. Highlighted in green).
Can recently executed Windows updates cause the problem?
I am grateful for any feedback.
Greetings
Chris
The error is caused by the new Python extension version in vscode:
https://github.com/microsoft/vscode-python/issues/18634
For now, I resolved this issue by switching back to previous version:
https://github.com/microsoft/vscode-python/issues/18639#issuecomment-1060216458

Visual C++ for python failed with exit status 1120

I am using python2.7 and trying to host my flask app on windows server. While installing mod_wsgi , the command prompt throws the below mentioned error
error: command 'C:\Users\USER\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\link.exe' failed with exit status 1120
I tried reinstalling the visual C++ for python , but the error still persists. Any suggestions???
Please update your question with a more complete error log. You might even find something helpful by reading the error log more carefully -- The error is not in "Visual C++ for Python failing" but from the VC++ linker.
Also, instead of trying to configure mod_wsgi for Windows, you might find it easier to use wfastcgi. wfastcgi is maintained by Microsoft.

Install pymssql 2.1.3 in Pycharm

I'm working with Pycharm in a project to read SQL DBs ,I'm working in a windows 10 64bits workstation and I'm trying to install the module pymssql, I have already installed VS2015 to get all requirements but now each time that i try to install i got the message:
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe' failed with exit status 2
I saw on message details the error in:
_mssql.c(266): fatal error C1083: Cannot open include file: 'sqlfront.h': No such file or directory
How can i figured it out? thanks
Seems that your error is a known problem, check here.
As you can see from the last post from the link, they don't have wheels built for Python3.6, so when you try to install pymssql, the error is raised.
Still, as the post found suggests, you can try the following options:
Drop back to Python 3.5
Use the Python 3.6 wheels available here:
Try to build pymssql using the advice given in the forum link above.
If you were trying to install pymssql directly from PyCharm, I think that you should follow the options showed above but from command line
For anyone that is seeing this in 2021, pymssql only supports python 3.7 according to their own build files. Don't bother trying to use it if you are on 3.8 or higher. I'm on 3.9.1
Use pyodbc instead. This install worked right out of the box using windows server 2016 after spending about 3 hours of digging.
pip install pyodbc
hope that saves you a ton of grief...
I had the same problem and I fixed this way.
Download pymssql module from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pymssql. place the .whl file in the C:\Python38-32 folder.
Open cmd.exe
Run
cd C:\Python38-32
pip install pymssql-2.1.4-cp38-cp38-win32.whl
I had a same problem but its fixed this way.
Copied "rc.exe" and "rcdll.dll" from "C:\Program Files (x86)\Windows Kits\8.1\bin\x86"
Pasted "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin"
In my case helped me rollback to Python 3.8. Same problem I had on 3.10 x64

SCIP Python Installation Issue Windows with pip

Hello community / developers,
I am currently trying to install SCIP with python and found that there is Windows Support and a pip installer based on https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/INSTALL.md.
Nevertheless I run into a problem "Cannot open include file"
Below is a list of the things I performed to get to this step.
Download Python Anaconda 2.7 64 bit
Install with all checkboxes as they are
Download PyCharm Community edition
Click 64 bit desktop link, and associate with .py checkboxes
Open CMD > write: easy_install -U pip
Download Visual C++ Compiler for Python 2.7
Setup folder structure and downloaded header files
CMD > pip install pyscipopt leads to error:
C:\Users\UserName\Downloads\SCIPOPTDIR\include\scip/def.h(32) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
error: command 'C:\Users\UserName\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2
My environment variables and folder directory can be found here:
http://imgur.com/a/mJRva
Help is very much appreciated,
Kind regards
The error message says your missing "stdint.h". This is because you don't have a recent Visual Studio version. You probably use the one that came with your Python installation. Try installing the latest Visual Studio to fix this issue.
You might want to look at this question:
Why Microsoft Visual Studio cannot find <stdint.h>?
PySCIPOpt needs a C/C++ linker to build the Python module - although it's already precompiled on PyPI.
Alright, I figured it out. I needed to
(1) Install Python 3.6 instead of Python 2.7 (both Anaconda)
(2) Afterwards pip installation worked
(3) I moved the library files in the lib folder
(4) Now I can execute the examples.
Interestingly, I get an unresolved reference error although the code works fine (I assume this is a bug of Pycharm/scipy?) Link to picture: https://www.dropbox.com/s/d8pf6dkwuz9cwto/scip_python.png?dl=0