I'm using Windows 10 and I have my Spyder executable linked to my Start button. I used to be able to click the Spyder icon and launch the executable and Spyder would start. Now, for some strange reason, I have to launch Anaconda Prompt and type 'spyder' into the cmd window. Then, and only then, I can launch Spyder. Here is the path, from the Spyder properties.
If I right-click Spyder and click Properties, I can see the target is set to this:
C:\Users\Excel\Anaconda3\pythonw.exe C:\Users\Excel\Anaconda3\cwp.py C:\Users\Excel\Anaconda3\envs\spyder C:\Users\Excel\Anaconda3\envs\spyder\pythonw.exe C:\Users\Excel\Anaconda3\envs\spyder\Scripts\spyder-script.py
How can I reset this to work like it did before? I'm guessing there is a way to do it through Anaconda, or maybe there is a setting somewhere on Spyder. A point in the right direction would be greatly appreciated.
After a bit of playing around I got this to work.
1) Open the Anaconda Command Prompt (as administrator)
2) Execute "C:\Users\...\Anaconda3\pythonw.exe" "C:\Users\...\Anaconda3\Lib\_nsis.py" mkmenus
Related
Through some wizardry I cannot recall, I managed to install and implement Jupyter Notebook with an icon that opens Jupyter directly in browser
I am occasionally asked how I did this. However, and slightly emparisingly, I cannot remember how I did this and am unable to help. I cannot seem to recreate this Jupyter Icon in any other set up
Also, in attempting to recreate this Icon, I somehow managed to implement two Anaconda Prompts, Anaconda PowerShell Prompt and Anaconda Prompt
What is the difference between the two? Which one should I remove?
I somehow managed to implement two Anaconda Prompts, Anaconda PowerShell Prompt and Anaconda Prompt
That is standard. The first Anaconda Prompt, will open the legacy cmd configured for conda. The second will open a powershell configured for conda. SO just keep both and use the one you are more comfortable with.
How to open jupyter notebook from Windows 10 task bar
Simply search for jupyter in the start menu and select Pin To Taskbar
Creating it manually
In case the above does not work, then you can manually create a shortcut and pin it to the taskbar. For that, we will need two paths, which for me are these:
pathBase=C:\Users\FlyingTeller\miniconda3 #main folder of miniconda (or anaconda)
pathEnv=C:\Users\FlyingTeller\miniconda3\envs\py37 #Folder of the environment where jupyter notebook is installed
Then you do the following steps:
Right Click on Desktop->New->Shortcut, enter as target path:
<pathBase>\python.exe <pathBase>\cwp.py <pathEnv> <pathEnv>\python.exe <pathEnv>\Scripts\jupyter-notebook-script.py "%USERPROFILE%/
replacing the paths with the ones from above. Save the shortcut and then do Right Click->Properties.
Now you can change the Start In directory to wherever you want the notebook to start. Additionally, you can change the icon to the jupyter icon, which is in
<pathEnv>\Menu
Now you have
A shortcut to start the notebook on your desktop
The possibility to simply do Right Click-> Pin to Taskbar for that Shortcut
Search for Anaconda Navigator in your computer then Right Click and Select "Open file location".
In the folder that is opened you can find shortcuts of programs that are installed via anaconda. You can copy and paste them anywhere you want.
I installed Anaconda 3. After Install I reboot the computer but, when I opened Anaconda Navigator, this keep happening, first this CMD window appears Conda.exe
and then this window appears gpython.exe
Before reboot, everything fine, I could open Anaconda Navigator. After reboot, (insert Billy Butcher from the Boys) BOOM, this happen.
This also happens everytime I type "conda" on the command prompt,with the python interpreter (second picture) keep appearing. So pretty much any solution on the internet that told me to use "conda" doesnt help.
Also this happens to every Anaconda Application (Anaconda Prompt, Anaconda Navigator).
I believe that whenever you launch anaconda conda.exe will run, at least it does for me.
Regarding gpython.exe, I could only find the following question referring to it
Django error: Command throws a python window when executing makemigrations command in a Python/Django project
This makes it seem like your anaconda may require a reinstall, I checked my anaconda files and couldn't find a gpython.exe in the path where yours appears, so this may be the case. Hope this helps.
I use to have idle. Then I downloaded Anaconda and opened idle through there. I have not used idle for a while but just recently went to go open it up and use it again. However, it seems I no longer have idle on my computer, to my understanding I can still get to idle through Anaconda but I forgot how. Is there a way to open idle through Anaconda without re-downloading idle? If so what command can I use to pull Idle up?
Search for this folder "idlelib" in the Lib folder of the Anaconda version you have installed and you will find idle (check its file type: "compiled python file").
Pin it to your taskbar and run.
You are looking for C:\... <\> ...Anaconda3\Lib\idlelib\idle.bat
There is also C:\ ... <\> ...Anaconda3\Scripts\idle.exe which seems to run a little smoother, but there has to be a Command Prompt open in the background to run. ... ?
Navigate to your Anaconda3 installation folder. Yours could be anywhere, mine is at "C:\ProgramData\Anaconda3", but I installed for all users and you could have selected a random location on your drive. If you managed to add it to the environment variables you could easily find it by running the Command Prompt (not Powershell - has to be Command Prompt) and typing where conda or where anaconda and pressing enter. You should find a folder named Anaconda3 or something of that nature.
If you navigate to this folder, and within it find the "Anaconda3\Lib\idlelib\" folder, within it there is a file called "idle.bat". If you find this "Anaconda3\Lib\idlelib\idle.bat" file you can double click it to run IDLE, although it may be a little messy/outdated/glitchy/strange since you are updating all kinds of folders within Anaconda and some of them may have helped idle.bat run. Mine has a the spyder icon associated with it in the task bar and a blotted out IDLE icon in the top left corner for some reason. You could of course run the full path in command prompt as well if you already know where it is, for instance I would run...
C:\Users\Thomas>C:\ProgramData\Anaconda3\Lib\idlelib\idle.bat
~or~
C:\Users\Thomas>C:\ProgramData\Anaconda3\Scripts\idle.exe
--> It may be easier to just download a new version of Python side by side with Anaconda to run IDLE. I have been attempting to set a shortcut in the Start Menu that runs from anaconda properly for days and have failed. This way, there should be a right click>'run with IDLE' option for python files.
I believe the tilde slash (~/) was meant to imply your home directory since that is what it signifies on a linux machine, but seeing as you could have put it anywhere on the machine, even directly on the C:\ drive, maybe he meant 'unknown file path'.
If you are running MacOs (currently I am on Catalina - MacOs10.15) it is quite simple to run IDLE from Anaconda environment:
Launch Anaconda
Go to MacOs Terminal.
Type IDLE3
warning: if you type IDLE, the Python 2 IDLE will be opened ... but if you are using Python3 installed with Anaconda ... it doesn't work properly.
I am trying to reset the interface I have tried to misaligned.
I couldn't find it in settings. I have also tried uninstalling and reinstalling it. No luck.
Can you help me to reset it?
Thanks.
(Spyder-dev here)
We will include a way to reset spyder configuration from within the user interface in the upcoming version (3.0.0).
In the meantime you can reset by opening a terminal window (cmd in windows.. shell in Mac/Linux) and typing
spyder --reset
If that still does not work you can erase the folder .spyder in your user folder
Windows
X:\Users\username\.spyder2\ (or X:\Users\username\.spyder\)
Linux
\home\username\.spyder2\ (or \home\username\.spyder\)
I'm using Spyder 3.1.2
Just go to View → Window Layouts → Reset to Spyder default.
For anyone, who has problem restoring the defaults settings,
Open Terminal and type:
rm -r ~/.spyder
I am using Spyder 2.3.9.
I was able to reset the windows using View->Reset Window Layout.
The original post could be on older version, where this option did not exist!
Tools >> Reset Spyder to Factory Defaults. Tested on Spyder 3.1.4
I found a way arround this problem( works for me )
I had the issue that there were 2 seperated windows(I tried to reset the view but it didnt work) and I couldn´t move one of them.
My way arround it was to drag the non movable window a bit bigger(I tried to change its size) then that window became movable for me and I could drag it into the other to get the default view again.
Maybe it works for somebody aswell, just wanted to share.
(3.2.4)
You only need update your Spyder version using this command on Anaconda Prompt
pip install -U spyder
It's has fixed on my IDE.
If you can't fix delete your Spyder folder (.spyder-py3) in your directory like : C:\Users*Your-User*
Do following steps
View->Reset Window Layout.
Also do not forget to restart the application. It was not worked for me without restart.
I hope it should work for you.
If still this not work you can do Tools->Reset Spyder for factory default.
I'm using Anaconda Navigator and Spyder 3.3.2. Open Anaconda Prompt, then type:
spyder --reset
To open Anaconda Prompt in Windows: Click Start, search or select Anaconda Prompt from the menu.
On my mac I am trying to make a Python script open by default in the Python Launcher.
I left click on the script and select "open with" and select the Launcher. Every-time I do this Terminal pops up, the Launcher window appears briefly. Then a messages pops up in a window: "Python Launcher can only run certain scripts try another."
Something along those line (the message has stop popping up since the first time I tried it but the script still doesn't run). I tried everything, GUIs, and basic scripts (like print "Hello World"). None work!
I tried doing the same thing on other computer and I get the same problem. What am I doing wrong ?
Does your script use a shebang line:
#!/path/to/executable/python2.6
And does it have execute permissions?
chmod +x path_to_file.py
It should run OK like this.
Assuming you're talking about Anaconda, Launcher is now deprecated, so your approach will have to change anyway. It has been replaced by Navigator.
Make sure you have updated Anaconda within terminal using
conda update conda
Then, you can install Navigator with
conda install anaconda-navigator
You will see a new icon show up that functions much the way Launcher used to. Your script will now have to be tied to it instead of launcher, assuming you figured that out with previous commenters' help.