Scipy Installation

This is the place for queries that don't fit in any of the other categories.

Scipy Installation

Postby aureta » Sun Sep 25, 2016 6:34 pm

Hi, I would appreciate help in installing Scipy, I hace this code I want to run, so far unsuccesfuly:

import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as sc
TEST_DATA = np.array([[1,2,3,2,1,2,3,4,2,3,2,1,2,3,4,4,3,2,3,2,3,2,1],
[5,6,5,4,5,6,7,7,6,7,7,2,8,7,6,5,5,6,7,7,7,6,5],
[9,8,7,8,8,7,4,6,6,5,4,3,2,2,2,3,3,4,5,5,5,6,1],
[3,2,3,2,2,2,2,3,3,3,3,4,4,4,4,5,6,6,7,8,9,8,5],
])
# find mean for each of our observations
y = np.mean(TEST_DATA, axis=1, dtype=np.float64)
# and the 95% confidence interval
ci95 = np.abs(y - 1.96 * sc.sem(TEST_DATA, axis=1))
# each set is one try
tries = np.arange(0, len(y), 1.0)
# tweak grid and setup labels, limits
plt.grid(True, alpha=0.5)
plt.gca().set_xlabel('Observation #')
plt.gca().set_ylabel('Mean (+- 95% CI)')
plt.title("Observations with corresponding 95% CI as error bar.")
plt.bar(tries, y, align='center', alpha=0.2)
plt.errorbar(tries, y, yerr=ci95, fmt=None)
plt.show()


I have Windows 10 PC.
I already tried downloading, extracting and copying numpy+mkl folders together with scipy folder, pip install scipy, downloading and copying scipy master folder from GitHub... so far I didn't manage to get it working...I would appreciate your help, thanks, Alejandro.
aureta
 
Posts: 12
Joined: Wed Jun 03, 2015 4:22 pm

Re: Scipy Installation

Postby Larz60+ » Mon Sep 26, 2016 1:09 am

Hello,

Here's the simplest way to do it.

    1. go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
    2. find the wheel for your version of python and for 32 or 64 bit:
    -----------------------------------------------------------
    typical wheel: scipy-0.18.1-cp27-cp27m-win32.whl
    the cp27 means for python 2.7
    the win32 means for windows 32 bit.
    -----------------------------------------------------------
    3. download to your install (not target) directory.
    4. cd to install directory in a command window
    5. type 'pip install xxxx' where xxxx is the wheel name.

Larz60+
Larz60+
 
Posts: 1307
Joined: Thu Apr 03, 2014 4:06 pm


Return to General Coding Help

Who is online

Users browsing this forum: Bing [Bot] and 5 guests