Problem with setting up the ipython profile for sfepy

41 views
Skip to first unread message

Gary Roach

unread,
Mar 27, 2017, 4:52:07 PM3/27/17
to sfepy-devel
Debian  (stretch) Linux OS
Using Anaconda3
pip and conda used for installations

I created profile_sfepy directory and content by running ipython profile create sfepy from the /root/.ipython directory. This created the subdirectory profile_sfepy in the .ipython directory. In the profile_sfepy directory, I then tried to edited the ipython_config.py file as suggested in section 2.6 of the tutorial.

First problem:
  There is no c = get_config() line in the file. The unedited file is attached.
Second:
  exec_lines = [ ] does not exist. There is a:
  ## lines of code to run at IPython startup.
  #c.InteractiveShellApp.exec_lines = [ ] .
I put the exec_lines =  code directly into c.InteractiveShellApp.exec_lines "tuple?"
For the rest I found  places that fit.

When running ipython --profile=sfepy I got the following error:

ImportError: Matplotlib backend_wx and backend_wxagg require wxPython >=2.8.12
/root/anaconda3/lib/python3.5/site-packages/traits/etsconfig/etsconfig.py:429: UserWarning: Environment variable "HOME" not set, setting home directory to /tmp
  (environment_variable, parent_directory))

I attempted to install wxpython with conda install wxpython  and got the following:
  UnsatisfiableError: The following specifications were found to be in conflict:
  - python 3.5*
  - wxpython

I ran conda info wxpython and found that wxpython depends on python 2.7. I use python 3.5 or 6 exculsively.

pip can't find the wxpython at all.

What now?

yours

Gary R.
ipython_config.py

Robert Cimrman

unread,
Mar 28, 2017, 4:17:03 AM3/28/17
to sfepy...@googlegroups.com
Hi Gary,

the instructions are probably obsolete now (works on ubuntu 14.04, not sure
about newer distros). Cf. https://github.com/sfepy/sfepy/issues/379, see below
for further information.

On 03/27/2017 10:52 PM, Gary Roach wrote:
> Debian (stretch) Linux OS
> Using Anaconda3
> pip and conda used for installations
>
> I created profile_sfepy directory and content by running ipython profile
> create sfepy from the /root/.ipython directory. This created the
> subdirectory profile_sfepy in the .ipython directory. In the profile_sfepy
> directory, I then tried to edited the ipython_config.py file as suggested
> in section 2.6 of the tutorial.
>
> First problem:
> There is no c = get_config() line in the file. The unedited file is
> attached.
> Second:
> exec_lines = [ ] does not exist. There is a:
> ## lines of code to run at IPython startup.
> #c.InteractiveShellApp.exec_lines = [ ] .
> I put the exec_lines = code directly into c.InteractiveShellApp.exec_lines
> "tuple?"
> For the rest I found places that fit.

Seems OK.

> When running ipython --profile=sfepy I got the following error:
>
> ImportError: Matplotlib backend_wx and backend_wxagg require wxPython
>> =2.8.12
> /root/anaconda3/lib/python3.5/site-packages/traits/etsconfig/etsconfig.py:429:
> UserWarning: Environment variable "HOME" not set, setting home directory to
> /tmp
> (environment_variable, parent_directory))
>
> I attempted to install wxpython with conda install wxpython and got the
> following:
> UnsatisfiableError: The following specifications were found to be in
> conflict:
> - python 3.5*
> - wxpython

You do not need to use the wx backend, just remove that line from the config.
The reason it was there was to allow non-blocking mayavi windows. The
configuration to achieve that might differ on new distros.

> I ran conda info wxpython and found that wxpython depends on python 2.7. I
> use python 3.5 or 6 exculsively.
>
> pip can't find the wxpython at all.
>
> What now?

Try removing the

'import matplotlib as mpl',
'mpl.use("WXAgg")',

lines.

Also note, that you can just run ipython with the default profile, and do the
imports from exec_lines manually in order to try the tutorial. Then check the
examples with "interactive" in their names - those show how to import things
properly in a script.

Does that help?

Cheers,
r.

Gary Roach

unread,
Mar 29, 2017, 1:43:58 PM3/29/17
to sfepy-devel
Thanks for the info Robert

Must be rough keeping up with all of the changes. Your instructions filxed the problems. Now on to the next step.

Thanks again

Gary R.

Robert Cimrman

unread,
Mar 29, 2017, 2:19:05 PM3/29/17
to sfepy...@googlegroups.com
On 29.3.2017 19:43, Gary Roach wrote:
> Thanks for the info Robert
>
> Must be rough keeping up with all of the changes. Your instructions filxed
> the problems. Now on to the next step.

Well, it's a very lazy evaluation - such problems get fixed when somebody
reports them (or submits a PR) :)

r.
Reply all
Reply to author
Forward
0 new messages