Getting Anaconda to find hyperspy

80 views
Skip to first unread message

Sam Rosenthal

unread,
Feb 10, 2016, 1:02:46 PM2/10/16
to hyperspy-users
Hello,

I know these types of questions are dumb.  I know I'm dumb.  I get all that, but this dummy needs help and I did do a ton of searching before bothering everyone on this list.  So I hope, even if the answer is obvious, that someone can lead me through the steps I need to follow.  I've already uninstalled all of my python related apps, libraries, and files (I was a Canopy user before) and then reinstalled Anaconda 3 and hyperspy to no success.

I need hyperspy for EDX analysis.  The website recommended Anaconda, so I downloaded the 64-bit version for Windows and ran the install.  I have Windows 10.  I also have a few other versions of python, but I made Anaconda my default.  After I downloaded and installed Anaconda, I then downloaded hyperspy with the same criteria.  However, when I run Spyder and try to import hyperspy using 'import hyperspy.api as hs', it says 'ImportError: No module named 'hyperspy''. 

As I've said, I've tried to follow the various guides and took some shots and resolving things using conda and various pip commands but to no avail including the pip command that anaconda.org supplied me.  Can anyone tell me what to do?  I would be extremely grateful!
Thanks,
Sam

Francisco de la Pena

unread,
Feb 10, 2016, 1:24:08 PM2/10/16
to hypersp...@googlegroups.com
Could you try installing HyperSpy from the terminal as follows?

pip install hyperspy

You could do it from Spyder's IPython too:

!pip install hyperspy

If the installation is sucessful, then you should be able to import
hyperspy from Spyder's IPython.

Could you let us know if this fixes the issue?

Thanks!

Francisco
> -- 
> You received this message because you are subscribed to the Google
> Groups "hyperspy-users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to hyperspy-user...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Sam

unread,
Feb 10, 2016, 1:30:27 PM2/10/16
to hypersp...@googlegroups.com
Hi,

Thanks for the quick response!  I tried both commands in their appropriate places and was unsuccessful.  I got the following output (This is from IPython):

!pip install hyperspy
Collecting hyperspy
  Using cached hyperspy-0.8.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Sam\AppData\Local\Temp\pip-build-wr5w6g5r\hyperspy\setup.py", line 118
        print "version = \"%s\"" % self.version
                               ^
    SyntaxError: Missing parentheses in call to 'print'
   
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Sam\AppData\Local\Temp\pip-build-wr5w6g5r\hyperspy


Thanks,
Sam

You received this message because you are subscribed to a topic in the Google Groups "hyperspy-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hyperspy-users/72WiZxe2oGI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hyperspy-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Sam Rosenthal
(443) 929-8715
"PS this is how part of the alphabet would look if Q and R were eliminated"

Francisco de la Pena

unread,
Feb 10, 2016, 1:33:46 PM2/10/16
to hypersp...@googlegroups.com
Mmm, did you download the Python 3 version of Anaconda by any chance?
The current stable version of HyperSpy does not support Python 3.
However, the next minor release due in some few days will add Python 3
compatibility.

Francisco

On Wed, 2016-02-10 at 13:30 -0500, Sam wrote:
> Hi,
>
> Thanks for the quick response!  I tried both commands in their
> appropriate places and was unsuccessful.  I got the following output
> (This is from IPython):
>
> !pip install hyperspy
> Collecting hyperspy
>   Using cached hyperspy-0.8.2.tar.gz
>     Complete output from command python setup.py egg_info:
>     Traceback (most recent call last):
>       File "<string>", line 1, in <module>
>       File "C:\Users\Sam\AppData\Local\Temp\pip-build-
> wr5w6g5r\hyperspy\setup.py", line 118
>         print "version = \"%s\"" % self.version
>                                ^
>     SyntaxError: Missing parentheses in call to 'print'
>     
>     ----------------------------------------
> Command "python setup.py egg_info" failed with error code 1 in
> C:\Users\Sam\AppData\Local\Temp\pip-build-wr5w6g5r\hyperspy
>
>
> Thanks,
> Sam
>
> On Wed, Feb 10, 2016 at 1:24 PM, Francisco de la Pena <frandelapena@g

Josh Taillon

unread,
Feb 10, 2016, 1:34:06 PM2/10/16
to hypersp...@googlegroups.com
Hi Sam,

This looks like you might be using Python 3.X. I don't believe support for 3.X has been released yet. Can you try with a 2.X interpreter?

- Josh
Joshua Taillon
Materials Science and Engineering
University of Maryland, College Park

Sam

unread,
Feb 10, 2016, 1:48:08 PM2/10/16
to hypersp...@googlegroups.com
Hi Francisco and Josh,

Thanks so much!  This works!  I knew it would be something stupid I was overlooking.  Thank you! Thank you!
Sam

Francisco de la Pena

unread,
Feb 10, 2016, 1:58:34 PM2/10/16
to hypersp...@googlegroups.com
I don't wont to dissapoint you, but chances are that it is not working
for you yet if anaconda already ships with IPython 4, see https://githu
b.com/hyperspy/hyperspy/issues/713 . Again this is something that will
be fixed in the upcoming release.

In the meantime you could downgrade IPython to v3.

Francisco



On Wed, 2016-02-10 at 13:48 -0500, Sam wrote:
> Hi Francisco and Josh,
>
> Thanks so much!  This works!  I knew it would be something stupid I
> was overlooking.  Thank you! Thank you!
> Sam
>
> On Wed, Feb 10, 2016 at 1:33 PM, Francisco de la Pena <frandelapena@g

Sam

unread,
Feb 11, 2016, 4:32:22 PM2/11/16
to hypersp...@googlegroups.com
Hi,

Yep, tried to run my program and was unsuccessful.  Yet another newb question then: how do I downgrade to IPython v3 and get Anaconda to recognize that this is the version that I want to use?  Given some of the interesting things IPython v4 has, how do I then switch back?  I guess, simply put for a simple man, what are the steps I would need to take so that I would be able to run Hyperspy in the Anaconda environment?

Thanks,
Sam

Francisco de la Pena

unread,
Feb 12, 2016, 4:56:13 AM2/12/16
to hypersp...@googlegroups.com
Given that we are going to release 0.8.3 in the next few days, I think
that it'll be best for you to just wait for it. If you can't wait, you
can install HyperSpy's development version and, in this way, you'll
help us test it before the release. The branch that adds compatibility
with IPython 4 is yet to be merged. I'll send installation instructions
once this branch is merged, possibly later in the day.

Francisco



On Thu, 2016-02-11 at 16:32 -0500, Sam wrote:
> Hi,
>
> Yep, tried to run my program and was unsuccessful.  Yet another newb
> question then: how do I downgrade to IPython v3 and get Anaconda to
> recognize that this is the version that I want to use?  Given some of
> the interesting things IPython v4 has, how do I then switch back?  I
> guess, simply put for a simple man, what are the steps I would need
> to take so that I would be able to run Hyperspy in the Anaconda
> environment?
>
> Thanks,
> Sam
>
> On Wed, Feb 10, 2016 at 1:58 PM, Francisco de la Pena <frandelapena@g
> > > > > > > send an email to hyperspy-users+unsubscribe@googlegroups.
> > com.

Francisco de la Peña

unread,
Feb 13, 2016, 2:33:46 AM2/13/16
to hyperspy-users
You can help us test 0.8.3 by upgrading HyperSpy to the latest dev maintenance branch as follows:

    pip install --upgrade https://github.com/hyperspy/hyperspy/archive/0.8.x.zip


The hyperspy starting script is now deprecated. More information on how to import hyperspy here: https://github.com/hyperspy/hyperspy/blob/0.8.x/doc/user_guide/getting_started.rst

Could you (and any other who which to try the new version before the release) let us know if you experience any issue? Thanks!

Francisco
Reply all
Reply to author
Forward
0 new messages