How to fix Python Numpy/Pandas installation?

前端 未结 9 498
说谎
说谎 2020-12-24 06:13

I would like to install Python Pandas library (0.8.1) on Mac OS X 10.6.8. This library needs Numpy>=1.6.

I tried this

$ sudo easy_install pandas
Sear         


        
相关标签:
9条回答
  • 2020-12-24 06:49

    If you're like me and you don't like the idea of deleting things that were part of the standard system installation (which others have suggested) then you might like the solution I ended up using:

    1. Get Homebrew - it's a one-line shell script to install!
    2. Edit your .profile, or whatever is appropriate, and put /usr/local/bin at the start of your PATH so that Homebrew binaries are found before system binaries
    3. brew install python - this installs a newer version of python in /usr/local
    4. pip install pandas

    This worked for me in OS X 10.8.2, and I can't see any reason it shouldn't work in 10.6.8.

    0 讨论(0)
  • 2020-12-24 06:56

    he easiest way to install Pandas, like almost every other package for Python, is with pip.

    Many packages (including Pandas) require a compiler, and a bunch of third-party DLLs, and many Windows users don't know how to deal with that. That's exactly why the "wheel" format was created: so packages can upload pre-built binaries.

    Not every project has pre-built binary wheels for Windows yet. But you can look at Christoph Gohlke's site and find wheels for all of the most popular ones. Just follow the instructions on that page to download the wheel file and install it with pip.

    But in the case of Pandas, you don't have to do that. They have wheels on their download page, and uploaded to PyPI. And the documentation tells you to use these. (Well, it first suggests you use Anaconda/Miniconda, but if you want a stock Python, use pip and the packages on PyPI.) it worked for me ...on windows 7 64 bit ,python 3.4

    0 讨论(0)
  • 2020-12-24 06:57

    You probably have another Numpy version installed on your system, try to query your numpy version and retrieve it if your distribution does not support it.
    aka debian/unbuntu/Mint version can query mostly from dpkg package manger : dpkg --get-selections | egrep -i "numpy", you can see actual Numpy version.

    • Some having apt can either asking to removing it by doing this: apt-get remove numpy.

    • Some having distribution like Fedora, RedHat and any compatible release under RedHat model can use rpm as well to query the installation.

    • This is happening by telling to Numpy installer to install itself in current /usr/local/lib/python[VERSION]/dist-packages over Linux env and c:[...]\python[VERSION]\site-packages for windows. Having probably One version of Numpy installed in /usr/local/python[VERSION]/dist-packages, this one will be instantiated first.

    • .pth file hold information about path location of specific python module, but erasing a component from packages may corrupt it...

    Be careful, and you will have to remove the package and all it's dependency... really painful in some case.

    Visiting lunchad.net may save you time sometimes they had new versions from some packages.

    0 讨论(0)
提交回复
热议问题