### Running Spyder on Anaconda (mac OS Sierra)

264
views
0
7 weeks ago by
I have installed fenics through the terminal, using the given commands:

conda create -n fenicsproject -c conda-forge fenics
source activate fenicsproject

Then I got the message:

To activate this environment, use:

# > source activate fenicsproject

#

# To deactivate an active environment, use:

# > source deactivate

#

and typed:

~ martins$source activate fenicsproject (fenicsproject) wlan-145-94-199-128:~ martins$ anaconda-navigator

As I did this, on the Navigator home was created a new application on, called fenicsproject, from which i could install and launch Spyder.
I created the file for the poisson equation, run and got this error in the console:

An error ocurred while starting the kernel

And when I checked back on the terminal, I found this long message:

2017-10-14 12:52:24,057 - WARNING conda_api.communicate:233

Conda command output on stderr {'command': '/Users/martins/anaconda3/bin/ python /Users/martins/anaconda3/bin/ conda install --yes --json --force-pscheck --prefix /Users/martins/anaconda3/envs/ fenicsproject spyder==3.2.3', 'stderr': '    If this is your first install of dbus, automatically load on login with:/n        mkdir -p ~/Library/LaunchAgents/n        cp /Users/martins/anaconda3/envs/ fenicsproject/org.freedesktop. dbus-session.plist ~/Library/LaunchAgents//n        launchctl load -w ~/Library/LaunchAgents/org. freedesktop.dbus-session. plist/n/n    If this is an upgrade and you already have the org.freedesktop.dbus-session. plist loaded:/n        launchctl unload -w ~/Library/LaunchAgents/org. freedesktop.dbus-session. plist/n        cp /Users/martins/anaconda3/envs/ fenicsproject/org.freedesktop. dbus-session.plist ~/Library/LaunchAgents//n        launchctl load -w ~/Library/LaunchAgents/org. freedesktop.dbus-session. plist/n/n'}

I should have followed the instructions quite precisely, why am i getting it wrong?

I am a newbie on this system and programming in general, so I would really appreciate if you could explain in the easiest language possible.

As a background, before installing Anaconda, i had python 2.7 already installed on my computer, as well as python 3.6...could there be some kind of conflict going on?

Thank you all!
Community: FEniCS Project

0
7 weeks ago by
I think your Spyder is using different python and/or dependencies. Maybe if you install it from conda-forge it may work, but I am just guessing here
conda install -n fenicsproject -c conda-forge spyder​
0
7 weeks ago by
Can you explain better what does this mean "I think your Spyder is using different python and/or dependencies."?
Does it refer to the versions of python installed?

I have taken this screen shot from the navigator home...

I will try. And by doing that, I should be able to run fenics from spyder, right?
0
7 weeks ago by
You install fenics from conda-forge which may have its own python. And if Spyder is from conda, then it may use a different python.
0
7 weeks ago by
I don't think it is working....this is the terminal response

install: illegal option -- n

usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]

[-o owner] file1 file2

install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]

[-o owner] file1 ... fileN directory

install -d [-v] [-g group] [-m mode] [-o owner] directory ...
Paste my instruction exactly as given in my post.
written 7 weeks ago by Praveen C
Yeah, that is exactly what I did and that was the answer....

In the mean time I have actually also delated the version of Python 3.6 that I had installed previously, so now there are two versions left 2.6 and 2.7, which as far as i know are automatically upgraded.
I have also delated and installed Anaconda again, used your line - not working - used again the code given by fenics. Answer on spyder is always the same when I try to run the poisson code:

An error ocurred while starting the kernel
written 7 weeks ago by Martina Cotti
0
7 weeks ago by
And I actually get the same exact error even when I run fenics from the Terminal, this is the message:

(fenicsproject) MacBook-Pro-di-Martina:~ martins$cd ~/Desktop/NUMERICALANALYSIS/fenicstutorial (fenicsproject) MacBook-Pro-di-Martina:fenicstutorial martins$ python ft01_poisson.py

Abort trap: 6

I think your python and/or fenics installation is messed up. Its difficult for me to say how to fix it. Once you are inside fenicsproject environment what does

which python

show ?

I would recommend doing a complete uninstall of conda and fenics, and make a fresh installation. You can delete the directory where Anaconda is installed. I use fenics via conda on mac without any problem. If it is any help, I have some instructions here http://cpraveen.github.io/comp/fenics.html
written 7 weeks ago by Praveen C