Can't launch Spyder after installing with pip - python

Python beginner here. I would like to use Spyder as my Python IDE. Alas the standalone version does not include pip and I want to work with "Vanilla Python" rather than Anaconda. So I installed Spyder via
pip install spyder, which works fine. However, when running spyder3 in the command window, nothing happens. I get no error, but Spyder does not launch either. While the Spyder website says custom installation may be tricky, it does not provide a guide on how to get it done. Does someone know how? OS is Windows 10.

you need to follow this commands:
python -m venv spyder-env
spyder-env/Scripts/activate.bat
pip install spyder
more info

Update: Tried again with Python 3.10.4. "spyder" now exists in the Scripts folder and does launch when typing spyder in cmd. Works for me now.

Related

python, anaconda, Spyder -- uninstalling python package using pip DOES NOT work in Spyder + ipython

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.

Cannot run Nuitka in Windows

I downloaded Nuitka from http://nuitka.net/pages/download.html ( http://nuitka.net/releases/Nuitka-5.1.281.win-amd64.py36.msi ) and installed it. The installation ran all right without any errors. Python 3.6 is installed on the computer. However, I now cannot find Nuitka's folder and it is also not there on start menu. It is also not found as a command when typed at command prompt.
Where is the problem and how can it be solved? Thanks for your help.
If the Windows installer isn't working for you, you can always try pip install nuitka, which I've run successfully using Anaconda on Windows 10.

How to start Spyder IDE on Windows

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.

Ambiguity on Python Installation

So I am new to Python and installed it using guidelines from various websites, as I want to try basic examples before moving on the advanced python concepts. Below is my understanding and installation tasks that I performed.
1) Installed Python 2.7 form the website.
2) Installed Anaconda as I read that it has pre installed libraries.
3) Downloaded pip file and ran it on the Python interpreter and it was done successfully, but when I try using pip install ipython , it throws an error saying pip is not defined.
4)Now I downloaded Pycharm as a IDE, done successfully.
5) Programs run perfectly, but I see many instances of Ipthon on every related website and I am not able to understand if I need it. Ipython is used for web I guess but I really don't understand how to integrate everything. Please guide me.
Thanks in advance.
If you are using windows, pip error is probably related to environmental variables not being set.
See this answer for details on pip
Adding Python Path on Windows 7
response to comment
Ipython is not necessary, but it will make life easier. I use command prompt and am not familiar with installing packages with Pycharm or anaconda.
If Pip is installed, and the Windows environmental variable is not set, you can still use pip.
1) open a windows command prompt as administrator
2) navigate to your python installation ( default Directory is C:\Python27 )
3) navigate to scripts folder (default dir C:\Python27\Scripts)
4) type 'pip'
5) type 'pip freeze' to see packages installed with pip. Note: pip does not keep track of packages installed with conda
If you were able to complete those steps, changing the PATH variable to include the scripts directory will allow you to run pip by simply typing 'pip' from anywhere.
To install Ipython:
From command prompt with administrator rights:
'pip install ipython[all]'

Installed Spyder using pip under Canopy (OSx), how do i start Spyder?

I am on a machine running Yosemite. I manage my python environment with Canopy Enthought. I'm trying to install Spyder, so I don't have to use the Editor that comes with Canopy.
I opened a Canopy terminal and used pip install spyder which went fine.
How do I actually start Spyder? When I use pip list I can see the Spyder package.
spyder
spyder.py
python spyder.py
ect. does not work.
Thanks in advance.
python -c "from spyderlib import start_app; start_app.main()"

Categories