anaconda navigator won't launch after a conda install tkinter - python

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.

Related

keeping Spyder updated in Anaconda

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.

Update anaconda failed - Entry point not found

I have just tried to update my anaconda environment to the latest version and I am now receiving errors. I opened the conda environment as an admin, and the commands issued were:
conda update conda
conda update anaconda
First command finished fine. Second command produced error:
pythonw.exe - Entry Point Not Found
The procedure entry point ?PyWinObject_FromULARGE_INTEGER##YAPEAU_object##AEAT_ULARGE_INTEGER###Z could not be located in the dynamic link library c:\ProgramData\Anaconda3\pythoncom37.dll
I have found a reference to this sort of error that requires me to copy a file libssl-1-1-x64.dll from Anaconda3/Library/bin with the one from Anaconda3/DLLs.
How to Fix Entry Point Not Found while installing libraries in conda environment
However, I do not have that file, in the source location. Is there any commands I can issue to download this file again, or somewhere online I can safely download that one file from?
Got the same error, when updating conda.
However, the file pythoncom37.dll was located in C:\Windows\System32.
Turns out the file was a left-over from a previous update of Python 3.7.5 to Python 3.8,
i.e. not related to the installation of conda itself. My guess is that conda registered with Python 3.7 and then failed to use the dll from an incompatible installation.
Solution: Removed pythoncom37.dll and pywintypes37 from C:\Windows\System32.
I had the same problem while updating tensorflow and other packages using anaconda python3 with sublime text3.
To solve this, I've deleted all the pythoncom37.dll in directory shown from the error window.
Replacing the file from other directory did not work.
Also reinstalling conda, upgrading conda, reinstalling sublimetext3 or tensorflow did not help as well.
Given that there seem to be a lot of answers and some work for for different people with different setups, python versions and circumstances, a quick summary of things to try.
Go to [envpath]\Scripts and run py pywin32_postinstall.py -install to update the pywin32 dependencies
Copy both files found in [anacondaPath]\Lib\site-packages\pywin32_system32 to C:\Windows\System32
Install pywin32 with conda instead of pip with conda install pywin32
Force pywin32 to a particular version (e.g. 224 for Python 3.7) pip install --upgrade pywin32==224
Add \Lib\site-packages\pywin32_system32 to your path environment variables
Uninstall pypiwin32 and install pywin32. pip uninstall and pip install pywin32
Download the latest Visual C++ version and restart the computer (https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0)
Downgrade to e.g. Python 3.6 if possible for your purposes
If any of those worked, commenting which one in your case may be helpful to understand what works when:)
List item
Sorry all - the clue was in the error message. The entry on how to fix entry point led me in the right direction. but it was the pythoncom37.dll file I needed to copy.
That's what you get for blindly following instructions.
Many thanks.
When I had this error, it did not show a path for the entry point.
I tried reinstalling anaconda and it didn't resolve the issue.
I found the path by doing pip install win32, which stated the path to the library that was was in use. It turned out it was connecting to a corrupt roaming profile version, so renaming the roaming profile folder (to _OLD) resolved the issue.
Had the same problem as on the picture above, solved it using these steps.
removed the file pythoncom37.dll from the environment in question
removed the file C:\tools\Anaconda3\Library\bin\pythoncom37.dll
run conda install --force-reinstall nb_conda_kernels ipykernel
repeat per environment.
Be aware that this will also upgrade all environment packages in the active environment.
I had the same problem. But my virtual environments all worked okay, so I had a workaround:
Create a new virtual environment called 'env_base' with all standard anaconda packages
conda create -n env_base anaconda python=3.7
Activate it
conda activate env_base
Create the kernel
conda install -c anaconda ipykernel
python -m ipykernel install --user --name=env_base
Then use this virtual environment as the base jupyter notebook. You can replace your launch shortcut with the link for this one and it is as good as having the actual Jupyter notebook working with base packages.
It doesn't fix the problem, but it sidesteps it effectively.

How to Install a Package in PyCharm when project interpreter is set to conda, and the package is not provided/listed by conda?

I installed pycharm on my computer. I set the project interpreter to acaconda3/bin/python because that is the python3 interpreter I used on my computer before installing pycharm. I was able to install all packages I need using pycharm's package installer except for pydicom which is not provided by anaconda. However, pydicom, one of the packages I need for my project, is not provided by conda and hence does not show up in the list of available packages when I search.
How do I install this package that is not available with conda?
Open Anaconda navigator
Open environment from side tab
Open your environment which you created or choose the default( seems
in this case)
Choose Open in terminal
Run pip command here.
OR run pip by going to directory anaconda3/Scripts directory
Since pydicom is supported by conda-forge channel it wont show up on Pycharm unless you add that channel to conda environment channels manually.
Run below command for the environment
conda config --add channels conda-forge
Then it should show up in Pycharm.
Once channel added you can run below command within environment
conda install pydicom
Reference:
pydicom.github
conda-forge
so/using-anaconda-within-pycharm
Using PyCharm 2020.2 I can do this without going to the terminal or Anaconda.
Go to "Settings->Project->Python Interpreter" (same place as VictorLegros went, but the UI is different now: note the + button at the bottom of the list of packages)
Hit the + button, search for your package in the new dialog and then click "Install Package"
I double checked in the Anaconda UI afterward, and - after click on Update Index.. and waiting a bit (not 100% sure that was necessary, but I didn't see it at first) - I can now see the package "scikit-learn" that installed via PyCharm.
(Note: I'm not using Anaconda to do anything but verify: the search and installation was all in PyCharm)
I had this problem and I figured out that from the python interpreter dialogue I had to click the green circular Conda icon to disable "Use Conda Package Manager" (above the list of packages). Then when I clicked to add a package, I found all the packages I needed, which I presume were installed with pip.
I was also able to install packages that Conda needed to handle like psycopg2. Hope this helps.
I don't know if it's identical on the Mac, but for Win 10 Pycharm, you can access the Terminal from:
View > Tool Windows > Terminal (Alt+F12)
From there, make sure the correct conda environment is active through:
conda activate <your_env>
Then, you can install a package as one normally would typing in the command line, e.g.
conda install -c conda-forge <some_thing>
The exact command changes if you're using pip or some other manager or repository location, but it's helpful to do it this way if you want to stay in the IDE.
Also, you can verify the package in present in File > Settings > Project: ... > Python Interpreter
You should see your manually added package listed here, even though you didn't install it through the GUI.

Anaconda Installed but Cannot Launch Navigator

Anaconda (listed as "Python 3.6.0 (Anaconda 4.3.1 64 bit)" ) is in my programs and features list, but there is seeming no Anaconda Navigator desktop app, as their seems to be no icon on my desktop and I am unable to search for it through "Start". Could this be because I have the 32-bit version of Anaconda downloaded and I have a 64-bit OS (I thought I should do this because Python on my computer was 64-bit) or because I downloaded Anaconda under "users" instead of Desktop. I also downloaded Anaconda twice, if that could be causing some of the problem. I have a Windows 10 laptop, if that is any help.
Try to
source ~/anaconda3/bin/activate root
anaconda-navigator
https://github.com/ContinuumIO/anaconda-issues/issues/1580
Open up a command terminal (CTRL+ALT+T)
and try running this command:
anaconda-navigator
When I installed Anaconda, and read the website docs, they said that they tend to not add a file or menu path to run the navigator because there are so many different versions of different systems, instead they give the above terminal command to start the navigator GUI and advise on setting up a shortcut to do this process manually - if that works for you it shouldn't be too much trouble to do it this way - I do it like this personally
How I solved this issue:
1. Be connected to the internet.
2. Open the Anaconda Prompt (looks like a regular command window).
If you installed the .exe in your /name/user/ location you should be fine, if not navigate to it.
Then start an environment.
conda info --envs
Then run
conda install -c anaconda anaconda-navigator
Press y when prompted (if prompted). It will being downloading the packages needed.
Then run your newly installed Anaconda Navigator
anaconda-navigator
It should start, and also appear in your regular windows 10 apps list.
activate the virtual env with command:
conda activate base
run anacond anavigator
anaconda-navigator
when you will type anaconda in windows 10 search bar it will give you the list as
then in terminal you have to type anaconda-navigator as
it will start anaconda on your machine.
Yet another option which worked in my case on Windows 10: Try uninstalling your previous installation, restart the system and run the installation again. Make sure you don't start any programs before installing Anaconda. You will find the installation finishes without prompting any kind of errors.
Type in Anaconda in your Windows 10 Search bar. You will find Anaconda Prompt appear.
I figured out the reason as to why:
1-There seems to be no navigator icon
2-When conducting the above steps of running the "anaconda-navigator" command in prompt (whether cmd or Anaconda) it yields "anaconda navigator is not recognized as an internal or external command"
This was very frustrating to me as I'd installed the proper version multiple times with no avail.
To solve this problem :
in the installation process, there will be an advanced options step with 2 selections one of which is unchecked (the top one). Make sure you check it which will add the navigator to the path of your machine variables.
Cheers,
Hossam
it works :
export PATH=/home/yourUserName/anaconda3/bin:$PATH
after that run anaconda-navigator command. remember anaconda can't in Sudo mode, so don't use sudo at all.
I faced the same problem on Windows 10. As soon as I cleared my Path variable from edit environment variables option, the icon started to appear. It was occurring because I had previously installed python 3.6.1 on my computer and added it to my path variable as C:\Python36;C:\Python36\DLL; and so on. There isn't any need to uninstall Anaconda Navigator and start from scratch if you have correctly followed the steps mentioned at the documentation for it.
Try restarting the system! You will be able to find the navigator once you restart the system after installation.
Tried all solutions here but these 2 steps solved the issue:
1) manual update of open-ssl from here:
https://slproweb.com/products/Win32OpenSSL.html
2) update OpenSSL using conda update openssl command in the Anaconda Prompt
solved the issue!
I had a similar issue today where only the prompt was available after installation.
Finally solved this by un-installing my regular python installation and then install anaconda(anaconda 3 v5.2.0, with python 3.6).
I also have the issue on windows when i am unable to find the anaconda-navigator in start menu.
First you have to check anaconda-navigator.exe file in your anaconda folder if this file is present it means you have installed it properly otherwise there is some problem and you have to reinstall it.
Before reinstalling this points to be noticed
1) You have to uninstall all previous python folder
2) Check you environment variable and clear all previous python path
After this install anaconda
your problem will be resolved if not tell me the full error i will try to solve it
Uninstall your Anaconda, delete the folder where it was. Then reinstall it.
You might not be in a anaconda environment
Below is a link how to activate the environment from the official documentation
On Windows, in your Anaconda Prompt, run activate myenv
https://conda.io/docs/user-guide/tasks/manage-environments.html#activating-an-environment
And then run the anaconda navigator from the anaconda prompt by entering the command anaconda-navigator
100% Solved.
While Installing make sure you are connected to Internet.
If already installed anaconda, open the anaconda command prompt and type following command:
conda install -c anaconda anaconda-navigator
(internet connection is required)
Note: In some cases restarting may solve the issue of navigator.
This is what I did
Reinstall anacoda with ticked first check box
Remember to Restart
I have that error an the solution was to install the Win64 OpenSSL.
https://slproweb.com/products/Win32OpenSSL.html
Download and install Miniconda first from this link and later on download and install Anaconda. Then you will be able to see the navigator in your all programs list in the start menu. I hope this will help you. Let me know in case of any concerns.
In my case; it was available in the anaconda folder in "All App" from main menu
For people from Brazil
There is a security software called Warsaw (used for home banking) that must be uninstalled! After you can install it back again.
After thousand times trying, installing, uninstalling, cleanning-up the regedit that finally solved the problem.
First Run This Command
conda config --set auto_activate_base True
Then Run This Command
anaconda-navigator.
Turn off your internet connection, then open your terminal and type anaconda-navigator or type anaconda prompt in the search bar and double click on the anaconda prompt.
If anaconda is opened, then you can turn on your Wi-Fi.
I'm also faced with this issue. When I checked conda --version got a command not recognized error. Then I set the environmental variables as in https://stackoverflow.com/a/61372328/13370201. After that run anaconda navigator command. Then it started to initializing anaconda navigator.This tutorial also help for me.
I faced the same problem in Solus Baidge but I solved by activating the conda environment.
First activate
conda activate
Then run the navigator
anaconda-navigator
Make sure to run the installer as admin
In my case (Windows 11) it was a permission problem. Make sure to run the installer as administrator. You can check this by modification of the path in the installer process.
Further steps to handle the problem:
Uninstall your actual anaconda version.
Delete old Data found in:
C:\Users\YourUsername\AppData\Roaming
C:\Users\YourUsername
(In my case it was called .anaconda and .conda folder)
Restart PC
Install Anaconda as admin
The followng command solved my issue.
pip install --upgrade pywin32==228
On windows 10, I faced the same error - only Anaconda Prompt was showing in the startup menu. What I did is i re-installed Anaconda and selected install for all users of the pc (in my initial installation I have installed only for current user).
What finally worked for me was:
Uninstalling Anaconda
Deleting all files that has "conda" in them - most of them should be
located in: C:\Users\Admin
Delete especially the "condarc" file.
Reboot
Installed 32-bit installer (even though my system is 64-bit) and reboot
Finally worked. I have not yet re-tried with 64-bit installer, since I have a time critical project, but will do when again I have spare time.
P.S. what broke Anaconda for me was a blue screen I got while updating Anaconda. I guess it did not clear all old files and this broke the new installs.
I too faced a similar issue when I was not able to find the Anaconda Navigator Desktop app in the start menu. But do not worry , Go to start Menu and Type Anaconda Navigator. Now within the apps menu you will find anaconda navigator with its icon. Click on that. After clicking you will find a command prompt dialog opened and a .exe file runs on your machine. Wait till it completes.
The Anaconda Navigator app opens on your machine.

spyder/juypter not working after downgrading python

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.

Categories

Resources