I want to open spyder(Python IDE) in ubuntu.
Normally I would write "spyder" in the shell, and it would open the spyder IDE.
Now when I write spyder in the shell, it just new lines, and nothing happens(similar to pressing 'enter').
--- How do I get my spyder back?
EDIT - I get no errors, it just skips to the next line.
If typing "spyder" doesn't work, you might want to try typing "spyder3" in case you installed the spyder3 version. Below is what worked for me in my Ubuntu system.
To install spyder via pip (my python version is 3.6.2), I used:
pip install spyder
Then, I had to install another package:
pip install PyQtWebEngine
Finally, to open the Spyder window, I typed into my terminal:
spyder3
You may simply have to update spyder.
If you are NOT using anaconda:
pip install --update spyder
Or, if you are in anaconda:
conda update spyder
I had the same issue as yours, with also a message in the command line saying:
Spyder is already running. If you want to open a new
instance, please pass to it the --new-instance option
The above update allowed me to open spyder from the command line.
I had this problem as well, and found this post on it in an askubuntu forum. It suggested using sudo apt-get purge spyder to delete any faulty configuration files and then reinstall with sudo apt-get install spyder. I found it worked, and spyder reopened with my previous files on the text editor.
in Ubuntu, just go to your,
cd home/<your account>
then go to .spyder2 folder
cd spyder2
should get you there
in terminal, type la in terminal(ls doesn't show the hidden files ) and use,
rm -f spyder.lock
to delete
A simple way to install spyder is:
sudo apt install spyder
now uninstall spyder and do this :
#first install spyder
sudo apt install spyder
#updata your conda
conda update anaconda
#updata spyder
conda update spyder
#then write this and wait
spyder
use this link
or if you do not have conda use thislinl=k
To launch spyder in bash console, just enter:
spyder .
in the bash console.
Related
I am in my tensorflow env on my minicoda prompt and I have just installed the latest version of Spyder via the following prompt: conda update spyder. Before I updated spyder I was on v4.1.3. I then searched to see if it was installed correctly with the following prompt: conda search -f spyder which brought up this list:
However, when I run spyder from miniconda: spyder (or even startup the application by clicking on the icon) it still launches my previous version of 4.1.3
What I then tried to do was run the prompt spyder=5.05 but it still launches version 4.1.3.
In my miniconda3\Lib\site-packages directory my spyder folder's file __init__.py has version = 4.1.3 so I understand that that is why it is launching 4.1.3. I do not know why this spyder folder was not updated. You can also see the pkgs folder there is only Spyder v4.1.3
Can someone please help me get the latest version of spyder to run without me having to uninstall and reinstall it, as I have all my preferences set on spyder and apparently there is no way of exporting and then importing them. Thanks
In my environment on my Miniconda prompt I typed in conda install spyder=5.0.5 and this resolved the issue. I now have Spyder 5.0.5! Acknowledgements to MB-F for giving the solution in the comment section.
Try to do it in this order:
conda update anaconda
and then
conda install spyder=5
this will allow you to successfully upgrade to version 5.
If it didn't help, then do this:
conda install conda-forge::spyder[version='>=5.0.0]
You can put another version
I have tried to install jupyter lab on my Kubuntu machine.
If I install jupyter lab with 'pip3 install jupyter jupyterlab' the command 'jupyter notebook' works completly fine. But if I try to run 'jupyter lab' every time I get the message:
Traceback (most recent call last):
File "/usr/local/bin/jupyter", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/jupyter_core/command.py", line 230, in main
command = _jupyter_abspath(subcommand)
File "/usr/local/lib/python3.6/dist-packages/jupyter_core/command.py", line 133, in _jupyter_abspath
'Jupyter command `{}` not found.'.format(jupyter_subcommand)
Exception: Jupyter command `jupyter-lab` not found.
What is wrong?
I tried to reinstall jupyter and jupyterlab multiple times with the same issue.
Its the space. Its always the space. Never ever use spaces within package name. Its always either namepart1-namepart2 or namepart1namepart2. This is because arguments are separated by space. So if you put space in between, it makes pip think that you want to install two different packages named jupyter and lab. Just use:
python -m pip install jupyterlab
Or simply:
pip install jupyterlab
No need to uninstall or reinstall anything. However to run jupyter lab server you might want to add spaces as follows:
jupyter lab
In my case, the only way to fix this was to add the following directory to the PATH in Linux:
/home/ubuntu/.local/bin
When installing jupyterlab, we may get warning like this:
Installing collected packages: jupyterlab
WARNING: The scripts jlpm, jupyter-lab, jupyter-labextension and jupyter-labhub are installed in '/home/tln/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed jupyterlab-3.0.14
So as per this warning, scripts like jupyter-lab will be unavailable unless added to the PATH.
Use below command to add these scripts to be able to use from command line:
tln#tln-X550LD:~$ export PATH="$HOME/.local/bin:$PATH"
That's it. This worked fine for me.
I had the same error on Windows 10. It was with pip install jupyterlab. Then after the error I uninstalled it with pip and reinstalled with "pip install jupyterlab". Everything worked flawlessly thereafter.
In your case you're using pip3. Try it as above or see if pip3 needs an update.
I had same issue. I solved it running pip install jupyterlab in prompt with admin privilegies.
Had the same issue and resolved it by installing with pip3
pip3 install jupyterlab;
jupyter lab
If you face -bash: jupyter-lab: command not found or -bash: jupyter: command not found, etc., you can look for "jupyter-lab" and enter that full path instead.
Mac:
$ /Users/mark/venv/bin/jupyter-lab
Windows:
C:\mark\venv\Scripts\jupyter-lab.exe
I got this same error every time I forgot to activate the virtualenv jupyterlab was installed into. After activating the virtualenv, all's well.
With pip
$ source [path_to_venv]/bin/activate
With pipenv
$ pipenv shell
Then, with a prompt indicating an activated shell, you can enter your command
(venv) $ jupyter lab
With conda or other more holistic python environments, you probably use their gui to activate a virtualenv with jupyter and jupyterlab installed.
Install with Anaconda
conda install -c conda-forge notebook
conda install -c conda-forge jupyter
conda install -c conda-forge jupyter_contrib_nbextensions
Once installed you just have to run
pip install jupyterlab
~/.local/bin/jupyter-lab
and ready and open browser http://localhost:8888/lab
Ubuntu 22
Lubuntu 22
well the problem is like this:
the jupyterlab module has not been packaged for debian, but the jupyterlab_server package has, named python3-jupyterlab-server.
please sudo apt install python3-jupyterlab-server.
then, as your user, run pip3 install jupyterlab, that will install it in your ~/.local/bin a few programs, the missing jupyter-lab among them.
last, but not least, run jupyter-serverextension enable --py jupyterlab.
to be able to run jupyter lab, you first need to run export PATH="/home/$(whoami)/.local/bin:"$PATH. this command will run automatically if added to your ~/.bash_profile.
ubuntu can not find the jupyter-lab because it is not in path.
in order to check the place of installment. run below command
find ~ -name jupyter-lab
possible result: /home/soshiant/.local/bin/jupyter-lab
for adding a directory to the Linux path you can follow below link:
How to add a directory to the PATH
if anyone still struggling ...
try:
find ~ -name jupyter-lab
and then:
export PATH=[path]
then try again: jupyter lab
note:
don't add any extra spaces and PATH is case sensitive and if u still struggling just try to install any missing pkgs after hosting to the main path by opining another tab or changing the path to main.
and then host to localhost:8888/lab
that should works fine...
I was using conda to install
conda install -c conda-forge jupyterlab
and this error came about.
I simply used this command to get it to run.
pip install jupyterlab
In my ubuntu installation this was qused by not using sudo before the install.
sudo pip install jupyterlab
If you already installed jupyterlab, and it dit not work, you can install again using sudo, you dont need to remove the old version first for it to work
By using pip, I can successfully install new packages in ipython running in the Spyder environment. All I need to run is this:
!python -m pip install mypackage
However, trying to uninstall packages doesn't seem to work, at all. When I run:
!python -m pip uninstall mypackage
The console goes into a state of hanging. It's not strictly 'hanging' because neither Spyder nor the console hangs but the command just isn't returning anything
I am attaching a screenshot to help explain what I mean. The screenshot shows what happens AFTER I have pressed ENTER on this line - and nothing happens!
Does anything know why?
You should not use pip with Spyder. It can break your whole distribution. Spyder is part of the Anaconda package and you should use the conda command instead of pip. The conda command works similar to the pip command. Instead of pip install package you'd use conda install package.
(Spyder maintainer here) Both pip and conda are not meant to be run inside one of our IPython consoles because they expect to be running in a real system terminal (xterm, Terminal.app or cmd.exe).
In this case, pip expects input from the user (the confirmation that he/she really wants to uninstall a package). That confirmation can't be displayed in our consoles and it makes it looked like its blocked.
What you could do is to pass the -q option to pip to avoid confirmation. But in general it's a very bad idea to use pip and conda inside our consoles for the reasons I stated above.
I have a windows 10 64 bit machine, i installed spyder with pip and it could not work. so to uninstall i just used this command
pip uninstall spyder
however, if spyder has been installed with alongside Anaconda, Uninstalling Anacanda will delete its all packages including spyder.
It says it installed Jupyter Notebook correctly, but when I launch it I get the error in the image:
The installation I used was:
pip
sudo apt-get install python3-pip
Then Pandas
sudo pip3 install pandas
then Jupyter notebook
sudo pip3 install Jupyter
Does it have anything to do with the version of Python (3 vs 2)?
How do I get Jupyter Notebook to start?
I had similar problems firing jupyter notebook on Ubuntu 18.4.x
Since jupyter notebook in itself requires another installation we need to install it. So I used this command and it worked please try and see if it works for you
#user-VirtualBox:~$ sudo apt install jupyter-notebook
It will ask for any password if you have set for Ubuntu once you enter this you should see
Reading package lists.. Done
Building dependency tree
...
...
etc
Once installation completed, type at prompt
#user-VirtualBox:~$ jupyter-notebook
You'll notice that jupyter's notebook system will automatically open Mozilla Firefox and it's ready go.
Let me know how it works.
Thanks
I downloaded spyder using the
pip install spyder
in my windows 10 32-bit operating system, but i dont see any desktop icons or exe files to start running the IDE. I downloaded spyder 3, any my python is 3.6.
I even tried creating a shortcut of spyder.exe from the Python3.6/Scripts folder, but it won't open.
The name of the spyder executable was changed to spyder3.exe in python version 3.
I install pyqt5 and spyder via pip and was able to launch spyder3. I first tried without installing pyqt5 and nothing happened. Once I installed pyqt5, then spyder 3 opened.
Try the following from a windows cmd.exe prompt:
C:\Users\..>pip install pyqt5
C:\Users\..>pip install spyder
C:\Users\..>spyder3
I had the same problem after setting up my environment on Windows 10. I have Python 3.6.2 x64 installed as my default Python distribution and is in my PATH so I can launch from cmd prompt.
I installed PyQt5 (pip install pyqt5) and Spyder (pip install spyder) which both installed w/out error and included all of the necessary dependencies.
To launch Spyder, I created a simple Python script (Spyder.py):
# Spyder Start Script
from spyder.app import start
start.main()
Then I created a Windows batch file (Spyder.bat):
#echo off
python c:\<path_to_Spyder_py>\Spyder.py
Lastly, I created a shortcut on my desktop which launches Spyder.bat and updated the icon to one I downloaded from the Spyder github project.
Works like a charm for me.
Try these commands in order
pip3 install spyder
spyder3
Try the command spyder3
If you check the scripts folder you'll find spyder3.exe
As stated in the documentation of Spyder, you need to install PyQt5 first.
Open a Command Prompt as Administrator, then run:
pip install pyqt5
pip install spyder
Then you can find the spyder3.exe in the Python3.6/Scripts folder. You can also make a shortcut to it. No need for Anaconda.
method 1:
spyder3
method 2:
python -c "from spyder.app import start; start.main()"
method 3:
python -m spyder.app.start
Open a command prompt. Enter the command spyder. Does anything appear? If an exception is preventing it from opening, you would be able to see the reason here. If the command is not found, update your environment variables to point to the Python3.6/Scripts folder, and run spyder again (in a new cmd prompt).
If you are using Anaconda execute the following commands and your life will be saved!
conda update qt pyqt
conda update spyder
In case if you want the desktop icon
In desktop, create a new shortcut, in Location paste this
%comspec% /k spyder3
then type the name Spyder,
Now you may have Desktop Icon for opening Spyder
After pip install spyder give this command
pip install --upgrade spyder
This command will update all Spyder dependencies.
Now in command prompt(cmd) navigate to the scripts folder in your python directory. In my system the path is C:\Users\win10\AppData\Local\Programs\Python\Python36-32\Scripts so i use the following command in command prompt.
cd C:\Users\win10\AppData\Local\Programs\Python\Python36-32\Scripts
once you are inside scripts directory type spyder3 and press enter and spyder ide starts.
C:\Users\win10\AppData\Local\Programs\Python\Python36-32\Scripts>spyder3
on windows,
pip install --upgrade spyder
in powershell, start python shell, by typing python
from spyder.app import start
start.main()
That't it.
Install Ananconda packages and within that launch spyder 3 for first time. Then by second time you just click on spyder under anaconda in all programs.