mikefromsweden
Posts: 2
Joined: Mon Mar 19, 2018 5:51 pm

SimpleCV problem

Mon Mar 19, 2018 6:00 pm

Hi everyone!
I have followed this https://www.open-electronics.org/comput ... pi-module/ and everything is installed but when I try to run simpleCV this is the output:

Code: Select all

[email protected]:~ $ simplecv

/home/pi/.local/lib/python2.7/site-packages/IPython/config.py:13: ShimWarning: The `IPython.config` package has been deprecated since IPython 4.0. You should import from traitlets.config instead.
  "You should import from traitlets.config instead.", ShimWarning)
/home/pi/.local/lib/python2.7/site-packages/IPython/frontend.py:21: ShimWarning: The top-level `frontend` package has been deprecated since IPython 1.0. All its subpackages have been moved to the top `IPython` level.
  "All its subpackages have been moved to the top `IPython` level.", ShimWarning)
/home/pi/.local/lib/python2.7/site-packages/IPython/core/interactiveshell.py:449: UserWarning: As of IPython 5.0 `PromptManager` config will have no effect and has been replaced by TerminalInteractiveShell.prompts_class
  warn('As of IPython 5.0 `PromptManager` config will have no effect'
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/usr/local/bin/simplecv in <module>()
      9     sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
     10     sys.exit(
---> 11         load_entry_point('SimpleCV', 'console_scripts', 'simplecv')()
     12     )

/home/pi/.local/lib/python2.7/site-packages/SimpleCV/Shell/Shell.pyc in main(*args)
    255     init_logging(log_level)
    256     shellclear()
--> 257     scvShell = run_shell(interface)

/home/pi/.local/lib/python2.7/site-packages/SimpleCV/Shell/Shell.pyc in run_shell(shell)
    213     for shell in available_shells:
    214         try:
--> 215             return globals()[shell]()
    216         except ImportError:
    217             pass

/home/pi/.local/lib/python2.7/site-packages/SimpleCV/Shell/Shell.pyc in setup_ipython()
    125         scvShell = InteractiveShellEmbed(config=cfg, banner1=banner,
    126                                          exit_msg=exit_msg)
--> 127         scvShell.define_magic("tutorial", magic_tutorial)
    128         scvShell.define_magic("clear", magic_clear)
    129         scvShell.define_magic("example", magic_examples)

AttributeError: 'InteractiveShellEmbed' object has no attribute 'define_magic'
I tried to search this forum and tried Google but with no result or I didn't understand what to do.

What is wrong and how do I solve it?

Antiklesys
Posts: 9
Joined: Thu Sep 27, 2012 7:38 am

Re: SimpleCV problem

Sun Oct 21, 2018 1:15 pm

You can resolve this by doing:

sudo nano ./usr/local/lib/python2.7/dist-packages/SimpleCV/Shell/Shell.py

Around line 50 change

Code: Select all

from IPython.config.loader import Config 
to

Code: Select all

from traitlets.config.loader import Config
Around line 51, change

Code: Select all

from IPython.frontend.terminal.embed import InteractiveShellEmbed
to

Code: Select all

from IPython.terminal.embed import InteractiveShellEmbed
and save the file with the changes.
Then run the following command: pip install IPython==4.2 --user

This will fix all these issues.

mikefromsweden
Posts: 2
Joined: Mon Mar 19, 2018 5:51 pm

Re: SimpleCV problem

Mon Oct 22, 2018 9:07 am

Thank you Antiklesys!

I'll try that as soon as I have some free time.

Return to “Troubleshooting”