Problem running Spyder 4.0.0+ on a New Environments on Anaconda - python

Windows 10 - 64x.
I am new to Python as well as to Anaconda. I downloaded what I believe is the latest version of Anaconda from the official webpage, and I wanted to create a new environment for a new project for which I need Spyder.
Every time I try to launch Spyder, the program doesn't respond and I get the following error:
[16748:16200:0331/091204.775:ERROR:broker_win.cc(59)] Error reading broker pipe: The pipe has been ended. (0x6D)[3424:6876:0331/091204.775:ERROR:broker_win.cc(59)] Error reading broker pipe: The pipe has been ended. (0x6D)
Please note that in the "base" environment i managed to make Spyder work just using the command:
conda update anaconda
after which version 4.0.1 of Spyder is running smoothly. Still, I cannot make the same version working on any other new environment I create. Neither the following Spyder versions work.
Please help!

Related

Python command prompt very slow to appear (Anaconda)

I've lately noticed an increasing lag when I fire up the CMD window to run python.
Immediately after entering "python", I see the python version info, but instead of the command prompt (>>>) I just get a blinking cursor (not showing in screenshot). After what's now become a couple of minutes, the command prompt finally appears, and I can run python code as usual.
When this happens, the CPU on my little work laptop is clearly under heavy load, the fan goes way up.
I have basically the same setup on my home PC (still with the older Anaconda and python 3.7) and never had any problems like this.
I was running python 3.7 in Anaconda on Windows 10. I just do simple scripts, copy and paste the code in a terminal window. In my original version, I had the base env + one clone, both had this problem.
I tried updating conda and anaconda but nothing changed. I thought it might be some dependency conflicts (I had recently pip-installed a couple of heavy-ish packages into my clone env: pytessearct and openpyxl), so I finally uninstalled Anaconda and reinstalled the latest version (Anaconda3-2020.07-Windows-x86_64 with python 3.8) with the standard packages, and I still have the same problem.
One related clue: Anaconda Navigator was also hecka slow to load. I tried disabling SSL verification per this thread (Anaconda navigator VERY slow) but it had no effect on the time delay for the python command prompt. But with the fresh install, Navigator now loads normally.
In my new install, I did the same setup, base + clone, both with the standard Anaconda package set, no add-ons, I still have the same problem in both envs.

"r.start is not a function" Fermipy Conda Error

I've been using the Fermipy conda environment on Python 2.7.14 64-bit on macOS Catalina 10.15.5 and overnight received the error "r.start is not a function" when trying to connect to the Jyputer server through Vscode (if I try on Jupyter Notebook/Lab the server instantly dies). I had a bunch of clutter on my system so I ended up formatting it and reinstalling all the dependencies needed (such as Conda through Homebrew, Fermitools through Conda and Fermipy through the install script on their site), but still get the same error, although I was previously running python scripts just fine. It gives me no other error or output, if it did I would attach it here. This is the error I get.
Edit: I get the same error using any version of Python 2.7.XX and not for python 3.7.XX.
As answered here, https://github.com/microsoft/vscode-python/issues/12355#issuecomment-652515770
VSCode changed how it launches jupyter kernels, and the new method is incompatible with python 2.7.
Add this line to your VSCode settings.json file and restart.
"python.experiments.optOutFrom": ["LocalZMQKernel - experiment"]
I got the same message. (r.start is not a function.) I had an old uninstalled version of anaconda on the computer which had left behind a folder containing its python version. Jupyter was supposed to be running from new venv after setting both python and jupyter path in vscode. I fully deleted remaining files from old anaconda install - message went away and notebook ran fine. Maybe try getting rid of all conda stuff and pip install jupyter and anything else you need.

Pycharm stopped showing output after i changed the project interpreter to Anaconda3

I used to work with Pycharm and it was working pretty well till the time I changed the Interpreter to Anaconda3. From then onwards whatever I ran gave me no output on the console window.
The console window is just showing this:
Process finished with exit code 0
There is something wrong but I am unable to find it.
Check if Anaconda is setup properly, validated by opening the terminal within pycharm and checking say for the version of a package that you have installed as part of Anaconda, like I have installed Django as part of virtualenv. I tested that the environment is active in the terminal and tested the version of Django. eg: python -m django --version This gave me the version that I expected - 11.3.
Also this is a site from Anaconda that shows how to get the Anaconda configured for Pycharm, just incase you need it.
https://docs.continuum.io/anaconda/user-guide/tasks/integration/pycharm

Spyder IDE environment in Python

I am currently using Spyder and have been for a long time, however I downloaded anaconda recently and started using Spyder for Python 3.5 which gives me several problems.
Whenever I run a script in the Python Console, I have to run it twice and then when I am finished running it and want to run a new I have to kill the current process and reload it.
I am currently using some scripts with threading, but that never used to be a problem before I upgraded, anyone have similar experiences and know how to fix it?
(Spyder developer here) We're aware of these problems in the Python console, but unfortunately we don't know how to fix them.
Please use the IPython console instead because the Python console is going to be removed in Spyder 3.2.
I observe some problems of users about Spyder Console.Effective example for solution;
via Anaconda prompt:
conda create -n spyder-env spyder=4
conda env list
conda activate speder-env
spyder

"conda" command returns "failed to start process" after updating Continuum Anaconda

I had a working version of Anaconda 2.3 on my Windows 10 PC. (I use PowerShell as my preferred command line interface.)
After updating to Anaconda 2.4, any command using conda or anaconda resulted in the message failed to start process.
I tried and uninstalling, redownloading and reinstalling, and even tried reverting to 2.3. Nothing worked!
Starting to get desperate, I eventually found the solution: I used python to run the script conda-script.py, which is apparently what the command conda.exe runs when called:
python PATH_TO_ANACONDA\Anaconda3\Scripts\conda-script.py
(Here, I'm using PATH_TO_ANACONDA to represent the directory in which the Anaconda3 folder resides on my particular system.)
Thereafter, both conda and anaconda commands work perfectly, and continue to work. (e.g. No need to repeat the process every time I launch PowerShell.). But I have no idea why the problem occurred, or why that happened to be the solution.
If you know, please reply. If not, I just hope this solution saves others an hour or so of frustration.

Categories