I had to download my python version from 3.5 to 3.4 because one of the packages I needed wasn't supported in 3.5. I downgraded the python version using the conda command prompt, and everything worked fine - got my package to install with all its dependencies and no conflicts. But now when I try to open Juypter notebook or Spyder, nothing happens. My IPython works just fine. I'm thinking maybe i have to downgrade Juypter and Spyder, but I'm not sure. Anyone have any ideas?
After a day of searching I finally figured it out.
I initially used
conda install python=3.4
Bad idea - ended up having to do a fresh install of anaconda to get spyder and juypter working again.
What ended up working is creating a separate environment.
conda create -n py34 python=3.4 anaconda
activate py34
... then install packages ...
This added spyder(py34), juypter(py34), and all its "py34 brothers and sisters" to my start menu. Using these new shortcuts/environment, I now have access to the packages I need by choosing the appropriate short cut. Yes, my start menu has extra python shortcuts now, but whatever - it works.
Just make sure Make sure you install the packages you're looking for before you close the anaconda console. Perfect for installing theano dependencies mingw and libpython.
Related
I updated my Spyder today to Spyder 5.1, and now it keeps showing me this error message:
Your Python environment or installation doesn't have the spyder‑kernels module or the right version of it installed (>= 2.1.0 and < 2.2.0). Without this module is not possible for Spyder to create a console for you.
You can install it by running in a system terminal:
conda install spyder‑kernels=2.1
or
pip install spyder‑kernels==2.1.*
I already tried both commands, the pip one works but I still get the error message, the conda command does not even work and shows me
The following packages are not available from current channels
Normally I use conda for all packages that are availabel on conda, so maybe someone faced the same issue?
Version 2.1 is only available through Conda Forge at this time. Try
conda install -c conda-forge spyder-kernels=2.1
So far I've had to remove spyder-kernels from any env from any env that has it before I'm able to get it to install on any other env. I'm using conda. It seems I can't have more than one env available for use without constantly swapping where spyder-kernels is installed. This is the case for Windows 10 and MacOS. The spyder docs say to just ignore the issue - and that it was allegedly fixed by now - but I don't know how to ignore an error that makes it impossible to start a python console.
Correction: After erasing all envs and starting over from scratch (zero envs), I am now able to install spyder-kernels on multiple newly-created envs and each one functions in console without an issue.
have Anaconda installed on a win-10 box and I am using Spyder 4.1.5
to sume up: need to get more insights on how to keep VSCode and Spyder updated .. Can i do that via Conda!? Look forward to hear from you.
well i Would like to update Spyder to the latest version, so I went through the commands:
conda update conda
conda update anaconda
conda update spyder
They all ran without errors, but the spyder version didn't change - this is command I'm using to launch:
Well - i allways thougth that if we want to update Spyder in the root environment, then the following command conda update spyder works
If we want to update Spyder for a virtual environment we have created (e.g., for a different version of Python), then conda update -n $ENV_NAME spyder where $ENV_NAME is our environment name.
how to indicate what is going on here?
should i run conda update anaconda before updating spyder.
well - i thought that i have to make sure i am in the base directory.
here conda install spyder should work.
I have tried also this: conda install spyder=new_version_number.
new_version_number should be in digits.
btw: i had a view on the official docs here: code.visualstudio.com/docs/python/debugging.
In brief, i tried the 'Add Configuration' Button. But i guess i have a screwd up installation &/ configuration.
do i need these steps too!?
How to activate conda environment in VS code
https://medium.com/#udiyosovzon/how-to-activate-conda-environment-in-vs-code-ce599497f20d
Efficient Way to Activate Conda in VSCode
https://medium.com/analytics-vidhya/efficient-way-to-activate-conda-in-vscode-ef21c4c231f2
update: its obviousliy the Anaconda-channeling-thing that stands sometimes in the way. - at least in regard of spyder-updates
cf. Why is Conda not installing/updating the latest version of Spyder?
Why is Conda not installing/updating the latest version of Spyder?
But those bug reports and "solutions" were made one year ago. Spyder
is on later versions now. Why is conda still installing Spyder version
4.0.1, with all the issues, one year after 4.0.1 is known to be problematic? Why does it not update correctly to any later version?
The latest version is supposed to be 5.0.0, with even 4.2.* rolled out
before that.
The problem is with the Anaconda channel.
I uninstalled Spyder and then install with the line:
conda install spyder and Spyder 5.0.0 was successfully installed.
Anaconda's Spyder page (https://anaconda.org/anaconda/spyder) gave the
command as:
conda install -c anaconda spyder which led to the installation of
Spyder 4.0.1, instead of 5.0.0 which was what it was supposed to
install as documented on the page itself.
note: i will have a closer look if this behavior is the same - in regard of updating the VSCode!?
update:
i guess that i have to take care for the following steps
• Check and test conda is installed and available
• see if i need an Update conda if necessary
• Create the great virtual environment
• Activate a virtual environment - with all the tests that we can apply now
to sume up: need to get more insights on how to keep VSCode and Spyder updated .. Can i do that via Conda!? Look forward to hear from you.
Visual Studio Code has an auto-update for Windows and Mac:
Quote from vs code faq:
... By default, VS Code is set up to auto-update for macOS and Windows users when we release new updates. If you do not want to get automatic updates, you can set the Update: Mode setting from default to none.
To modify the update mode, go to File > Preferences > Settings (macOS: Code > Preferences > Settings), search for update mode and change the setting to none. ...
Regarding anaconda, your commands seem fine.
conda update conda
conda update spyder
Should work. Just make sure you have activated your environment.
For more info on conda updates, please refer to official page.
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
I recently created a new Anaconda (Windows) environment in order to move from tensorflow 1.2 to tensorflow 2.0. My base environment is 1.2, and I created tensorflow-20 in order to install the new version. I did the install from the anaconda command line within the (tensorflow-20) environment. But now everything is messed up.
Now, in Anaconda Navigator, it still shows Tensorflow 1.2.1 as the installed version for base. But in the (base) environment from the Anaconda command line, it shows the version as 2.0.0. Furthermore, in Anaconda Navigator, tensorflow-20 shows no installed packages, including python even.
I feel like I'm fundamentally misunderstanding something here. Can anyone provide some guidance?
How did you install tensorflow 2.0 in the new conda env?
IF with pip, run 'where pip' see if you are using the pip installed
in the base env. You can run 'conda create -n tensorflow-20 pip' to get a pip installed in the new env. Then activate tensorflow-20 and install tensorflow 2.0 with pip.
IF with conda, run 'where conda' to check the same thing.
Preface:
If you install Anaconda on your local machine, it makes sense to install it as Admin. However, if this is not possible, e.g. on an enterprise-managed computer, you must carefully check to use only folders where your user has write permission.
Contribution:
After having experienced a cracked-up package management, I read deeper into that topic. Best Practise: Always try to install everything via conda / Anaconda and best possibly from their central repositories.
If you have a special package, which is e.g. built by local software developers and not published, you can install it from the .tar archive. At that point, I am referring to following documentation: https://docs.anaconda.com/anaconda/user-guide/tasks/install-packages/
I have been using conda and anaconda for a few weeks without any issue (with pythonv 3.6).
However since I installed tkinter I cannot open the anaconda navigator nor spyder anymore.
If i do it from the menu then nothing happend, if I try from the anaconda prompt, it does not work and windows says that python stopped working.
The same thing happened yesterday so I unistalled everything and reinstalled anconda from scratch this morning.
Everything worked perfectly and the navigator launched. So I then reinstalled tkinter, and the same bug
as yesterday happened, I cannot open the anaconda navigator anymore.
Installing tkinter also dowloads certifi, and this may be issue (based on what I read from other thread).
Before installing tkinter I did update all, update conda and update anaconda navigator.
Here is the link to github issue I just opened, but I never posted there so I am not sure if I posted at the right place or in the tigh way. So I figured i would post here too.There is complete description of my conda environment there as well as the output from when I installed tkinter.
https://github.com/conda/conda/issues/7209
Let me know if you need more information or if I should rewrite everything from github, but it will be a long post then...
As you can see from the output of your conda install command, when you try to install tkinter into your root conda environment a number of packages already installed there need to be downgraded in order to be compatible with tkinter. This is almost certainly what then causes problems with launching Anaconda Navigator.
Instead of installing new packages into the root conda env, you should create a new one and specify the packages you want to use there:
conda create -n myenv tk python
where myenv is the name you choose for your new environment and tk python is the list of packages you want to install - you can add any further ones to this list or install them later. (Usually you don't need to specify python itself as most packages are dependent on it, but it appears tk isn't one of them.)
To use the new environment, you then need to activate it, and/or make sure your IDE is configured to use the Python interpreter for that environment - see the conda docs for more help.