2
I am starting with Debian 8 and I am trying to run a code in Python, however, the error always appears:
No module named request.
I have checked several ways to try to fix, using Pip install ...
The requests package is installed
But the error remains... That’s the code:
*from scipy.interpolate import interp1d
import requests
from urllib2.request import urlopen
import matplotlib.pyplot as plt
import numpy as np
url = 'http://real-chart.finance.yahoo.com/table.csv?s=PETR4.SA&d=9&e=17&f=2015&g=d&a=0&b=3&c=2000&ignore=.csv'
petr_csv = urlopen(url)
data_petr = np.genfromtxt(petr_csv, delimiter=',', dtype=None)
# Dando uma olhada no cabecalho dos dados.
data_petr[0:4, 0:]*