9
votes

I looked at a previous related post and the commenter said 'why don't you use the Windows installer?"

So I followed the link and downloaded https://pypi.python.org/packages/3.4/n/numpy/numpy-1.8.1-cp34-cp34m-macosx_10_6_intel.whl#md5=08043cc4eaa6267ac2f872924e11ae7c

But when I click it, Win7 says it doesn't know how to run it. What am I supposed to do with that file?

Previously I tried to install Numpy into Py 3.4.0, by running 'pip3 install numpy' from the \Python34\Scripts folder.

It gave 340 lines of errors. starting with:

Downloading/unpacking numpy
  Running setup.py (path:C:\Users\Windows\AppData\Local\Temp\pip_build_Windows\numpy\setup.py) egg_info for package numpy
    Running from numpy source directory.

    warning: no files found matching 'tools\py3tool.py'
    warning: no files found matching '*' under directory 'doc\f2py'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.pyo' found anywhere in distribution
    warning: no previously-included files matching '*.pyd' found anywhere in distribution
Installing collected packages: numpy
  Running setup.py install for numpy
    non-existing path in 'numpy\\distutils': 'site.cfg'
    F2PY Version 2
    blas_opt_info:
    blas_mkl_info:
      libraries mkl,vml,guide not found in ['C:\\Python34\\lib', 'C:\\', 'C:\\Python34\\libs']
      NOT AVAILABLE

    openblas_info:
      libraries  not found in ['C:\\Python34\\lib', 'C:\\', 'C:\\Python34\\libs']
      NOT AVAILABLE

    atlas_blas_threads_info:
    Setting PTATLAS=ATLAS
      libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python34\\lib', 'C:\\', 'C:\\Python34\\libs']
      NOT AVAILABLE

    atlas_blas_info:
      libraries f77blas,cblas,atlas not found in ['C:\\Python34\\lib', 'C:\\', 'C:\\Python34\\libs']
      NOT AVAILABLE

Why are all these files missing? Py 3.4.0 seems to run fine.

So I tried similarly to use pip3 to install scipy. That too bombed, to wit:

Downloading/unpacking scipy
  Running setup.py (path:C:\Users\Windows\AppData\Local\Temp\pip_build_Windows\scipy\setup.py) egg_info for package scipy

    warning: no previously-included files matching '*_subr_*.f' found under directory 'scipy\linalg\src\id_dist\src'
    no previously-included directories found matching 'scipy\special\tests\data\boost'
    no previously-included directories found matching 'scipy\special\tests\data\gsl'
    no previously-included directories found matching 'doc\build'
    no previously-included directories found matching 'doc\source\generated'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*~' found anywhere in distribution
    warning: no previously-included files matching '*.bak' found anywhere in distribution
    warning: no previously-included files matching '*.swp' found anywhere in distribution
    warning: no previously-included files matching '*.pyo' found anywhere in distribution
Installing collected packages: scipy
  Running setup.py install for scipy
    Traceback (most recent call last):
      File "", line 1, in 
      File "C:\Users\Windows\AppData\Local\Temp\pip_build_Windows\scipy\setup.py", line 237, in 
        setup_package()
      File "C:\Users\Windows\AppData\Local\Temp\pip_build_Windows\scipy\setup.py", line 225, in setup_package
        from numpy.distutils.core import setup
    ImportError: No module named 'numpy'
    Complete output from command C:\Python34\python.EXE -c "import setuptools, tokenize;__file__='C:\\Users\\Windows\\AppData\\Local\\Temp\\pip_build_Windows\\scipy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Windows\AppData\Local\Temp\pip-qqtgehrv-record\install-record.txt --single-version-externally-managed --compile:
    Traceback (most recent call last):

  File "", line 1, in 

  File "C:\Users\Windows\AppData\Local\Temp\pip_build_Windows\scipy\setup.py", line 237, in 

    setup_package()

  File "C:\Users\Windows\AppData\Local\Temp\pip_build_Windows\scipy\setup.py", line 225, in setup_package

    from numpy.distutils.core import setup

ImportError: No module named 'numpy'

----------------------------------------
Cleaning up...
Command C:\Python34\python.EXE -c "import setuptools, tokenize;__file__='C:\\Users\\Windows\\AppData\\Local\\Temp\\pip_build_Windows\\scipy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Windows\AppData\Local\Temp\pip-qqtgehrv-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in C:\Users\Windows\AppData\Local\Temp\pip_build_Windows\scipy
Storing debug log for failure in C:\Users\Windows\pip\pip.log
3
Why did you download a file that says macosx if you're on Windows? The one you want is the EXE installer for Python 3.4 here.BrenBarn
When I used the installer sourceforge.net/projects/numpy/files/NumPy/1.8.1/… it immediately abended saying it couldn't find Python 3.4 in the registry. However, I had just installed it from the python.org site, and it was running fine.user1067305
Ed Chum: Thank you - that unofficial site worked! Why did none of the official sites work?user1067305
I didn't use that mac osx site. I just copied the wrong filename when I posted. I used the windows superpack file.user1067305

3 Answers

6
votes

Not the solution but an easy workaround

Unfortunately standard packaging tools in Python 3 work terribly bad in Windows. Even if you have installed the compiler from MS Visual Studio 2010 you will probably meet propblems like yours in case package that being installed need to compile some native code. I was fighting similar issues until I met Anaconda Python distribution which makes these things extremely easy.

Anaconda supports distributions for all combinations of parameters:

  • Python version (2.7 or 3.*)
  • Platform — Windows, Mac, Linux
  • Processor architecture — 32 bit or 64 bit

It contains in itself the Python and about 200 packages (see list) including NumPy, SciPy, etc.

If you don't want to install all these packages, you can use Miniconda wich contains only Python and package manager. Once you have installed it you can add any package by issuing command like this:

conda install numpy
4
votes
  1. Download "numpy-1.9.2+mkl-cp34-none-win_amd64.whl" file from here

  2. Copy this file to C:\Python34\Scripts

  3. In cmd.exe, run command as pip install "numpy-1.9.2+mkl-cp34-none-win_amd64.whl"

These steps will be easier for you to install NumPy, SciPy, SciKit-Learn or any other packages in Python.

I tried to install SciKit-Learn for machine learning however in Canopy, I needed to subscribe. Therefore, I believe those steps listed above will be very helpful to install any other packages in python.

0
votes

If you use PyCharm:

File > Settings > Project:xyz > Project Interpreter > + > search for numpy > hit install.