Install Python 3.6 with Numpy + MKL, SciPy , Matplotlib and Pandas on Windows

1) Download Python 3.6 from https://www.python.org/


2) Install Python 3.6
  • Run the .exe ( python-3.6.2.exe or python-3.6.2-amd64.exe) file.
  • Click on Add python 3.6 to PATH. This sets the path in the environment variables. You can cross check this by opening the Environment Variables tab in the Advanced System Settings after the installation is complete.
  • The default installation chooses a very complicated path. Inorder to avoid this, choose Custom Installation and specify a simpler path for installation. Click on Install.
3) Install Numpy + MKL, SciPy , Matplotlib and Pandas
  • Open the Python36/Scripts folder, you will see that there are .exe files for pip, pip3 etc.
  • Open Command Prompt and navigate till the Python36/Scripts folder.
  • You can directly install these packages by running command 
    • pip install numpy
    • pip install scipy
    • pip install matplotlib 
    • pip install pandas 
These commands collect the wheel files for the package and all its dependencies and install it. But sometimes it gives errors (especially for scipy), since we are not able to compile these packages on our system.
  • Inorder to avoid these errors we can download the precompiled files for these packages from Christoph Gohlke's site.  
  • We need to install the Visual C++ 2015 (x64 or x86 for Python 3.6) redistributable packages.
  • Then download the correct versions of the whl files from Christoph Gohlke's site, that you require and place them in the Scripts folder.
  • Now run these files using pip install and the file name. Using tab after pip install will fetch the correct names for the packages. Use the packages name as it is and install.
  • For uninstalling a package simply run pip uninstall packagename eg. pip uninstall scipy

Comments

Post a Comment