Forced to install GDAL 1.11 framework by package for QGIS, and failing - gdal

To install QGIS on my MacBook Pro I need to install the gdal framework; however, the 1.11 framework package needed for QGIS is an empty file at kyngchaos. I tried installing GDAL 1.10 complete, but QGIS is requiring 1.11. I have Mavericks. I've installed each individual package: UnixImageIO, PROJ, GEOS, SQLite2, numpy, rgdal, and on... Now when I run the GDAL 1.11 framework install, everything seems to run until the last page, where an "Install Fail" page shows up. When I try to view the error, I'm taken out of the installer.
After some googling, I tried installing using homebrew. (brew install gdal)... I got a little further, but it tells me to "brew link libpng libtiff" -- and when I run that command, I get:
Linking /usr/local/Cellar/libpng/1.5.14... Warning: Could not link libpng. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/libpng/1.5.14/share/man/man3/libpngpf.3
/usr/local/share/man/man3 is not writable. You should change its permissions.
After some more searching, it seems I could change permissions from usr/local to me, but I'm not sure how to (exactly) and don't want to mess anything up. Any help would be greatly appreciated, and my apologies if I'm missing something painfully obvious! I'm a novice at the programming end of things, so am just kind of pushing through everything like a bull in a china shop.
UPDATE:
Okay, I found the answer, even though it didn't seem to be working initially--
I ran the following commands from the GDAL help documentation:
export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH
sudo ln -sfh [ver] /Library/Frameworks/GDAL.framework/Versions/Current
in Terminal, and the framework was updated. If I run the GDAL 1.11 installer it still shows up as a failed installation, BUT QGIS recognizes 1.11 as the installed, so that's great.
(I just needed to install matplotlib in addition, and QGIS was installed successfully.)
It seems that the GDAL Complete framework was just updated 3 days ago, so it should be a temporary error until they realize the package is empty.

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.

Installing GDAL via poetry on mac getting EnvCommandError error

I've been trying to install GDAL via poetry on mac but i keep getting an EnvCommandError error. I've tried reinstalling command line tools on mac and i even tried this stack overflow solution where i could log in to poetry's shell, try installing poetry via pip through there and then try adding GDAL via poetry but i still get the same error. Going through the code, it's all repeating this error at different lines of code
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:138:32: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
Something about null values not allowed. I'm not exactly sure how to resolve this one. Has anyone encountered this error before with GDAL and poetry?
EDIT: This still isn't fixed yet but i tried installing via homebrew and the installation proceeded. From what i've been reading so far, it seems that the stdio.h that comes with xcode's command line tools isn't compatible with how gdal is setup so if i install via pip, the installation fails. Not sure though what homebrew does differently. Unfortunately, since poetry uses pip, not homebrew, this is not solved yet

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

Python Packaging Fix: Understand Differences between Wheel and Egg; How to get local fix to wider audience?

I'm trying to understand why the easy_install of pyicu works and pip install doesn't (see below). also trying to understand "What is the difference between a PyPi project with a universal wheel and one without?" Will installs be "easier?". If so, will this merge request solve the problem of polyglot not installing on an Anaconda machine?
Need help/advice/solutions on how to best resolve python project install issue that is tied to underlying dependencies. I have two local fixes in GitHub Gists but would like to know the best way to have this fix "out there" so people like me can find it. What is the normal Python Community approach? The problem centers around three projects:
polyglot - a python multilingual NLP toolkit
pyicu - Python extension wrapping IBM's International Components for Unicode C++ library (ICU).
pycld2 - CLD (Compact Language Detection) library as maintained by Dick Sites
The goal:
Install polyglot on a MacOSX computer running Python Anaconda Distribution
Make the fix I found available to everyone; lots of issues published about the problem.
Here's the error trace:
The Problem (Lots of them):
Core polyglot dependency, pyicu, does not properly install when you use pip install. Discovered you must use easy_install for it build properly and work on MacOSX. If you don't use the easy_install, you get:
polyglot requires icu 54.1.1 to run in Anaconda, but...
Homebrew, the MacOSX tool to install icu, only installs version 58.1. That version is too new. Old stackoverflows advise brew install icu4c to fix problem, but Homebrew evolution makes that advice obsolete now.
pyicu does not have a universal wheel; but I created a merge request to add one to pyicu. Only way to fix this is with this channel's icu, https://anaconda.org/ccordoba12/icu. conda install icu will not work, but that's the normal conda way of doing things.
*pycld2 - CLD (Compact Language Detection) becomes a problem because after I build the wheel file locally, have to download the project and run setup.py install locally. There has to be a better way to do this right?
What I've Done to Solve the problem (should I do more, what should I do next?)
Created two Gists that can successfully install polyglot on a Mac running Anaconda for Python 2.7 or Python 3.5
Python 2.7 fix
Python 3.5 fix
created the merge request for pyicu
Both Gist fixes work. But, is this error in install tied to the wheel? If I installed pyicu with easy_install, the install works. But, with pip, it doesn't?
What are the steps to take in the Python community to fix it so people can find the solution or just pip install with no problems?
I did a test, and if the wheel file is built, the pip works with no issues.

Install Tensorflow pip wheel without internet

I do not have internet access on my linux computer therefore I installed TF from source by following TensorFlow Get Started.
I ran into a few trouble to build trainer_example due to the lack of internet connection hopefully someone from tensorflow helped me through it by creating local repositories for re2, gemmlowp, jpegsrc v9a, libpng and six and modifying WORKSPACE accordingly.
When I try to bazel build pip_package to create the wheel then I think I run into the same problem but :
-the list of repositories is insanely long (to manually install each of them) even if they seem to be mostly part of PolymerElements
Is there an easy workaround ?
If you are happy to create a PIP package without TensorBoard, you should be able to avoid rewriting the Polymer dependencies by removing this line ("//tensorflow/tensorbaord" in the build_pip_package dependencies) from tensorflow/tools/pip_package/BUILD.