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 12, 2020 by MD 2,017 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!!

answered Aug 12, 2020 by Niroj
• 82,820 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,300 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 18, 2020 in Machine Learning by MD
• 95,300 points
2,352 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,300 points
4,773 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,210 points
8,631 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,300 points
8,103 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,300 points
1,184 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,300 points
1,324 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 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,357 views
0 votes
0 answers
+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,810 points
1,764 views