AttributeError module scipy has no attribute version

0 votes

Hi,

I am trying to run the below code, but I am getting the below error.

import scipy
print('scipy: {}'.format(scipy._version_))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'scipy' has no attribute '_version_'   
Aug 12, 2020 in Machine Learning by sanjana
• 120 points

edited Aug 13, 2020 by MD 7,369 views

2 answers to this question.

0 votes

Hello @sanjana ,

Try to install it  python package using pip:

$ sudo python2 get-pip.py   # for python 2.7
$ sudo python3 get-pip.py   # for python 3.x

 Then install scipy using pip:

$ pip2 install scipy    # for python 2.7
$ pip3 install scipy    # for python 3.x

Hope it helps!!
Thank You!!

Ready to dive into the world of machine learning? Supercharge your career and join our comprehensive Machine Learning Course today!

answered Aug 12, 2020 by Niroj
• 82,880 points
0 votes

Hi@Sanjana,

Actually you are missing one underscore in your command. It should be __version__ instead of _version_. Try to correct your command as shown below.

import scipy
print('scipy: {}'.format(scipy.__version__))
answered Aug 12, 2020 by MD
• 95,440 points

Related Questions In Machine Learning

0 votes
1 answer

AttributeError: module 'tensorflow.compat' has no attribute 'v1'

Hi@Usman, It seems you are using an older ...READ MORE

answered Jul 19, 2020 in Machine Learning by MD
• 95,440 points
3,585 views
0 votes
1 answer

AttributeError: module 'matplotlib' has no attribute 'scatter'

Hi@akhtar, To avoid this error, make sure you ...READ MORE

answered Apr 16, 2020 in Machine Learning by MD
• 95,440 points
10,413 views
0 votes
1 answer

AttributeError: module 'cv2.cv2' has no attribute 'face_LBPHFaceRecognizer'

Hi@MD, LBPHFaceRecognizer module comes from a package named ...READ MORE

answered Apr 20, 2020 in Machine Learning by akhtar
• 38,230 points
15,754 views
0 votes
1 answer

AttributeError: module 'tensorflow' has no attribute 'constant'

Hi@akhtar, There may be problem in the versions. ...READ MORE

answered Apr 21, 2020 in Machine Learning by MD
• 95,440 points
11,200 views
0 votes
1 answer

AttributeError: module 'tensorflow' has no attribute 'enable_eager_execution'

Hi@akhtar, Tensorflow 2.0 has eager_execution enabled by default and ...READ MORE

answered Apr 21, 2020 in Machine Learning by MD
• 95,440 points
2,818 views
0 votes
1 answer

AttributeError: module 'tensorflow' has no attribute 'estimator'.

Hi@akhtar, There was an environment issue, tensorflow was ...READ MORE

answered Apr 23, 2020 in Machine Learning by MD
• 95,440 points
3,820 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,180 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
3,650 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP