Okay. So I have been trying a lot lately to install python modules. They won't install. Yes, I have set the path. And yes, I tried almost everything already on this website. I have Python 3.6.0 and Windows 10.
For instance, this is what it says when I ask the cmd to install numpy.
It basically says Atlas not supported, atlas not found. LAPACK not supported or found. And probably a thousand other things. Its really frustrating. If someone could help please.
Look this
And this
It seems that your are trying to install numpy or a numpy dependency from source. So the installer tries to compile from C source code. This is not an easy task under Windows, since you need to install the whole tool chain.
You need to install the wheel package that matches both your platform/OS but also your Python version.
According to the official PyPi, there is no binary distribution for Python 3.6 (except for Mac OS X).
The solution is to downgrade to Python 3.5.
Note: consider using a recent version of pip to install packages.
Related
I wonder if anyone could help me with one issue: I am using ubuntu 12.04 and I wanted to install f2py. However the version found here:
https://sysbio.ioc.ee/projects/f2py2e/index.html#installation
Gives me an error with python 2.7.6. This issue arises to many users due to word "as" becoming a keyword since python 2.6 (http://comments.gmane.org/gmane.comp.python.f2py.user/1802)
Hence which is the updated way to install f2py? Or using the one from numpy?
Thanks
Vital
The version you link to is very very old. The installation instructions refer to Python2.1!
You'll find a newer version by searching PyPi. But the homepage for that package states that, as of 2007-07-19,
F2PY is now part of NumPy. All the development and maintenance of F2PY is carried out under NumPy SVN tree.
So the easiest way to install f2py on ubuntu is
to install numpy:
sudo apt-get install python-numpy
Title basically states it all. I upgraded my version of Python in order to hopefully play more nicely with Mac OS 10.9, but am now unable to use some modules I need for my work (NumPy, Pandas, SciPy, Scikit-Learn, etc.) Does this upgrade automatically wipe out any previously installed modules? Do I just need to install them again? Thanks in advance.
When you upgraded, it created a new sitepackages directory structure. Your packages are not installed any more, so yes you need to reinstall them into the new version.
Before you do that, take a good look at virtual environments rather than install the modules and packages globally.
http://docs.python-guide.org/en/latest/dev/virtualenvs will get you started, then google virtualenvwrapper.
I would recommend you try out the anaconda python distribution. It comes with all of these packages pre-installed, and its free. Also, in addition to pip, you can use the conda package manager which is much better for scientific packages. See http://technicaldiscovery.blogspot.com/2013/12/why-i-promote-conda.html for an explanation.
With conda, you can install numpy/scipy/pandas/etc with conda install numpy scipy pandas and it just works, and takes about 10 seconds. No compilation necessary (OTOH pip install scipy can take over 15 minutes, requires a fortran compiler, and is generally very tricky).
link: http://continuum.io/downloads
I'm having trouble installing scipy via the binaries provided at http://sourceforge.net/projects/scipy/files/scipy/
Double clicking on the mpkg file after mounting the dmg installer gives the following error:
"scipy 0.13.0 can't be installed on this disk. scipy requires System Python 2.7 to install"
However, I already have python 2.7 and numpy installed. The python 2.7 came default with OSX Lion, so I assume it is System Python. With other python modules, one normally can download the binary then run
python setup.py install
Is there a way to cd through the mpkg file and locate a setup.py? Any advice install via this dmg installer?
I know there are other ways to manage python modules, like port and brew. However, I already installed a bunch of packages through setup.py, and I couldn't figure out how to get port to recognize those packages (for example, it will try to reinstall python and numpy via port)
Thanks!
If you have Mavericks and XCode 5, then you'll have to install Command Line Tools manually from the Apple Developer Site. I found this helpful post
You've got a few misconceptions here.
With other python modules, one normally can download the binary then run python setup.py install
No, that's what you do with source packages.
Is there a way to cd through the mpkg file and locate a setup.py?
No. What's inside an mpkg are pkg files. Which are filled with xar archives filled with cpio archives. Inside there is the built version of SciPy—that is, the files that setup.py would have copied to your site-packages if you'd run it—not the source package.
But you can download the source package yourself.
Or, better, let pip (or easy_install, but pip is better) download and run the setup.py for you.
Any advice install via this dmg installer?
If it won't work, my advice would be to not use it, and instead install with pip.
This blog post explains it, but I'll give you the details relevant to you below.
I know there are other ways to manage python modules, like port and brew. However, I already installed a bunch of packages through setup.py, and I couldn't figure out how to get port to recognize those packages.
You can't. MacPorts will not touch your system Python; it builds its own separate Python 2.7, with a completely independent site-packages directory and everything else. You would have to reinstall everything for this second Python 2.7. And deal with the confusion of having two Python 2.7 installations on the same machine.
Don't do that unless you absolutely have to.
In fact, if you want to use Homebrew for anything (and you do, see below), uninstall MacPorts, unless you really need it for something.
So, here are the steps:
Uninstall MacPorts.
I assume you already have Xcode and its Command Line Tools.
I assume you already have Homebrew.
Install a Fortran compiler with brew install gfortran.
Lion's Python 2.7 comes with easy_install, but not pip. So sudo easy_install pip to fix that. While you're at it, I'd suggest sudo easy_install readline, because you'll want that for ipython, and it won't work right with pip.
Apple's pre-installed NumPy has to be upgraded, and rebuilt with Fortran support, to make SciPy work. Fix that with sudo pip install --upgrade --force-reinstall numpy.
If you want ipython, pandas, etc. sudo pip install each of them as well.
In case you're considering upgrading soon, the exact same steps worked for me with OS X 10.9.0, except for some extra work to get the Xcode 5 command line tools set up.
I have Python 2.7 and NumPy installed. I have downloaded pre-built binaries for SciPy, but the install script fails with this error:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
I really don't know enough about this to fool with it. I assumed it was a straightforward install process, but doesn't appear to be. I googled for the BLAS environment variable, but couldn't find anything that seemed appropriate. Any help is appreciated.
Mike
EDIT: Nevermind, I found an unofficial installer exe.
Try installing using Scipy wheel file. Download it from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
Make sure to download the one that's compatible with your Python version and your laptop bit. Then install it like this: pip install "path\to\your\wheel\file\scipy-0.18.1-cp27-cp27m-win_amd64.whl"
To install SciPy on Windows you have to have a fortran compiler installed. The SciPy project recommends MinGW. See Building and installing SciPy. To install MinGW follow these instructions: HOWTO Install the MinGW (GCC) Compiler Suite. Then before you run pip or easy_install to install SciPy make sure that you have MinGW added to your path. See MinGW Installation Notes - Environmental Variables
A side note, It would be easier to use either the Enthought Distribution (part of the initial install) or the Active State Distribution (through pypm 32-bit only) as they already have precomiled binary packages for SciPy. Or, you could use the SciPy precompiled binary package installer for Windows.
Here I am going to share what I have done to install scipy.
MY PC Configuration is windows-7 64-bit & python 2.7
First I download the required packages form http://www.lfd.uci.edu/~gohlke/pythonlibs/ (which version match your configuration EX: cp27==>python2.7 & cp36==>3.6)
Second I extract the file using 7zip (also can be used any zipper like winrar)
Third I copy the scipy folder which I extracted and paste it into C:\Python27\Lib\site-packages (or put it where the exact location is in your PC like ..\..\Lib\site-packages)
NOTE: Have to install numpy first before installing scipy in this same way.
To install Scipy on Windows requires a C compiler and the presence of 3rd party C libraries on the system which are difficult to install on Windows. However you can use a Wheel (.whl) file through your command prompt to install Scipy.
I faced the same problem and this is what I did:
Go to https://pypi.python.org/pypi/scipy and download the version of Scipy which is compatible with your system and the Python version you have installed
e.g If you have 32-Bit Windows and Python 3.6 installed then you download the version with cp36 (version3.6) and Win-32.
After downloading copy this file in the directory where you have installed Python either in the Scripts or Lib folder.
Next use the command prompt to install it after changing to the directory where you have copied the file:
C:\....> pip install scipy-1.0.0b1-cp36-cp36m-win32.whl
Steps to download scipy on Windows-
1.Go to website sourceforge.net
2.Click Files
3.Downlaod the type you want
4.Install it.
Very easy and it worked for me.
This question already has answers here:
ImportError: no module named win32api
(15 answers)
Closed 3 years ago.
I am trying to install pywin32. I downloaded it from sourceforge.net. When I run
setup.py install
it shows "Unable to find vcvarsall.bat". I Googled about it and found that I have to install MinGW and set path then run
python setup.py build --compiler=mingw32
but it's showing
Can't find a version in Windows.h
Can anybody help? (I have a trial version of Visual Studio 2010 Ultimate installed and MinGW C and C++ compiler installed. Operating system: Windows 7.)
Can anybody tell me a source from where I can download Python binaries already compiled in MinGW, so I don't have to do all this. Or if I can get a python which already have Windows modules.
You can install pywin32 wheel packages from PYPI with PIP by pointing to this package: https://pypi.python.org/pypi/pypiwin32 No need to worry about first downloading the package, just use pip:
pip install pypiwin32
Currently I think this is "the easiest" way to get in working.
are you just trying to install it, or are you looking to build from source?
If you just need to install, the easiest way is to use the MSI installers provided here:
http://sourceforge.net/projects/pywin32/files/pywin32/
(for updated versions)
make sure you get the correct version (matches Python version, 32bit/64bit, etc)
I disagree with the accepted answer being "the easiest", particularly if you want to use virtualenv.
You can use the Unofficial Windows Binaries instead. Download the appropriate wheel from there, and install it with pip:
pip install pywin32-219-cp27-none-win32.whl
(Make sure you pick the one for the right version and bitness of Python).
You might be able to get the URL and install it via pip without downloading it first, but they're made it a bit harder to just grab the URL. Probably better to download it and host it somewhere yourself.
I had the exact same problem. The problem was that Anaconda had not registered Python in the windows registry.
1) pip install pywin
2) execute this script to register Python in the windows registry
3) download the appropriate package form Corey Goldberg's answer and python will be detected
Quoting the README at https://github.com/mhammond/pywin32:
By far the easiest way to use pywin32 is to grab binaries from the most recent release
Just download the installer for your version of Python from https://github.com/mhammond/pywin32/releases and run it, and you're done.