Installing vscode, node, anaconda - python

My lecturer uploaded a youtube video explaining how to activate node and anaconda. I've installed node, anaconda (and vscode through the installation of the anaconda).
In the video, he says that we can check if the anaconda was installed properly by typing in the cmd
jupiter --version and then the version should be presented on the screen. I get the message:
'jupiter' is not recognized as an internal or external command, operable
program or batch file.
How can I fix this so that I could see the version? Thanks a lot.

pointed by #sini you need to check jupyter --version instead jupiter --version
if jupyter not installed
You need to install jupyter
python3 -m pip install jupyter
For windows get the help
you can verify if juypter packaged installed by pip freeze command
jupyter==1.0.0
jupyter-client==5.2.3
jupyter-console==5.2.0
jupyter-core==4.4.0 ....

Related

Exporting Jupyter notebook doesn't work in VSCode

I'm using VSCode with WSL Ubuntu 20.04. I'm trying to export a Jupyter notebook to PDF or HTML in VSCode using the built-in Export feature in the Jupyter extension.
I get this error message: Jupyter command 'jupyter-nbconvert' not found.
Things I have tried:
Changing the interpreter that starts Jupyter in VSCode
Uninstalling and reinstalling jupyter and nbconvert in the integrated terminal
Making sure the path where Jupyter is installed is on my PATH
Things I have not tried that were suggested by others in this similar question:
Uninstalling and reinstalling jupyter and nbconvert in Powershell.
How would one do this? pip3 install nbconvert returns this error: pip3 : The term 'pip3' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Running which nbconvert from the integrated terminal returns nothing. I installed nbconvert via pip3.
pip3 : The term 'pip3' is not recognized as the name of a cmdlet
Try this command to install nbconvert:
python -m pip install nbconvert -U

VScode fails to export Jupyter notebook to HTML - 'jupyter-nbconvert` not found

I keep on getting error message:
Available subcommands: 1.0.0
Jupyter command `jupyter-nbconvert` not found.
I've tried to reinstall nbconvert using pip to no use. I've also tried the tip from this thread with installing pip install jupyter in vscode terminal but it shows that "Requirement already satisfied"
VSCode fails to export jupyter notebook to html
I've also tried to manually edit jupyter settings.json file to the following:
"python.pythonPath": "C:\\Users\\XYZ\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\Scripts"
I've python 3.9 installed via windows store.
Any tip on what might be the issue for vscode doesn't want to export the notebook?
pip uninstall nbconvert
run CMD as admin
pip install nbconvert
Following above steps resolved my issue. Got this solution from this thread
Unsure exactly what fixed the issue but heres a summary.
Updated to python 3.10
Installed pandoc and miktex
Powershell reinstall nbconvert
Received warning that nbconvert script file is installed in a location not in Path.
Copied said location to System Properties - Envionment Variables - Path
Restart and install all miktex package on the go
PDF export and HTML export seems to work as intended now.
Here's my step to convert .ipynb to html:
Install required module: pip install nbconvert
Turn to the folder that contains .ipynb then run jupyter nbconvert --to html Text.ipynb
You may create a new virtual environment to avoid messing up global one then try again.
For your reference: nbconvert-PyPI and create virtual environment.
Quick answer:
import pip
package= ['nbconvert'] # install any package you need without any error forever
for i in package:
pip.main(['install', i])
After facing a similar problem, I tried to resolve it. None of these solutions didn't resolve my problem.
But found an alternative approach, tried opening the notebook by the following command and succeeded.
python -m notebook
If a notebook was not installed in your system, then install it with pip
pip install notebook
After opening your notebook into Jupiter, export it into your desired file.
I use Pyhton3 and have very limited packages in python, this caused a problem for me.
pip install nbconvert
also try using
pip3 install nbconvert

How to instal Python packages for Spyder

I am using the IDE called Spyder for learning Python.
I would like to know in how to go about in installing Python packages for Spyder?
step 1. First open Spyder and click Tools --> Open command prompt.
For more details click visit this link,
https://miamioh.instructure.com/courses/38817/pages/downloading-and-installing-packages
I am running Spyder 4.2.4 and for me following solution turned out to be working:
open tools-> preferences -> python interpreter
click 'use the following python interpreter'
point the location to local python installation, in my case : C:\Users\MYUSER\AppData\Local\Programs\Python\Python37\python.exe
Click OK and restart the kernel.
Now the pip started to work and I was able to import any package I previously installed on the cmd/python CLI.
Spyder is a package too, you can install packages using pip or conda, and spyder will access them using your python path in environment.
Spyder is not a package manager like conda,, but an IDE like jupyter notebook and VS Code.
For the latest versions of Spyder use this console
at right bottom
Note: Once you hit enter it may take some time to install and you can't see the progress until it finishes.
Else:
Open anaconda command prompt
Activate your environment: conda activate env-name
Install the package: conda install your-package-name
I have not checked if the ways described by people here before me work or not.
I am running Spyder 5.0.5, and for me below steps worked:
Step 1: Open anaconda prompt (I had my Spyder opened parallelly)
Step 2: write - "pip install package-name"
Note: I got my Spyder 5.0.5 up and running after installing the whole Anaconda Navigator 2.0.3.
I installed Basic Python IDLE(python 3.9)
As I used to Spyder. I installed a standalone Spyder from https://www.spyder-ide.org/
Then I faced problems for packages
I tried this one
pip install spyder spyder-terminal

can't run ipython on cmd

I successfully installed ipython via pip. I wanted then to use it by launching it through windows 10 command prompt but am getting the following error
'ipython' is not recognized as an internal or external command,
operable program or batch file.
I have gone through many questions on stackoverflow but cannot get a relevant solution.
I tried pip install ipython to confirm the ipython is installed and following on the instruction on my tutorial, i typed ipython on cmd to launch the program and it has never worked. This is slowing down my learning, please help!
Found the solution: run python -m IPython (case sensitive).
To find that out, I ran pip show ipython and it showed me some info, including the path of the module (for me: c:\users\mathieures\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages). In there, a folder named IPython!
Search in your machine the ipython application (directory in which it is installled) and the add the path to PATH environment variables.
For example in my case location was C:\Users\DELL\AppData\Local\Programs\Python\Python37\Scripts
Add this path to PATH environment variable (see here) and your problem is solved.
for first uninstall ipython python -m pip uninstall ipython then install ipython with code python -m pip install ipython when finished type ipython to run.
I had the same problem, and what i simply did is uninstall it using pip uninstall ipython and then reinstall it using pip install ipython like the same as what Ali vatankhah did but without adding python -m in the command.

anaconda navigator not opening with error active.bat

so i installed anaconda graphical installer but when i searched for anaconda-navigator on my anaconda prompt it did not open instead it showed this message
'C:\Users\RAM\Anaconda3\Scripts\activate.bat' is not recognized as an internal or external command, operable program or batch file.
I do not know what does this mean please help me fix this problem
Try to do this
Install/Delete everything related to Python/Anaconda
Install the desired version of miniConda from https://conda.io/miniconda.html
Open miniConda prompt and conda install anaconda=5.1 or 5.0.1 version

Categories

Resources