cannot launch Jupyter from anaconda - python

I just got a new laptop at work and installed anaconda.. howerver, when i launched Jupyter I received the following error. Does anyone know what i should do here? Cheers
Traceback (most recent call last):
File "C:\Users\darren.chapman\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 9, in
import sqlite3
File "C:\Users\darren.chapman\AppData\Local\Continuum\anaconda3\lib\sqlite3\__init__.py", line 23, in
from sqlite3.dbapi2 import *
File "C:\Users\darren.chapman\AppData\Local\Continuum\anaconda3\lib\sqlite3\dbapi2.py", line 27, in
from _sqlite3 import *
ImportError: DLL load failed: The specified procedure could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\darren.chapman\AppData\Local\Continuum\anaconda3\Scripts\jupyter-notebook-script.py", line 6, in
from notebook.notebookapp import main
File "C:\Users\darren.chapman\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\notebookapp.py", line 86, in
from .services.sessions.sessionmanager import SessionManager
File "C:\Users\darren.chapman\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 12, in
from pysqlite2 import dbapi2 as sqlite3
ModuleNotFoundError: No module named 'pysqlite2'

You have to add the path.
while installing click the add anoconda to the path.

Related

Anaconda Navigator launch problem Windows 10

Can't Open anaconda, when i tried from the promp this appears:
Traceback (most recent call last): File
"C:\ProgramData\Anaconda3\lib\site-packages\qtpy_init_.py", line
204, in
from PySide import version as PYSIDE_VERSION # analysis:ignore ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"C:\ProgramData\Anaconda3\Scripts\anaconda-navigator-script.py", line
6, in module
from anaconda_navigator.app.main import main File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\app\main.py",
line 22, in module
from anaconda_navigator.utils.conda import is_conda_available File
"C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\utils_init_.py",
line 15, in module
from qtpy.QtGui import QIcon File "C:\ProgramData\Anaconda3\lib\site-packages\qtpy_init_.py", line
210, in module
raise PythonQtError('No Qt bindings could be found') qtpy.PythonQtError: No Qt bindings could be found

Not able to open jupyter notebook on my Windows10 system using anaconda navigator

I am trying to open Jupyter notebook on my windows 10 system using anaconda navigator but not able to open it as it is showing following error.
Traceback (most recent call last):
File "C:\Users\kaushiki\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 10, in
import sqlite3
ModuleNotFoundError: No module named 'sqlite3'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\kaushiki\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in
from notebook.notebookapp import main
File "C:\Users\kaushiki\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 85, in
from .services.sessions.sessionmanager import SessionManager
File "C:\Users\kaushiki\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 13, in
from pysqlite2 import dbapi2 as sqlite3
ModuleNotFoundError: No module named 'pysqlite2'

Issue running python script via PyCharm but not Anaconda Prompt

When I run a script in Anaconda Prompt, it works fine.
When I try to run it via PyCharm, I get this error related to the import of pandas.
C:\ProgramData\Anaconda3\python.exe C:/Users/MYUSERNAME/PycharmProjects/CARA/DocumentAccessCheck.py
Traceback (most recent call last):
File "C:/Users/MYUSERNAME/PycharmProjects/CARA/DocumentAccessCheck.py", line 2, in <module>
import pandas as pd
File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\__init__.py", line 19, in <module>
"Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']
Process finished with exit code 1
If I try to import numpy and run it via PyCharm I get:
C:\ProgramData\Anaconda3\python.exe C:/Users/MYUSERNAME/PycharmProjects/CARA/DocumentAccessCheck.py
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/MYUSERNAME/PycharmProjects/CARA/DocumentAccessCheck.py", line 2, in <module>
import numpy as np
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified module could not be found.
Process finished with exit code 1
Running the same script in Anaconda prompt...no problem
My run configuration in PyCharm uses the Anaconda python distribution?
It should be noted that I am not using envirnoments, just the base Anaconda installation. More worryingly I dont see ANY Conda options in the project settings in PyCharm which a lot of tutorials seem to allude to.
Seems like a problem with the path for your scripts. Are you sure You have included your scripts in the PATH variable? If so are you sure your libraries are downloading/installing in that path?

Cannot run anaconda

I just installed anaconda and I have udpated the PATH variable.
However, I cannot run any conda related commands.
Every time I run a command starting with "conda" I get the following error.
Can anyone help?
I am using macOs High Sierra 10.13.6.
Traceback (most recent call last):
File "/anaconda3/lib/python3.6/site-packages/conda/common/path.py", line 18, in <module>
from urllib.request import url2pathname
File "/anaconda3/lib/python3.6/urllib/request.py", line 2585, in <module>
from _scproxy import _get_proxy_settings, _get_proxies
ImportError: dlopen(/anaconda3/lib/python3.6/lib-dynload/_scproxy.cpython-36m-darwin.so, 2): Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /anaconda3/lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/anaconda3/bin/conda", line 11, in <module>
sys.exit(main())
File "/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 112, in main
from ..exceptions import conda_exception_handler
File "/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 18, in <module>
from .common.io import timeout
File "/anaconda3/lib/python3.6/site-packages/conda/common/io.py", line 24, in <module>
from .path import expand
File "/anaconda3/lib/python3.6/site-packages/conda/common/path.py", line 21, in <module>
from urllib import unquote, url2pathname # NOQA
ImportError: cannot import name 'unquote'
I seem to recall something similar when I first ran Anaconda on my Mac as well. I believe I solved it by doing two things:
Uninstalling Anaconda (Link)
Reinstalling Anaconda (potentially in a different location, say, under your User home)
I think in the process of installation my PATH pointed finally to a different location than the Conda/Python install.

Import Error: C extension (pandas; python; ubuntu)

I am new to Linux and do not know how to fix this error.
$ python googledrive/scripts/test.py
Traceback (most recent call last):
File "/home/michael/anaconda3/lib/python3.5/site-packages/pandas/compat/__init__.py", line 46, in <module>
import __builtin__ as builtins
ImportError: No module named '__builtin__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/michael/anaconda3/lib/python3.5/site-packages/pandas/__init__.py", line 7, in <module>
from pandas import hashtable, tslib, lib
File "pandas/tslib.pyx", line 53, in init pandas.tslib (pandas/tslib.c:102872)
File "/home/michael/anaconda3/lib/python3.5/site-packages/pandas/compat/__init__.py", line 59, in <module>
import http.client as httplib
File "/home/michael/anaconda3/lib/python3.5/http/client.py", line 71, in <module>
import email.parser
File "/home/michael/googledrive/scripts/email.py", line 4, in <module>
import pandas.io.data as web
File "/home/michael/anaconda3/lib/python3.5/site-packages/pandas/io/data.py", line 15, in <module>
from pandas.compat import(
ImportError: cannot import name 'bytes_to_str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "googledrive/scripts/test.py", line 11, in <module>
main()
File "googledrive/scripts/test.py", line 2, in main
import pandas as pd
File "/home/michael/anaconda3/lib/python3.5/site-packages/pandas/__init__.py", line 13, in <module>
"extensions first.".format(module))
ImportError: C extension: 'bytes_to_str' not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace' to build the C extensions first.
Python 3.5.0 :: Anaconda 2.4.0 (64-bit)
I tried conda install -f pandas and it still hasn't fixed my issued.
googledrive/scripts/test.py
def main():
import pandas as pd
import pandas.io.data as web
all_data = {}
all_data['fb'] = web.DataReader('fb','yahoo','1/1/2015', '11/24/2015')
print(all_data['fb'])
I do not know which directory I should run the below suggestion.
python setup.py build_ext --inplace
I don't have any problem running the code line by line in the terminal, but only when I try to run my script file.
>>> print(all_data['fb'])
Open High Low Close Volume \
Date
2015-01-02 78.580002 78.930000 77.699997 78.449997 18177500
2015-01-05 77.980003 79.250000 76.860001 77.190002 26452200
2015-01-06 77.230003 77.589996 75.360001 76.150002 27399300
Any help would be greatly appreciated.

Categories

Resources