Python Forum

Full Version: How to resolve scipy differences?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In Pycharm, I am importing "import scipy.misc" and the code that calls scipy.misc.comb(...) works fine. The scipy version in Pycharm is 0.19.1.

Now, if I run that same code on the command line with scipy 1.3.1 (current version), I get this error:

AttributeError: module 'scipy.misc' has no attribute 'comb'

I'm confused about how to resolve this error since it works in PyCharm, but not at the command line with what appears to be the latest scipy version.

Thanks in advance,

-O
As you can see in the docs, importing comb from scipy.misc was depreciated in 1.0.0. You need to import it from scipy.special:
https://docs.scipy.org/doc/scipy-1.2.1/r.../misc.html

Quote:comb is deprecated! Importing comb from scipy.misc is deprecated in scipy 1.0.0.

It was an alias so if you import from scipy.special it should work in both versions. Of course the question why you use two different versions is warnted. It looks like you use one python interpreter in pycharm and other from command line. I would advise to sort out the different python interpreters/installations you have
Thanks. I also found the right library to use instead. :)

Appreciate your reply.