question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

problem of running in jupyter notebook

See original GitHub issue

I followed the instructions as you wrote on the github and can successfully run the test codes. however, I met the following error when running in my jupyter notebook


OSError Traceback (most recent call last) <ipython-input-24-6bd4815fa3b6> in <module>() 16 target = [5, 3, 1, 4, 5, 1, 5] 17 —> 18 fm = pywFM.FM(task=‘regression’, num_iter=5) 19 20 # split features and target for train/test

/usr/local/lib/python2.7/dist-packages/pywFM/init.pyc in init(self, task, num_iter, init_stdev, k0, k1, k2, learning_method, learn_rate, r0_regularization, r1_regularization, r2_regularization, rlog, verbose, seed, silent, temp_path)

OSError: LIBFM_PATH is not set. Please install libFM and set the path variable (https://github.com/jfloff/pywFM#installing).

actually I have already set the LIBFM_PATH in my ~/.bashrc file as this: export LIBFM_PATH=$HOME/local/libfm/bin I don’t know why the jupyter notebook cannot find this path

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jfloffcommented, Jun 21, 2017

Hello,

I had a previous issue regarding this (#11), and it seems Jupyter-specific problem: https://github.com/jupyterhub/jupyterhub/issues/330

As some hints, you can either try exporting into .profile, or you could also set it directly using Jupyter instructions: http://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-env

When you find a solution, please report back! 👍

0reactions
LLLLucensuscommented, Mar 1, 2020

Actually I have made two modifications. (1) add this line to ~/.bash_profile.(the path should he the directory where you installed your libfm into) export LIBFM_PATH=$HOME/local/libfm/bin (2) add the following settings to ~/.jupyter/jupyter_notebook_config.py for var in os.environ: c.Spawner.env_keep.append(var) It may also work if you only append the LIBFM_PATH to env_keep. I am not sure. For completeness, I add all path variables Then I restart the jupyter, It works

I didn’t find jupyter_notebook_config.py but found a empty file named jupyter_notebook_config.json. Is it a file created by yourself?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter notebook not running code. Stuck on In [*]
Try manually stopping the kernel by pressing the stop button at the top. If that doesn't work, interrupt it and restart it by...
Read more >
Dealing with Long Running Jupyter Notebooks - Saturn Cloud
Jupyter notebooks store all their state in the browser and thus require constant network connectivity. This is a well known design issue, with ......
Read more >
Jupyter notebook browser page not loading
Hello, I have been using Jupyter Notebook successfully for a long time, but today I have encountered a strange problem. Running on windows...
Read more >
Solve problems with Jupyter Notebooks - coursera.support
Unsaved work · Save your notebook locally to store your current progress · In the notebook toolbar, click Kernel, then Restart · Try...
Read more >
How to Fix Kernel Error in Jupyter Notebook
When the system encounters difficulties locating the path which certain programs will run, this error is known as a kernel error in Jupyter ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found