Unable to install basemap package in python 3.6 - python

I'm a newbie and so have problems installing the basemap package. I have Python 3.6.0(32 bit, windows)
I want to install basemap package.(Numpy and Matplotlib have already been installed). Versions available on internet are 3.3 compatible. Things I've tried:
Installing it with pip. Didn't work.
Found another package http://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap compatible. When tried to install, it gave egg info code 1 error.
Created virtual env and tried installing it. Gives error
Where am I going wrong?

the egg error is because GEOS is missing
try direct to install a wheel package:
get it from:
https://www.lfd.uci.edu/~gohlke/pythonlibs/
then install with (case python 3.7 win64):
py -m pip install "C:\maxbook\maxboxpython\basemap-1.2.0-cp37-cp37m-win_amd64.whl"

Related

Pip Errors Out When Installing Anything

I've run into an odd issue where pip just won't work. I'm using the latest version of PyCharm, and I've tried both Python 3.8.10 and 3.9.6.
I've done clean installations of both, removed from PATH, reinstalled with new installer, reinstalled pip, etc.
The error code I run into appears no matter what library I am trying to download. I've tried PyAudio, PyGame, OpenCV-Python and others.
Pip was working fine a couple days ago, and no changes have been made to any files in that time.
Attempting to run pip install --upgrade pip does not have an effect.
I've been running off virtual enviroments with setuptools 40.8.0 and pip 21.1.3 installed.
The full error for installing PyAudio can be seen here: https://pastebin.com/iQmZwsRv
PyGame error: https://pastebin.com/WEF8uM2d
OpenCV-Python Error: https://pastebin.com/LuZq99Cu
Py- audio - it's not compatible with your Py charm I suppose due to the latest install updates, try to install it on the main environment. Also, try to downgrade your version of python as many dependencies are not compatible with your version of python as stated by error[it is not compatible with this Python]
Open Cv - Fails to build the wheel package as it is attributed also in error [CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.]
May I know what build tool are you using?

How do I install python third party libs on the m1 chip?

The Mac Book Air M1 chip doesn't seem to support pep517 according to the errors of installing third-party libraries with pip or brew. Even using these methods without pep517 downloading the library locally didn't work. How does one circumvent this?
Error from using pip install pandas:
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
I've tried this:
pip install <lib>
installing the library locally and trying to install with pip without pep517
brew install <lib>
openblas installation of lib
python env on the intel venv
I had the exact same problem, with a different library but with the same error code for PEP 517, I was using python 3.9 at the time, I checked the docs and found out that it's a problem with the python version for the library, downgraded to Python 3.6 and voila! it worked.
Basically try downgrading to Python 3.6 and check.
Installing python libraries through Anaconda seems to work. I simply downloaded the installer and could later use the libraries globally. If someone has a better in-depth explanation, feel free to comment.
I was having the same message when trying to install a different package. I solved by removing the CommandLineTools and installing it again. The steps were:
sudo rm -r /Library/Developer/CommandLineTools
wait for command prompt...
xcode-select --install
This solved the issue for me.

matplotlib 1.5.x installation problems in python3.5 linux (CentOS7)

I am trying to install Matplotlib 1.5.0 /1.5.1 version in my CentOS7 -- Python3.5 active machine.
I have resolved all the dependencies stated in the INSTALL file and also have updated setuptools to latest one.
However, to my bad luck I am not able to resolve this one particular issue shown in the image. issue in installing matplotlib in python3.5
I have tried following ways of install
pip3 install matplotlib==1.5.1
easy_install-3.5 -m matplotlib
Both results in same above issue. I am clueless on what is the problem. Anyone solved this issue?
You can try installing it via
rpm -Uvh
Find the rpm package here matplotlib.rpm

Installing VTK 5 for mayavi with Homebrew

I am trying to install Mayavi fro Python on Mac OS X Mavericks using Homebrew and pip. I am stuck because of an unclear error related to VTK: I have installed VTK 5 with Homebrew using
brew reinstall --python --qt vtk5
and tried to install Mayavi with
pip install mayavi
but I just get en error output which ends with
ImportError: No module named vtkCommonCorePython
I thought about an issue with my PYTHONPATH variable, but I cannot find where vtkCommonCorePython is located. My PYTHONPATH is
/Users/ft14968/Scripts:/usr/local/lib/python2.7/site-packages:usr/local/opt/vtk5/lib/python2.7/site-packages
Is there a way to circumvent this issue, or to install a working python VTK binding with Homebrew?
brew reinstall --python --qt vtk5
Check brew info for exactly what formula options are available. For vtk5, the options you're looking for are --with-python --with-qt. Anything unrecognized is ignored.

Installing numpy for Python 2.7 while also having Python 3.4 installed?

I have both Python 2.7 and Python 3.4 (and have to have both because for the class I'm running, students have the option of using either). One student has used Python 2.7 and numpy for their project, but when I attempt to install numpy, it installs it to 3.4. I need to install it to 2.7.
I'm using numpy 1.9 from this site, which I'm told is also 2.7-specific: http://sourceforge.net/projects/numpy/files/NumPy/
However, nonetheless it still goes to the 3.4 folder. Copying it to Python 2.7 didn't work, obviously.
How do I do this?
I recommend installing with pip.
pip install numpy
If this doesn't work on windows then download the binary from http://www.lfd.uci.edu/~gohlke/pythonlibs/ and convert it to a wheel before installing.
pip install wheel
wheel convert path/to/binary
pip install numpy_wheel
Pip is recommended because you can uninstall.
To check where you are installing to
pip -V
You may have an environmental variable path to the wrong pip.
Assuming that you are using, or at least you should use pip to install the library. You can specify the python version to be installed by changing the suffix, e.g. pip-2.7 install numpy.
pip install numpy
pip-2.7 install numpy
pip-3.4 install numpy
As an alternative, in case that you do not want to use pip is to download and install the library using setup with a similar technique.
python setup.py install
python2.7 setup.py install
python3.4 setup.py install
Your PATH isn't setup correctly.
C:> where pip
Should tell you which pip it is trying to use, and it is likely whichever one it found on your PATH first...
So, instead, you will want to run it as
C:> C:\mypython2install\pip.exe install numpy
Or, setup your path correctly. See here
Just one other note on issues like this. I had a similar problem with Python 2.7 libraries not being found, because I had miniconda installed for a Python virtual environment that was hijacking calls to python from other programs. After deleting the minconda directory in my home the problem went away and python libraries that were properly installed were found again.
Note-This answer is particularly for Windows PC which has both Python2 & Pyhton3 installed on it.
Both the versions of Python has their different directories somewhat like
"C:\Python27\" ----for python2
"C:\Python35\" ---- for python3
*(or it depends on what path you chose while installing Python**)*
pip GENERALLY exist under the directory "C:\Python**\Scripts"
there you can find exe files like:
pip.exe/pip2.exe/pip2.7.exe ----for python2
pip3.exe/pip3.5.exe ----for python3
to install packages on python2:
use
Python27\Scripts\pip2.exe install package_name
(where the 1st argument is the path of exe file, it might differ for your system)
to install packages on python3:
use
Python35\Scripts\pip3.exe install package_name
there is no need to uninstall any version of python to achieve the task.

Categories

Resources