Anaconda navigator not launching windows 10 (Spyder as well) - python

I installed the anaconda 64 bit on windows 10. I can launch the prompt but when I try to open navigator thru the icon or thru prompt, I'm getting the error below. Can someone help me?
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\anaconda-navigator-script.py", line 10, in <module>
sys.exit(main())
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\app\main.py", line 103, in main
from anaconda_navigator.app.start import start_app
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\app\start.py", line 34, in <module>
from anaconda_navigator.widgets.main_window import MainWindow
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window.py", line 37, in <module>
from anaconda_navigator.utils.analytics import GATracker
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\utils\analytics.py", line 44, in <module>
from anaconda_navigator.external.UniversalAnalytics import Tracker
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\external\UniversalAnalytics\Tracker.py", line 28, in <module>
from six.moves.urllib.request import (HTTPSHandler, Request, build_opener,
ImportError: cannot import name 'HTTPSHandler' from 'six.moves.urllib.request' (unknown location)
Also, Spyder is also not launching. I can launch Jupyter and prompt.

I tried to install the Anaconda (Python 3.7 version) on Windows 10 and I was facing the following error:
(base) C:\Users\***>anaconda-navigator Traceback (most recent call last): File "C:\Users\***\anaconda3\Scripts\anaconda-navigator-script.py", line 10, in <module>
sys.exit(main()) File "C:\Users\***\anaconda3\lib\site-packages\anaconda_navigator\app\main.py", line 103, in main
from anaconda_navigator.app.start import start_app File "C:\Users\***\anaconda3\lib\site-packages\anaconda_navigator\app\start.py", line 34, in <module>
from anaconda_navigator.widgets.main_window import MainWindow File "C:\Users\***\anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window.py", line 39, in <module>
from anaconda_navigator.utils.analytics import GATracker File "C:\Users\***\anaconda3\lib\site-packages\anaconda_navigator\utils\analytics.py", line 44, in <module>
from anaconda_navigator.external.UniversalAnalytics import Tracker File "C:\Users\***\anaconda3\lib\site-packages\anaconda_navigator\external\UniversalAnalytics\Tracker.py", line 28, in <module>
from six.moves.urllib.request import (HTTPSHandler, Request, build_opener, ImportError: cannot import name 'HTTPSHandler' from 'six.moves.urllib.request' (unknown location)
I did the solution explained here and it worked.

Error printed is related to ssl library and its natural for people to go and try reinstalling openssl library. But to fix this below steps have to be followed. Just now tried and confirmed this is working.
Copy the following files:
libcrypto-1_1-x64.* (.dll and .pdb files)
libssl-1_1-x64.* (.dll and .pdb files)
From D:\Anaconda3\Library\bin to D:\Anaconda3\DLLs.
Same issue is described in anacondas github page.

For me it works after installing "Win64 OpenSSL v1.1.1d Light"

Related

Error using cx_freeze with a feedparser import: ModuleNotFoundError: No module named 'sgmllib'

I am trying to use cx_freeze to freeze an app that uses Feedparser. The app works perfectly if I launch it from the command line using python. However, when I try to freeze it using cx_freeze, I don't get an error until I try to launch the app. Then I get:
Traceback (most recent call last):
File "/home/ricky/.local/lib/python3.9/site-packages/cx_Freeze/initscripts/__startup__.py", line 66, in run
module.run()
File "/home/ricky/.local/lib/python3.9/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run
exec(code, m.__dict__)
File "main.py", line 8, in <module>
File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/__init__.py", line 28, in <module>
from .api import parse
File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/api.py", line 36, in <module>
from .html import _BaseHTMLProcessor
File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/html.py", line 31, in <module>
from .sgml import *
File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/sgml.py", line 30, in <module>
import sgmllib
ModuleNotFoundError: No module named 'sgmllib'
I know sgmllib is no longer used in Python 3, but since I don't get this error when I launch it from the command line it doesn't seem to be a feedparser issue. Any thoughts?
The cx_Freeze developer helped me with this same issue on Github. Here's the thread.

ImportError: cannot import name 'HTTPSHandler' from 'urllib.request' for windows

I found 0 topics about this issue for Windows, only for Ubuntu, MAc etc.
When I try to install any package via Pycharm, e.g. urllib, matplotlib, heidi, I get the exact same error message as below.
Project interpreter is Anaconda Python 3.7.
Any idea how this can solved?
Error: Traceback (most recent call last):
File "E:\Download\PROGIK\Charm Community Edition 2018.3.5\helpers\packaging_tool.py", line 73, in run_pip
runpy.run_module(module_name, run_name='__main__', alter_sys=True)
File "E:\Download\PROGIK\Anaconda\lib\runpy.py", line 201, in run_module
mod_name, mod_spec, code = _get_module_details(mod_name)
File "E:\Download\PROGIK\Anaconda\lib\runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "E:\Download\PROGIK\Anaconda\lib\runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "E:\Download\PROGIK\Anaconda\lib\site-packages\pip\__init__.py", line 15, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "E:\Download\PROGIK\Anaconda\lib\site-packages\pip\vcs\subversion.py", line 9, in <module>
from pip.index import Link
File "E:\Download\PROGIK\Anaconda\lib\site-packages\pip\index.py", line 30, in <module>
from pip.wheel import Wheel, wheel_ext
File "E:\Download\PROGIK\Anaconda\lib\site-packages\pip\wheel.py", line 35, in <module>
from pip._vendor.distlib.scripts import ScriptMaker
File "E:\Download\PROGIK\Anaconda\lib\site-packages\pip\_vendor\distlib\scripts.py", line 14, in <module>
from .compat import sysconfig, detect_encoding, ZipFile
File "E:\Download\PROGIK\Anaconda\lib\site-packages\pip\_vendor\distlib\compat.py", line 66, in <module>
from urllib.request import (urlopen, urlretrieve, Request, url2pathname,
ImportError: cannot import name 'HTTPSHandler' from 'urllib.request' (E:\Download\PROGIK\Anaconda\lib\urllib\request.py)
Edit: with pip I have only problem with matplotlib, which is another topic:
Cannot install matplotlib. Fatal error LNK1181, Visual Studio fail
Simply went into packages folder and deleted matplotlib package manually because could not make it display graphs in Jupyter (didnt try in Pycharm). Trying to reinstall it now, hopefully it will fix the issue.
To install packages whithin anaconda environment under Windows10, you should use "Anaconda prompt" (find it in win menu)
It starts (Base) venv by default and installs packages in it. Therefore using Python interpreter distributed with Anaconda you will be able to import them with no side actions.
Besides matplotlib is installed there by default

Error installing Spyder in anaconda

Tried anaconda today , it seems fine but when I tried to launch Spyder each time I get this error: Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\spyder-script.py", line 6, in <module>
from spyder.app.start import main
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\start.py", line 23, in <module>
from spyder.utils.external import lockfile
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\external\lockfile.py", line 22, in <module>
import psutil
File "C:\Users\Jaker\AppData\Roaming\Python\Python36\site-packages\psutil\__init__.py", line 126, in <module>
from . import _pswindows as _psplatform
File "C:\Users\Jaker\AppData\Roaming\Python\Python36\site-packages\psutil\_pswindows.py", line 16, in <module>
from . import _psutil_windows as cext
ImportError: cannot import name '_psutil_windows'
Any help regarding this ? Also how do I get python 3.6.3 in anaconda..?
The problem is you have two Python versions installed in your system: one in C:\ProgramData\Anaconda3\ and the other in C:\Users\Jaker\AppData\Roaming\Python\Python36.
Please uninstall one of them and the problem will be solved.

Jupyter Noterbook error

I just cannot use jupyter notebook. I have updated to the most recent version by ananota, and it still does not work.
The error message is listed below:
C:\Users\willian>jupyter notebook
Traceback (most recent call last):
File "C:\Anaconda3\Scripts\jupyter-notebook-script.py", line 3, in <module>
import notebook.notebookapp
File "C:\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 40, in <module>
ioloop.install()
File "C:\Anaconda3\lib\site-packages\zmq\eventloop\ioloop.py", line 207, in install
from tornado import ioloop
File "C:\Anaconda3\lib\site-packages\tornado\ioloop.py", line 47, in <module>
from tornado.concurrent import TracebackFuture, is_future
File "C:\Anaconda3\lib\site-packages\tornado\concurrent.py", line 34, in <module>
from tornado.util import raise_exc_info, ArgReplacer, is_finalizing
ImportError: cannot import name 'is_finalizing'
From your error it looks like the tornado package is not installed in your environment. Installing tornado with the command below should fix your problem.
pip install tornado

How can I start spyder python 3.5

I am having trouble starting spyder (I have installed Anaconda 64 bit version python 3.5). When I run spyder or spyder.exe in cmd I see the green logo of spyder but nothing happens afterwards, except that I get an error msg:
(C:\Program Files\Anaconda3) C:\WINDOWS\system32>spyder
Traceback (most recent call last):
File "C:\Program Files\Anaconda3\Scripts\spyder-script.py", line 5, in <module>
sys.exit(spyder.app.start.main())
File "C:\Program Files\Anaconda3\lib\site-packages\spyder\app\start.py", line 103, in main
from spyder.app import mainwindow
File "C:\Program Files\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 154, in <module>
from spyder.utils.environ import WinUserEnvDialog
File "C:\Program Files\Anaconda3\lib\site-packages\spyder\utils\environ.py", line 20, in <module>
from spyder.widgets.variableexplorer.collectionseditor import CollectionsEditor
File "C:\Program Files\Anaconda3\lib\site-packages\spyder\widgets\variableexplorer\collectionseditor.py", line 45, in <module>
from spyder.widgets.variableexplorer.importwizard import ImportWizard
File "C:\Program Files\Anaconda3\lib\site-packages\spyder\widgets\variableexplorer\importwizard.py", line 26, in <module>
import pandas as pd
File "C:\Program Files\Anaconda3\lib\site-packages\pandas\__init__.py", line 37, in <module>
import pandas.core.config_init
File "C:\Program Files\Anaconda3\lib\site-packages\pandas\core\config_init.py", line 14, in <module>
import pandas.core.config as cf
AttributeError: module 'pandas' has no attribute 'core'
I am running Win 10 Pro 64bit
If you want to install Spyder directly, you need to follow these steps:
Install the essential requirements:
Python2.7+ or 3.4+
PyQt5 (recommended) or PyQt4
Install Spyder and its dependencies by running this command:
pip install spyder
For more read this :https://docs.continuum.io/anaconda/ide_integration

Categories