GDAL 2.3.1 is installed but the llinux terminal is using GDAL 2.2.2 - numpy

I've installed GDAL 2.3.1 using pip on a ubuntu 16.04. The package is in the correct site-packages directory and yet when I run a python script, I receive this error:
Error 1: NUMPY driver was compiled against GDAL 2.3, but the current library
version is 2.2
When using 'gdal-config --version', the output shows '2.2.2'.
I want to know how to change the version of gdal that linux appears to be using from 2.2.2 to 2.3.1 but I have no idea how to do this.
Any help would be greatly appreciated!

Related

How to solve "ERROR: No matching distribution found for tensorflow==1.12.0"

I am trying to install tensorflow 1.12.0. This is the command that I am using pip install tensorflow==1.12.0. I got this command from this link. This is the error that I am getting.
ERROR: Could not find a version that satisfies the requirement
tensorflow==1.12.0 (from versions: 2.5.0rc0, 2.5.0rc1, 2.5.0rc2,
2.5.0rc3, 2.5.0) ERROR: No matching distribution found for tensorflow==1.12.0
What am I doing wrong?
You can install previous versions of Tensorflow directly from the Github release page. For example, the 1.12.0 version can be downloaded from https://github.com/tensorflow/tensorflow/releases/tag/v1.12.0.
My python version was 3.9. Intalling python version 3.6 solved the problem. I installed it in virtual environment with conda.

Can't install tensorflow on python 3.9

When I try to install tensorflow on python 3.9 I get following error:
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
Is not there any tensorflow for 3.9?
What do you guys recommend?
Can I install other version of python beside the existing version?
Right now tensorflow does not have a build for python3.9
The latest one is for python3.8
You can check the build files at PyPI
https://pypi.org/project/tensorflow/#files
yes, you can install another version of python.
The original poster did not mention what type of computer or operating system he was using while attempting to install TensorFlow alongside Python 3.9. The error could be linked to working on a 64-bit Mac with the M1 chip (I recently experienced the same error described above while working on a Mac M1 in a Miniconda environment with Python 3.9.13). I solved the error by running
python3 -m pip install tensorflow-macos
from Terminal (in the Miniconda environment). TensorFlow installed normally alongside Python 3.9.13.
I do recommend installing Miniconda (or Anaconda as others have suggested), because it will allow you to easily create development environments with whatever version of Python modules or dependencies you require at the moment. See https://docs.conda.io/en/latest/miniconda.html. The larger Anaconda comes with a user-friendly 'Navigator' GUI which enables you to choose which environment is used to open a Jupyter notebook or other development environment, several of which come with Anaconda. See https://docs.anaconda.com/anaconda/install/
This is terrible with newer versions of Python that are not compatible with the machine learning module package.
So my approach is to keep the existing version 3.9 and the computer is using Anaconda to install a virtual environment with 3.7. When using vscode or pycharm, just remember to set it to that 3.7 Python environment.

Unable to install XGBOOST on MAC using Anaconda

I am using the Graphical Interface of Anaconda. I tried to install py-xgboost but it gave me the following error-
*UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
py-xgboost -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0']
Your python: python=3.8
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.*
It says I have python 3.8 installed in my system but when I checked the python version on my system using the command python2 --version & python3 --version it says I have python 2.7.16 & python 3.7.3
I dont have python 3.8
What shall I do now? The above python version were there already. I never installed and someone told me not to remove those versions as some of the MAC applications are dependent on them. Its a MAC BOOK PRO 15 ( 2019 )
After some research I found a solution. I had to downgrade my python version.
But as explained above when I tried to check the version of python I am using I was getting 2.7 & 3.7.3 but my ANACONDA gives an error that I have version 3.8
That was because Anaconda uses the python which is installed in a separate directory, it was not using the python installed at the PATH directory. So I had to downgrade python which the ANACONDA was using by using the command -
conda search python
BTW if your terminal says conda command not found, then you need to edit your PATH first.
Then it gives a list of python version, you can then see which version is right for your XGboost version and then use the command-
conda install python=3.7.7
or whatever version you wanted to use.
After the downgrade of python, anaconda will ask you to downgrade other libraries as well, so go ahead and do that too unless you are using some command which was not there in the older version.
Now install py-xgboost from ANACONDA Graphical interface or by using conda method
conda install -c anaconda py-xgboost

How to utilise pymssql after Upgrading from Python 3.4 to 3.7? Unable to remove error

My Python application uses the pymssql module to connect and edit SQL data in forms. I upgraded to Python 3.7 and I receive the following error:
"DLL load failed: %1 is not a valid Win32 appication."
I have the 64bit win32 version of Python 3.7. I can't seem to resolve this. Does pymssql work with Python 3.7?
I uninstalled and reinstalled both Python and pymssql to ensure I have latest version.
The fix was to completely unisntall Python 3.7 and pip, then delete the Python folder, and reinstall. I used the advanced install settings which puts Python in C:\Program Files. The only difference now is I need admin permissions to pip install/update etc but that's ok.

TensorRT python package incompatibility with python 3.6

Installing TensorRT 4 from its tar file is the only available option if you installed CUDA using the run file. However, the tar file only includes python TensorRT wheel files for python 2.7 and 3.5. No python 3.6 wheel file provided.
I cannot force install the python 3.5 wheel file on my python 3.6 system:
$ pip install tensorrt-4.0.0.3-cp35-cp35m-linux_x86_64.whl
tensorrt-4.0.0.3-cp35-cp35m-linux_x86_64.whl is not a supported wheel on this platform.
Also, I cannot create a new python 3.5 virtualenv just to use TensorRT.
Is there a way to manually install this package on my python 3.6 platform by manually copying the files?
Yes, you can rename this file to tensorrt-4.0.0.3-cp36-cp36m-linux_x86_64.whl and try again.
It works.
Please use python version 3.5.5. I had same issue with python version 3.6. Latest version of tensorflow works with python 3.5. If you are using anaconda use conda shell to activate earlier python version. You can set environment to use earlier version of python.