I could use Python Kernel with Jupyter. I am looking for a way to use sagemath inside Jupyter.I couldnt see a way for installing it. How to do that?
I have just installed SageMath kernel on my existing Jupyter installation. It's super easy.
$ sudo jupyter kernelspec install ./SageMath/local/share/jupyter/kernels/sagemath
Where SageMath is your root sagemath directory. Hope this will help someone.
If you don't have sudo rights you won't be able to install system-wide,
but you can still install for yourself using the --user flag:
$ jupyter kernelspec install --user ./SageMath/local/share/jupyter/kernels/sagemath
The answer suggesting
$ jupyter kernelspec install --user <path to SageMath/local/share/jupyter/kernels/sagemath>
works only if you provide the environment variable SAGE_ROOT in the kernel spec. This requires adding an "env" item to the kernel.json. The line that must be added is:
"env":{"SAGE_ROOT":"<Path to sage root>"}
An example specific to an installed mac app for version 8.7 is:
"env":{"SAGE_ROOT":"/Applications/SageMath-8.7.app/Contents/Resources/sage"}
See this question for general information and a complete example.
You are going about it backwards; Sage includes the Jupyter notebook inside of it, and you can use it with that kernel that way. (As well as others.) Use
$ sage --notebook ipython
I believe. See also here.
(I think there are also some people who have had success redirecting their Jupyter to "see" the Sage kernel by editing some file or configuration. On Arch Linux this is apparently supported ... ?)
I know this is an old question, but I stumbled onto it and ended up making a docker container to accomplish this for anyone who is interested.
https://hub.docker.com/r/sharptrick/sage-notebook
The dockerfile may be of interest as it has explicit instructions which install the kernel to the official "jupyter/minimal-notebook".
https://github.com/sharpTrick/sage-notebook/blob/master/Dockerfile
Related
I have installed Anaconda since it was recommended to use in the OpenMDAO's website. After that I typed pip install 'openmdao[all]' as instructed. However I get an error message saying, "ERROR: Invalid requirement: "'openmdao[all]'"" I was wondering how can I solve this issue. I have no knowledge about the Python or anaconda therefore I don't have a clue what to do about this situation. I searched the internet however I didn't find a solution to this. Thanks in advance!
It's possible you're running the wrong pip executable. Try which pip - it should be located under your home directory instead of a system path such as /bin/pip or /usr/bin/pip.
Make sure you've created and activated an environment in Anaconda:
conda create -n myenv pip
conda activate myenv
python -m pip install 'openmdao[all]'
That command sequence will give the highest chance of success. The single quotes are required for shells like zsh.
Remove the single quotes:
pip install openmdao[all]
The Internet is strangely absent of instructions on how to get Haskell running under the Jupyter environment. Any documentation that leads you toward this requires you to compile from source, however when attempting to do so, all sorts of build errors occur.
It seems odd that an environment that would certainly give Haskell so much exposure is strangely not exercised by enough people that there would be some decent documentation. Yet, the language is supposedly is supported.
Has anyone gotten this to work?
Here's what I've done to get it up and running in Linux (Lubuntu 16.0)
Prerequisites:
sudo apt-get install -y python3-pip git libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev libmagic-dev libblas-dev liblapack-dev
Setup IHaskell locally
git clone https://github.com/gibiansky/IHaskell.git
cd IHaskell
pip3 install -r requirements.txt
curl -sSL https://get.haskellstack.org/ | sh
stack install gtk2hs-buildtools
stack setup
stack install
Install Haskell kernal for IPython
stack exec -- ihaskell install --stack
Run Haskell in Jupyter
stack exec jupyter -- notebook
More details in: https://github.com/gibiansky/IHaskell
Here is a Community Jupyter Docker Stacks image for IHaskell. If you have Docker installed, then you can run a Haskell Jupyter notebook with one command.
I am using pycharm 5.0.4 community edition.
I wanted to install package fuzzywuzzy.
But when i go to project interpreter window and try to install package, it shows me no available packages.
Can it be issue because I am using my work desktop.
Thanksenter image description here
Can you provide more details- Are you not able to see any packages? Try searching for some other packages like pip, matplotlib, django, numpy etc. Sometimes it takes time for the IDE to build skeletons before you can actually start installing the packages. So once the IDE wait for it to complete its setup and then try to access the installation packages available.
Also if you do you have any other python interpreter installed on your local machine? If so then try switching to that interpreter.
Below are some steps you can try, which worked for me:
Step-1 Activate your intelpython using:
source <your installation path>/bin/activate
Step-2 Clone the environment using conda clone command and make sure the pwd is ~/:
conda create -n <source_environment> --clone <destination_environment>
Step-3 Activate the cloned environment:
source ~/.conda/envs/<your_environment>/bin/activate
Step-4 Provide read-wite permissions to intelpython and cloned enviroment using:
sudo chown -R <user_name>:<group_name> /<path_to_directory i.e. /opt/intel and ~/.conda/envs>
Step-5 Open Pycharm and in System Interpreter add the path to above created enviroment and then you can use pip or Pycharm itself, it should work.
I had a similar problem. I was using the Intel python distribution, and installing packages required write permissions to the folder that intelpython was installed in, which in my case was /opt/intel/intelpython2.
Try adding write permissions to the folder using the following command:
sudo chown -R <username> </path/to/folder>
Then try adding missing packages and/or repositories as seen in this page - https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html.
I'm using the fantastic SageMath Cloud service to remotely collaborate with a partner. In particular, I'm using IPython notebooks. Unfortunately, the language seems to default to Python 2; I would prefer Python 3.
SSH'ing into my project, I can see that IPython 3 is actually installed. Is there a way to coerce SMC into using Python 3 for notebooks?
I have tried the instructions mentioned in the FAQ, i.e.,
ln -s /usr/bin/python3 ~/bin/python
ln -s /usr/bin/ipython3 ~/bin/ipython
While this works for invoking Python from the SSH commandline, it doesn't seem to affect the kernel used by IPython notebooks created from the web GUI.
Once you open an IPython Notebook on SageMathCloud you can switch the kernel to a variety of choices, including Python 3. To do that, use the 'Kernel' menu, then 'Change kernel', then 'Python 3'.
Switching to the Python 3 kernel in the IPython Notebook on SageMathCloud is discussed in this discussion the sage-cloud mailing list.
Is this what your question is about, or are you asking how to make that choice the default when you open a new IPython Notebook on SageMathCloud?
To get the fastest answers to SageMathCloud questions, use the sage-cloud mailing list.
I've installed mongoctl according to Mongolab's simple instructions, but I can't do anything with the installed package because which mongoctl resolves to nothing.
The site makes it look like pip installs some kind of command line tool, but it seems like it just installs the python package, which would be fine if all of the documentation didn't treat mongoctl as a command line tool.
What's going on?
You can add the following option to your install command to ensure that "mongoctl" exe goes to /usr/local/bin
--install-option="--install-scripts=/usr/local/bin"
Since mongoctl is already installed on your mac, you will probably need to add a --upgrade and a --force-reinstall
So try the following
sudo pip install mongoctl --install-option="--install-scripts=/usr/local/bin" --upgrade --force-reinstall
What OS are you using?
'mongoctl' should be in /usr/local/bin. Check to make sure that directory is in your PATH
-will