I deleted Anaconda because it was causing more issues than solving in working with other editors like Sublime, PyCharm, etc...
In class, we have a lot of Jupyter notebooks. Is there a program that allows me to run Jupyter Notebooks just like Anaconda allowed me to? Basically the same User Interface where Cntrl + Enter runs a block a code?
Thanks.
Edit: I figured it out. I needed to downgrade Python from 3.8 to 3.7
Jupyter can be installed separately to Anaconda using pip via pip3 install jupyter - see the Jupyter page for more information.
Related
I am using Jupyter Notebook inside VSCODE and was happy with it untill I found out this issue.
The autocompletion seems not to be working well inside Notebooks compared to the regular Python script as shown on the screenshots below.
If someone already faced this problem any infos will be welcomed.
Thanks
I guess you've not installed ipykernel package. You can install it like that
pip install ipykernel
Please try to install the extension "Pylance" in VS Code and use the language service provided by "Pylance": use it in the "settings.json" of VS Code:
"python.languageServer": "Pylance",
I just bought my very first Mac after using Windows my entire life and have been trying to install things. I am also still kind of a beginner at programming.
I installed Anaconda for Python 2.7 version, and then I installed the 3.7 version right after.
I tried going to terminal and typing jupyter notebook but it says:
zsh: command not found: jupyter
I am able to launch a jupyter notebook (I think) when I search for jupyter notebook in spotlight and executing the top hit.
I've been reading a lot on forums about this issue and see a lot of people talking about PATH which I am not really sure about.
I've seen people also post their which python information and theirs seem very different from mine:
which python3
usr/bin/python3
which python
usr/bin/python
Any help would be appreciated! Still learning how to set up this Mac. Thank you.
You might want to refer to this link https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html
3.1.2. Change Jupyter Notebook startup folder (Mac OS)
To launch Jupyter Notebook App:
Click on spotlight, type terminal to open a terminal window.
Enter the startup folder by typing cd /some_folder_name.
Type jupyter notebook to launch the Jupyter Notebook App The notebook interface will appear in a new browser window or tab.
From what I can understand you are not changing to the startup directory of Jupyter.
You need to add jupyter to your path.
In your terminal, type in the following command:
export PATH="/PUT JUPYTER PATH HERE:$PATH"
Then try jupyter notebook
Reasoning: If installing using pip install --user, you must add the user-level bin directory to your PATH environment variable in order to launch jupyter lab
I would like to use Jupyter notebook inside Pycharm. The project interpreter is a python2.7 from a virtual environment inside WSL (ubuntu 18.04).
The Jupiter package is correctly installed inside the virtual environment (I can run it by jupyter notebook).
My problem is that when I want to use Jupyter notebook inside Pycharm, I get the following error: Run Error Jupyter package is not installed (see picture).
Any idea what's going on here?
I had this problem in Python 3. Below are the steps I took to resolve the issue; I believe they should resolve the issue for you too:
I had Jupyter Lab installed. Pycharm only works with Jupyter Notebook. Long story short, if you have Jupyter Lab installed you need to uninstall all your packages using:
$ pip freeze | xargs pip uninstall -y
Restart your computer
Follow Jupyter Notebook installation instructions
Make sure WSL is set up through pycharm instructions: wsl pycharm instructions
In Pycharm, open an .ipynb file. Click the dropdown that says "Managed Jupyter server" It's right above the text editor. Select "configure Jupyter server". Check configured server.
In your wsl terminal, type jupyter notebook. Copy and paste the text that looks like: http://localhost:8888/?token=874asdf687asd6fasd8f74ds6f4s9d8f7sddf into the cofigured server box in Pycharm.
That's it. You should be able to run the jupyter cells in pycharm now.
I have Pycharm 2020.3 For me the issue was I was using a virtual environment with "inherit global site packages." I had Jupyter installed in global site packages but NOT the virtual environment.
Once I installed Jupyter within the virtual environment Jupyter notebook worked. Not sure why inheriting Jupyter from global packages wasn't working for me.
The above solution using a designated url with token seems to work with older versions of PyCharm. A simpler solution is to upgrade to the latest PyCharm. I no longer had an issue with the auto server using PyCharm 2019.3.2 (Mac)
I had this problem with Datalore plugin enabled on 2020.2 linux, running on bare metal but displaying to a remote X server (probably doesn't matter). My solution was to disable the Datalore plugin (it's enabled for professional pycharm by default).
This way I was still able to use the "managed" auto-start version with better integration / debugging vs the "configured" option (or at least with less hassle).
Note since it's been a year, my problem is probably different than OP.
This happened for me, when the interpreter was a remote one. I fixed this by changing the interpreter to one from a local env.
This can be done by selecting the Configure Jupyter Server.
I also meet this problem,and i solved it
i create the new project with the global sit-packages like below
then i meet the problem
i create the new project with no global sit-packages and install jupyter notebook in the virtualenv
then the problem is gone
I installed Anaconda as it's a recommended way to start with Jupyter notebooks.
I was surprised at the end of the Anaconda windows install to be invited to install Microsoft VS Code as a code editor. Reading about VS Code it seems a well respected editor but does that not take away the idea of using using Jupyter notebooks? Or am I missing something?
Anaconda also installs IDLE and Spyder, which are IDEs (Integrated Development Environments). Anaconda simply gives you a choice. Each of those choices has its advantages and disadvantages. Using one does not prohibit you from also using another.
Jupyter might recommend using Anaconda, but this doesn't imply that Anaconda would recommend using Jupyter.
You are right that if you are going to focus on Jupyter notebooks you won't need to use VS Code.
But most people that use Anaconda are not using Jupyter notebooks - they write python scripts not notebooks - and for that vscode is a respected choice.
My knowledge with Jupyter and python is limited. You can sense it after reading this question. I have two set of servers: one set of servers running the spark-standalone cluster and one server running the Jupyter notebook.
I have installed Jupyter in my server twice with commands:
pip2 install jupyter
pip3 install jupyter
After installing I set the following environments:
export PYSPARK_DRIVER_PYTHON=jupyter
export PYSPARK_DRIVER_PYTHON_OPTS="notebook --notebook-dir=./ --ip=* --no-browser"
Then I used Jupyter to connect to the spark-standalone cluster with the following command:
./bin/pyspark --master spark://192.XXX.XXX.XXX:7077
I can login in the Jupyter homepage in my laptop and in the right corner the message indicates that I am using Python2. However, I cannot execute Python2 codes while Python3 codes work.
I tried the following command
export PYSPARK_PYTHON=python2
and
import os
os.environ["PYSPARK_PYTHON"]="/usr/local/bin/python2"
but with no luck.
Is this because I am using a Jupyter notebook created by pip3? If it is, how can I switch to the Jupyter notebook created by pip2?
Thanks in advance if you have any suggestions. If you need more information to locate the cause, please feel free to let me know.
I put this problem aside these days and picked it again today. To determine whether spark or jupyter was responsible for this problem, I launched the Jupyter Notebook without spark: jupyter notebook. The same problem arose again so I knew there was something wrong with my Jupyter Notebook.
I referred to this document: Installing the IPython kernel. After executing the following commands I could run Python2 codes.
python2 -m pip install ipykernel
python2 -m ipykernel install --user
I have tried these two commands before posting the questions but with no luck. I guess maybe I made some mistakes when coping/pasting? Anyway, the problem is now solved.