I'm on OS X 10.7.5
I am trying to get matplotlib to work on my machine, so I did pip uninstall matplotlib and then tried pip install matplotlib, but it said my NumPy version was out of date -- 1.5, and I needed 1.6.
OK, so I did port install py27-numpy and that seemed to work. But I was still getting the same complaint when I tried to install matplotlib.
Now here's the strange thing. When I do:
import numpy
numpy.version.version
I get 1.5.1. But when I do
import pip
pip.get_installed_distributions()
I see numpy 1.8.0 and matplotlib 1.3.1. Why is my NumPy 1.5.1 in some places, and 1.8.0 in others, and how can I reconcile the two to 1.8.0 so I can install matplotlib correctly?
Related
I am currentling trying to use a package I installed (stsynphot), but I have the following error when typing import stsynphot as stsyn
ImportError: Numpy version 1.9.0 or later must be installed to use Astropy
I was curious so just to try, I tried import astropy and of course had the same error.
Nevertheless, I do have numpy 1.14 installed, I have tried all the upgrade and reinstall procedures but I still have the issue.
Any ideas ?
Thanks !
Try this:
pip install --user astropy[all]
and for the stsynphot package follow these steps: https://stsynphot.readthedocs.io/en/latest/
I tried installing geopandas in python 3.6 with no error but when I import the module in python I got this error.
could not find or load spatialindex_c.dll
The same thing happens to RTree, displaying also the same error, but has installed correctly using the following commands:
For geopandas:
pip install geopandas-0.4.0-py2.py3-none-any.whl
For RTree:
pip install Rtree-0.8.3-cp36-cp36m-win_amd64.whl
What could be the problems with these?
The following libraries have already been installed and are working: gdal, fiona, scipy, missingno, shapely, pysal, numpy, pandas and matplotlib.
I got the developmental version using this in cmd prompt (after uninstalling the old package):
pip install git+git://github.com/mwaskom/seaborn.git#egg=seaborn
Now when I try to import in canopy it still says I am using the old version.
import seaborn as sns
help(sns)
And at the end of the output I get:
VERSION
0.5.1
How do I need to set this up?
Trying to update NumPY by running pip install -U numpy, which yields "Requirement already up-to-date: numpy in /Library/Python/2.7/site-packages". Then checking the version with import numpy and numpy.version.version yields '1.6.2' (old version). Python is importing numpy via the path '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy'. Please help me out here.
You can remove the old version of numpy from
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy
.
Just delete the numpy package from there and then try to import numpy from the python shell.
The new NumPY version would install (via pip) into the System path, where it wasn't being recognized by Python. To solve this I ran pip install --user numpy==1.7.1 to specify I want NumPY version 1.7.1 on my Python (user) path.
:)
I've installed numpy 1.6.1, and now I'm attempting to install matplotlib on OSX 10.6.
I make the following call to install matplotlib:
make -f make.osx PREFIX=/../deps fetch deps mpl_install_std
And it fails with the error
* numpy 1.4 or later is required; you have 1.2.1
I checked my numpy version and it returns 1.6.1
What gives?
Maybe it's picking up another version of python than you get from the command line. Try something like
make -f make.osx PREFIX=... PYTHON=`which python` ...
to ensure it uses the same python.