<Python> OpenPIV Installation Error - python

I am attempting the installation of OpenPIV (python build) on 64-bit Win7.
Upon downloading the setup files(located - https://github.com/alexlib/openpiv-python) and running:
python setup.py install
I receive the error:
error: Unable to find vcvarsall.bat
Some research informed me to use:
python setup.py build --compiler=mingw32
Which then resulted in:
error: command 'gcc' failed: No such file or directory.
So, I installed MinGW and adjusted the PATH variable to include C:\MinGW\bin, where gcc.exe is located, but no dice. Following this, I tried restarting my command prompt, restarting my computer, reinstalling MinGW, and reinstalling the setup files.
Running gcc:
C:\OpenPIV\> gcc
gcc:fatal error: no input files
compilation terminated.
Which I assume means gcc works, but
python setup.py build --compiler=mingw32
still results in:
error: command 'gcc' failed: No such file or directory.
Thanks everyone. Any suggestions/tips would be greatly appreciated.

After hours and hours of searching, I've discovered that this is a problem between MinGW and Python. They don't communicate well with one another.
There exists a binary package of MinGW (unofficial) that was meant for use with Python located here
This fixes the problem!

Related

BreakOut Detection Python/R Pkg Installation on Mac

I have been trying to install the BreakOut Detetction pkg (by Roland Hochmuth) in a MacOS Mojave environment.
Following is the pkg I am talking about, https://github.com/roland-hochmuth/BreakoutDetection
I was able to get swig on my machine by using homebrew.
The pkg details 3 steps to install:
swig -python -c++ breakout_detection.i
python setup.py build_ext -I../src build
sudo python setup.py build_ext -I../src install
I got the error with the first step and shows "Unable to find file 'breakout_detection.i'."
Then I try to swig with a detailed file paths, it somehow works with the first step.
However, the second step gives a lot of compilation errors and warnings.
One of the errors shows "error: command 'gcc' failed with exit status 1".
I was wondering if anyone has tried compiling this pkg.
I really want to know how this guy successfully compiled the pkg. (https://www.youtube.com/watch?v=fcsyL5TwIvE)
I found a way to simply solve this issue by putting codes in the breakout detection folder where "breakout_detection.py" is.
Then you can simply "import breakout_detection" library and use it.

Issue with installing geopandas

I'm trying to install geopandas on my laptop, a Windows 10 version 1709 machine.
After executing the pip install geopandas command, I'm getting the message:
command python setup.py egg_info failed with error code 1.
I already tried to upgrade pip and setuptools, but still no success. I installed Python 3.6.
Assuming you got something like this error:
File "C:\Users\Simon\Anaconda3\lib\site-packages\setuptools\msvc.py", line 848, in __init__
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Simon\AppData\Local\Temp\pip-build-2vl7e6lb\pyproj\
That error appears because you need to compile the package yourself. On Windows that requires build tools.
You just need to go to the link given to you in your error message and download Build Tools for Visual Studio 2017. Once you have done this, Try the installation command again. It should now work.
You can also find out more information from Windows Compilers
Experiencing the same problem, the only thing that worked for me after having tried the various solutions suggested here -- I'm using Jupyter Notebook on Anaconda -- was installing it through the anaconda platform [Environments]; I hope this helps someone.

mysql-python install error: Cannot open include file: 'config-win.h

Hi,
Im trying to pip install mysql-python and I keep getting an error. I was wondering if anyone knows what I need to do get this working?
I'm using Windows 10, python 3.6 and mysql 5.7. I'm new to coding so if there is something I missed please let me know. Thanks
This is the error I keep getting:
_mysql.c(42): fatal error C1083: Cannot open include file:
'config-win.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl
.exe' failed with exit status 2
You can download unofficial windows binaries for your python version using https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient.Then install it using pip. This way you'll be able to avoid the hassle of dealing with visual studio build tools.
Just download the mysqlclient.whl file most applicable to you(for python 3 versions).
I think in your case it'll be
mysqlclient‑1.3.13‑cp36‑cp36m‑win32.whl(if your machine is 32 bits)
mysqlclient‑1.3.13‑cp36‑cp36m‑win_amd64.whl(if your machine is 64 bits)
and then in command prompt, change the location to the directory where the downloaded file is, by :
cd "the path to the downloaded file"
and run the file:
pip install mysqlclient‑1.3.13‑cp36‑cp36m‑win_amd64.whl

XMLSEC installation error, Windows-7

Im trying to install xmlsec (with pip) but it is throwing: error: pkg-config is not installed. Im using Python3.6 on windows 7.
Thanks in advance for any suggestion.
Xmlsec has some issues with windows but as with python 3.6 and below the problem is solved. Use this link to download the wheel file for your python version https://github.com/mehcode/python-xmlsec/releases
Install the wheel file using
pip install <wheel_file_name>
As with Python 3.7, the only way out is to install xmlsec on a Linux machine as it is not yet supported on Windows.
This seems to be a problem on Windows #Jcc.Sanabria on Windows. Where as Linux & MAC are seems to be working for xmlsec.
Since I had gone through this situations for around weeks now.
Going through official Document
here I didn't find any instruction on "How to install this on Windows?"
To answer your question :
Resolve your exception related with pkgconfig you can use this link on Windows.
But then it will also ask you to install Visual C++ (>=ver. 14.0) but after installing this too.
You will face exception like this one :
"cl : Command line error D8021 : invalid numeric argument '/Wno-error=declaration-after-statement'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2"
Which I didn't find any resolution till now. :(
But to use xmlsec and python on Windows working you need to take support from Cygwin. Where you can install all related packages from Cygwin Packages list for python and xmlsec dependancy. Following are the name & version of some packages :
gettext-devel(0.19.8.1-2),libglib2.0-devel(2.50.3-1),libxml2-devel(2.9.4-2),libxmlsec1-devel(1.2.24-1),libxslt-devel(1.1.29-1)
Further dependency can be checked on this link

Cannot install Cython with Python 3.2 and MinGW32 under cygwin or under dos comandprompt

I am trying to install Cython 0.14 on my Windows 7, 32 bit, coupled with Python 3.2. I followed the instructions given at http://wiki.cython.org/InstallingOnWindows, but have run into several deadends. I think the I have followed the instruction for MinGW exactly, except for the part about opening prompt and test if I have installed MinGW correctly (How do I test that?).
I first ran into some errors when I tried installing Cython by typing
python setup.py install
in cygwin, but I resolved those. However, my python 3.2 still didn't know of the existence of Cython, so I tracked to problem down to cython being installed under c:\cygwin\lib\ while python is installed under c:\python32. So I tried various methods of moving cython to python folder, but since I didn't know where exactly everything goes, those attempts did not come to fruition.
In the interim, I tried to look for different, faster interpreters of python, and installed pypy. I also reinstalled python 3.2 to clear out the mess I made by trying to install cython in the python directory.
Then later I tried to install cython again using the command prompt, with the same script, but found that the default version of python has changed to 2.6, which probably sneaked in with the failed cython installations. But finding that python 2.6 can't compile the setup.py file, I just did
c:\python32\python setup.py install
in the cython directory. This worked until it gave me an error
TypeError: NoneType() is Unordered: if self.gcc_version <= "2.91.57":
in the distutils.cygwinccompiler module in python32. So I changed that to
if (not self.gcc_version == None) and self.gcc_version <= "2.91.57":
When I tried installing again under the command prompt, I get this error:
running build
running build_py
running build_ext
Access is denied.
skipping 'C:\cython-0.14.1\Cython\Plex\Scanners.c' Cython extension (up-to-date)
building 'Cython.Plex.Scanners' extension
C:\cygwin\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python32\include -IC:\Pyth
on32\PC -c C:\cython-0.14.1\Cython\Plex\Scanners.c -o c:\cython-0.14.1\cython\pl
ex\scanners.o
error: command 'gcc' failed: Permission denied
I tried the same thing with cygwin and I get the same error. I have restarted my computer and tried again, still same error.
Any and all help would be appreciated, since I spent an entire day on this to no avail.
The "Permission denied" is still a good way to look. It can happen because:
the gcc command is not executable (weird, but are you able to type "gcc --version" and get the output ?)
the destination path "c:\cython-0.14.1\cython\plex\" is not available or not writable. If you have install it with administration right and use with user right, maybe it's the case. Try to give access to everyone here. (disclamer: i'm not a windows guy ^^)
See Get "Access is denied" when trying to compile with g++ from command line. Cygwin. This fully addresses your question. The issue is apparently symlinks (as i learnt today much to my discomfiture).

Categories

Resources