install scipy on windows with easy_install

  • Last Update :
  • Techknowledgy :

I installed python 2.7 64bit on Windows 7. I later realized that my windows is 32 bit...

Python 2.7 .6(
   default, Nov 10 2013, 19: 24: 24)[MSC v .1500 64 bit(AMD64)] on win
32

Than i installed easy_install using ez_setup script. And this worked, as well

C: \Users\ Myname > easy_install
error: No urls, filenames, or requirements specified(see--help)

But then I am not able to install modules as Matplolib or Scipy!

C:\Users\Massimo\Dropbox\Python>easy_install scipy
Searching for scipy
Reading https://pypi.python.org/simple/scipy/
Best match: scipy 0.13.2
Downloading https://pypi.python.org/packages/source/s/scipy/scipy-0.13.2.zip#md5
=9befa30e546fba762a0c1695a509f731
Processing scipy-0.13.2.zip
Writing c:\users\massimo\appdata\local\temp\easy_install-v3knvt\scipy-0.13.2\set
up.cfg
Running scipy-0.13.2\setup.py -q bdist_egg --dist-dir c:\users\massimo\appdata\l
ocal\temp\easy_install-v3knvt\scipy-0.13.2\egg-dist-tmp-tatxbl
Traceback (most recent call last):
File "c:\python27\scripts\easy_install-script.py", line 9, in <module>
   load_entry_point('setuptools==0.8', 'console_scripts', 'easy_install')()
   File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 1992
   , in main
   File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 1979
   , in with_ei_usage
   File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 1996
   , in <lambda>
      File "c:\python27\lib\distutils\core.py", line 152, in setup
      dist.run_commands()
      File "c:\python27\lib\distutils\dist.py", line 953, in run_commands
      self.run_command(cmd)
      File "c:\python27\lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
      File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 380,
      in run
      File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 623,
      in easy_install
      File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 653,
      in install_item
      File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 849,
      in install_eggs
      File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 1130
      , in build_and_install
      File "build\bdist.win-amd64\egg\setuptools\command\easy_install.py", line 1115
      , in run_setup
      File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 69, in run_setup
      File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 120, in run
      File "build\bdist.win-amd64\egg\setuptools\sandbox.py", line 71, in <lambda>
         File "setup.py", line 230, in <module>
            File "setup.py", line 218, in setup_package
            ImportError: No module named numpy.distutils.core

Suggestion : 2

System package managers can install the most common Python packages. They install packages for the entire computer, often use older versions, and don’t have as many available versions.,WinPython: Another free distribution including scientific packages and the Spyder IDE; Windows only, but more actively maintained and supports the latest Python 3 versions.,For more advanced users who will need to install or upgrade regularly, Mambaforge is a more suitable way to install the conda (and mamba, a faster conda alternative) package manager.,Anaconda works on Windows, Mac, and Linux, provides over 1,500 Python packages, and is used by over 15 million people. Anaconda is best suited to beginning users; it provides a large collection of libraries all in one.

You can install SciPy from PyPI with pip:

python - m pip install scipy

You can install SciPy from the defaults or conda-forge channels with conda:

conda install scipy

Using apt-get:

sudo apt - get install python3 - scipy

macOS doesn’t have a preinstalled package manager, but you can install Homebrew and use it to install SciPy (and Python itself):

brew install scipy

Suggestion : 3

Last Updated : 09 Sep, 2021,GATE CS 2021 Syllabus

If you want the installation to be done through conda, you can use the below command:

conda install scipy
  • Use an environment for installation rather than in the base environment using the below command:
conda create - n my - env
conda activate my - env

Note: If your preferred method of installation is conda-forge, use the below command:

conda config--env--add channels conda - forge

Note: As you can see in the above image, there are a couple of dependencies that are not resolved. This can be resolved by upgrading the PIP using the below command for proper functioning of Scipy library:

python--upgrade pip
pip install--use - feature = 2020 - resolver

Suggestion : 4

NumPy can be installed with conda, with pip, with a package manager on macOS and Linux, or from source. For more detailed instructions, consult our Python and NumPy installation guide below.,The third difference is that conda is an integrated solution for managing packages, dependencies and environments, while with pip you may need another tool (there are many!) for dealing with environments or complex dependencies.,Intel MKL is not open source. For normal use this is not a problem, but if a user needs to redistribute an application built with NumPy, this could be an issue.,The first difference is that conda is cross-language and it can install Python, while pip is installed for a particular Python on your system and installs other packages to that same Python install only. This also means conda can install non-Python libraries and tools you may need (e.g. compilers, CUDA, HDF5), while pip can’t.

# Best practice, use an environment rather than install in the base env
conda create - n my - env
conda activate my - env
# If you want to install from conda - forge
conda config--env--add channels conda - forge
# The actual install command
conda install numpy
pip install numpy
1._
# Best practice, use an environment rather than install in the base env
conda create - n my - env
conda activate my - env
# If you want to install from conda - forge
conda config--env--add channels conda - forge
# The actual install command
conda install numpy
2._
pip install numpy

If your installation fails with the message below, see Troubleshooting ImportError.

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

   Importing the numpy c - extensions failed.This error can happen
for
different reasons, often due to issues with your setup.

Suggestion : 5

To build scikit-learn on Windows you need a working C/C++ compiler in addition to numpy, scipy and setuptools.,Canopy and Anaconda both ship a recent version of scikit-learn, in addition to a large set of scientific python library for Windows, Mac OSX and Linux.,If there are no binary packages matching your Python version you might to try to install scikit-learn and its dependencies from Christoph Gohlke Unofficial Windows installers or from a Python distribution instead.,Picking the right compiler depends on the version of Python (2 or 3) and the architecture of the Python interpreter, 32-bit or 64-bit. You can check the Python version by running the following in cmd or powershell console:

pip install - U scikit - learn
pip install - U numpy scipy scikit - learn
sudo apt - get install build - essential python - dev python - setuptools\
python - numpy python - scipy\
libatlas - dev libatlas3gf - base
sudo apt - get install build - essential python3 - dev python3 - setuptools\
python3 - numpy python3 - scipy\
libatlas - dev libatlas3gf - base
sudo update - alternatives--set libblas.so .3\ /
   usr / lib / atlas - base / atlas / libblas.so .3
sudo update - alternatives--set liblapack.so .3\ /
   usr / lib / atlas - base / atlas / liblapack.so .3
sudo apt - get install python - matplotlib

Suggestion : 6

First, make sure pip has been installed on your OS. If it is not installed, please refer article How To Install Python/Pip On Windows. ~$ pip --version pip 18.1 from /home/zhaosong/anaconda3/lib/python3.7/site-packages/pip (python 3.7) ,Anaconda is a python edition that is used in scientific areas, so if you install Anaconda, all the above packages will be installed automatically. So please read the article How To Install Anaconda On Linux, Windows, macOS Correctly to install anaconda first.,Now you can install the latest version of Numpy with the command sudo easy_install numpy or sudo pip install numpy.,When I run the command sudo easy_install pandas to install the python pandas package again, the error message still exists.

conda
~$ conda list pandas
# packages in environment at / home / zhaosong / anaconda3:
   #
# Name Version Build Channel
pandas 0.23 .4 py37h04863e7_0
~$ pip--version
pip 18.1 from / home / zhaosong / anaconda3 / lib / python3 .7 / site - packages / pip(python 3.7)
pip install
pip install numpy

pip install pandas

pip install scipy

pip install matplotlib
pip uninstall
pip uninstall numpy

pip uninstall pandas

pip uninstall scipy

pip uninstall matplotlib
pip show
~$ pip show pandas
Name: pandas
Version: 0.23 .4
Summary: Powerful data structures
for data analysis, time series, and statistics
Home - page: http: //pandas.pydata.org
   Author: None
Author - email: None
License: BSD
Location: /home/zhaosong / anaconda3 / lib / python3 .7 / site - packages
Requires: python - dateutil, pytz, numpy
Required - by: seaborn, odo
scipy.org
python - m pip install--user numpy scipy matplotlib ipython jupyter pandas sympy nose

Suggestion : 7

The recommended way to install setuptools on Windows is to download ez_setup.py and run it. The script will download the appropriate .egg file and install it for you.,Download ez_setup.py and run it using the target Python version. The script will download the appropriate version and install it for you:,The ez_setup script/module now displays a warning before downloading the setuptools egg, and attempts to check the downloaded egg against an internal MD5 checksum table.,Running setup.py develop on a setuptools-using project will now install setuptools if needed, instead of only downloading the egg.

Download ez_setup.py and run it using the target Python version. The script will download the appropriate version and install it for you:

> wget https: //bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python

Note that you will may need to invoke the command with superuser privileges to install to the system Python:

> wget https: //bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python

Alternatively, on Python 2.6 and later, Setuptools may be installed to a user-local path:

> wget https: //bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
   >
   python ez_setup.py--user

For more advanced installation options, such as installing to custom locations or prefixes, download and extract the source tarball from Setuptools on PyPI and run setup.py with any supported distutils and Setuptools options. For example:

setuptools - x.x$ python setup.py--prefix = /opt/setuptools

Issue #105 and Issue #113: Establish a more robust technique for determining the terminal encoding:

1. Try ``
getpreferredencoding``
2. If that returns US_ASCII or None,
try the encoding from
   ``
getdefaultlocale``.If that encoding was a "fallback"
because Python
could not figure it out from the environment or OS, encoding remains
unresolved.
3. If the encoding is resolved, then make sure Python actually implements
the encoding.
4. On the event of an error or unknown codec, revert to fallbacks(UTF - 8 on Darwin, ASCII on everything
   else).
5. On the encoding is 'mac-roman'
on Darwin, use UTF - 8 as 'mac-roman'
was
a bug on older Python releases.

On a side note, it would seem that the encoding only matters
for when SVN
does not yet support ``--xml``
and when getting repository and svn version
numbers.The ``--xml``
technique should yield UTF - 8 according to some
messages on the SVN mailing lists.So
if the version numbers are always
7 - bit ASCII clean, it may be best to only support the file parsing methods
for legacy SVN releases and support
for SVN without the subprocess command
would simple go away as support
for the older SVNs does.

Distribute #334: Provide workaround for packages that reference sys.__stdout__ such as numpy does. This change should address virtualenv `#359 <https://github.com/pypa/virtualenv/issues/359>`_ as long as the system encoding is UTF-8 or the IO encoding is specified in the environment, i.e.:

PYTHONIOENCODING = utf8 pip install numpy

Added support for “self-installation” bootstrapping. Packages can now include ez_setup.py in their source distribution, and add the following to their setup.py, in order to automatically bootstrap installation of setuptools as part of their setup process:

from ez_setup
import use_setuptools
use_setuptools()

from setuptools
import setup
# etc...