You are not logged in.
After a fresh install of 32bit BL Hydrogen, I installed the Anaconda scientific package , and upon reboot, I discovered that the system tray icons (battery, network manager) were missing, and probably more alarming, the shutdown/suspend/etc dialogue (which corresponds to the bl-exit python script) box did show up either by pressing super-X or via the main menu.
Checking the .xsession-errors file in my home/username folder, the issue (at least for bl-exit) was that one of the python modules it references (gtk) was not found.
import gtk
error: no module named gtk
Turns out that during the Anaconda installation, you are prompted for a line of code to be added to the .bashrc file, that prepends Anaconda's python path to the python syspath (specifically it places it to the beginning of the path list), so that it can be launched system-wide (along with all its libraries/packages). This trips up some python scripts within BL, hence the issues above.
The solution is to go to the folder where anaconda is installed e.g. /home/username/anaconda2/,
create a new folder (named e.g. sym_links) where you will place symbolic links to the scripts activate, deactivate & the file conda, which all 3 are located in the path_to/anaconda2/bin folder .
One way to do this in the terminal :
(In all the following code snippets, replace path_to with the actual absolute path your anaconda is installed).
mkdir path_to/anaconda2/sym_links
ln -s path_to/anaconda2/bin/activate path_to/anaconda2/sym_links/activate
ln -s path_to/anaconda2/bin/deactivate path_to/anaconda2/sym_links/deactivate
ln -s path_to/anaconda2/bin/conda path_to/anaconda2/sym_links/conda
Then open your .bashrc file located in /home/username (press ctrl-H to reveal hidden files), go to the end of the file * find the line entered by anaconda (which will look like this) :
# added by Anaconda2 4.0.0 installer
export PATH="path_to/anaconda2/bin:$PATH"
, comment it out with # , and below it add the following:
# added folder with sym links to conda (de)activate to avoid breaking BL python scripts
export PATH="path_to/anaconda2/sym_links:$PATH"
You can of course just modify the original line ; I kept the original for reference purposes.
If you reboot , system tray & bl-exit should work normal. To access anaconda's python & its packages (jupyter, spyder, etc. ), launch a terminal and enter :
# to access anaconda environment
source activate root
# launch your package of choice, e.g
jupyter notebook
# when done, to return to system python
source deactivate
This might seem like a workaround, but you will eventually be using the source (de)activate
commands to access all the different conda environments you will be creating.
P.S. While on the subject, if you want geany to use anaconda's python ,
open any python script in geany,
from the toolbar menu select Build > Set Build Commands ,
and on the pre-last row ,
enter on the field next to the button 'Execute' your path to anaconda's python e.g.
path_to/anaconda2/bin/python
Now pressing F5 or the toolbar button Execute will run your python script via anaconda.
Hope this helps.
Last edited by nobody (2016-06-09 15:27:05)
If I were a betting man, me being wrong is where I'd put my money on.
Offline
Many thanks for the housekeeping and also slyly nudging me (us) to figuring out systemd utilities.
Reading the examples in systemd-nspawn man page, it seems a bit of an overkill for a standalone anaconda setup.
Not really familiar with anaconda's structure, but i think it is designed to be as unobtrusive to system files as possible (uninstalling in linux is basically deleting the installation folder).
If on the other hand, I was looking to set up a node.js server to obtain a real-time data feed, then pipe the data to the anaconda platform for data processing , then systemd-nspawn sounds like the way to go.
If I were a betting man, me being wrong is where I'd put my money on.
Offline