Initially I was getting this error (No Module name was found scipy) So I installed a Scipy wheel file. Now I don't get the same error any more but I get cannot import name "_ccallback_c"
.
The error seems to be triggered at the fourth line of code. I have done my research and saw that other people suggested to try an environment such as Anaconda. I have seen it work on idle, and that solution isn't ideal for me.
Traceback:
Traceback (most recent call last):
File "C:UsersjoeshDesktopPythonMachine Learning1st tutorial.py", line 4, in <module>
from sklearn import preprocessing, cross_validation, svm
File "C:UsersjoeshDesktopPythonlibsite-packagessklearn\__init__.py", line 134, in <module>
from .base import clone
File "C:UsersjoeshDesktopPythonlibsite-packagessklearnase.py", line 10, in <module>
from scipy import sparse
File "C:UsersjoeshDesktopPythonlibsite-packagesscipy\__init__.py", line 118, in <module>
from scipy._lib._ccallback import LowLevelCallable
File "C:UsersjoeshDesktopPythonlibsite-packagesscipy\_lib\_ccallback.py", line 1, in <module>
from . import _ccallback_c
ImportError: cannot import name '_ccallback_c'
And the code:
import pandas as pd
import quandl, math
import numpy as np
from sklearn import preprocessing, cross_validation, svm
from sklearn.linear_model import LinearRegression
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…