Error In Spyder After Anaconda Install - python

I just installed Anaconda. I already had Spyder 3.0.0 installed on my Windows 8.1 (64 bit). I also already had Python 3.4 installed. But, after installing Anaconda, I went into Preferences and pointed the Python executable to the Anaconda3 folder to utilize the 3.5 version. But when I started up Spyder again, got the following error:
An error ocurred while starting the kernel
C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\PIL\Image.py:81: RuntimeWarning: The _imaging extension was built for another version of Python.
RuntimeWarning
C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\PIL\Image.py:81: RuntimeWarning: The _imaging extension was built for another version of Python.
RuntimeWarning
Traceback (most recent call last):
File "C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\spyderlib\widgets\externalshell\start_ipython_kernel.py", line 187, in
from ipykernel.kernelapp import IPKernelApp
File "C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\ipykernel\__init__.py", line 2, in
from .connect import *
File "C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\ipykernel\connect.py", line 18, in
import jupyter_client
File "C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\jupyter_client\__init__.py", line 4, in
from .connect import *
File "C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\jupyter_client\connect.py", line 21, in
import zmq
File "C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\zmq\__init__.py", line 66, in
from zmq import backend
File "C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\zmq\backend\select.py", line 27, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\WinPython󈛤bit𔂭.4.4.2\python𔂭.4.4.amd64\lib\site‑packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: Module use of python34.dll conflicts with this version of Python.
Any ideas?

Suggestion:
rename your directory "C:\WinPython-64bit-3.4.4.2" in "C:\WinPython-64bit-3.4.4.2bis"
relaunch your Anaconda Spyder
if it doesn't help, rename it back to "C:\WinPython-64bit-3.4.4.2"

Related

Jupiter notebook won't start - Symbol not found error

A while back, I upgraded my python version via brew to 3.9.0 and now, whenever I try to start Jupiter notebook, I get this error:
Traceback (most recent call last):
File "/Users/me/Library/Python/3.9/bin/jupyter-notebook", line 5, in <module>
from notebook.notebookapp import main
File "/Users/me/Library/Python/3.9/lib/python/site-packages/notebook/notebookapp.py", line 49, in <module>
from zmq.eventloop import ioloop
File "/usr/local/lib/python3.9/site-packages/zmq/__init__.py", line 62, in <module>
from zmq import backend
File "/usr/local/lib/python3.9/site-packages/zmq/backend/__init__.py", line 32, in <module>
raise original_error from None
File "/usr/local/lib/python3.9/site-packages/zmq/backend/__init__.py", line 27, in <module>
_ns = select_backend(first)
File "/usr/local/lib/python3.9/site-packages/zmq/backend/select.py", line 32, in select_backend
mod = import_module(name)
File "/usr/local/Cellar/python#3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.9/site-packages/zmq/backend/cython/__init__.py", line 6, in <module>
from . import (
ImportError: dlopen(/usr/local/lib/python3.9/site-packages/zmq/backend/cython/constants.cpython-39-darwin.so, 2): Symbol not found: ____chkstk_darwin
Referenced from: /usr/local/lib/python3.9/site-packages/zmq/backend/cython/../../.dylibs/libsodium.23.dylib (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylib
in /usr/local/lib/python3.9/site-packages/zmq/backend/cython/../../.dylibs/libsodium.23.dylib
I've tried completely uninstalling and reinstalling jupiter to no avail. I've also tried reinstalling the zmq module that seems to be a part of this error chain. My thought is that there must be some component that's avoiding my uninstalls that needs to be fixed/updated, but I'm not sure what it could be.
I'm also running MacOS 10.13.6. I notice it states that one of these modules was built for Mac OS X 10.15. Could this instead be the issue?
The answer provided in this link worked for me:
Cannot run jupyter everywhere (terminal, anaconda distributer) Mac os 10.12.6
"downgraded pyzmq to 20.0.0 and it worked fine. pip install pyzmq==20.0.0
I believe the issue is in pyzmq's cython packaging - and should be raised as a bug to them."
The bug has been raised and is expected to be fixed by release 21.0.2

Cannot run jupyter everywhere (terminal, anaconda distributer) Mac os 10.12.6

I got a problem with running jupyter in the terminal.
What terminal says after running
maxim#MacBook-Pro-Maxim î‚° ~ î‚° jupyter notebook
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/bin/jupyter-notebook", line 5, in <module>
from notebook.notebookapp import main
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/notebookapp.py", line 49, in <module>
from zmq.eventloop import ioloop
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/zmq/__init__.py", line 62, in <module>
from zmq import backend
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/zmq/backend/__init__.py", line 32, in <module>
raise original_error from None
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/zmq/backend/__init__.py", line 27, in <module>
_ns = select_backend(first)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/zmq/backend/select.py", line 32, in select_backend
mod = import_module(name)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/zmq/backend/cython/__init__.py", line 6, in <module>
from . import (
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/zmq/backend/cython/constants.cpython-39-darwin.so, 2): Symbol not found: ____chkstk_darwin
Referenced from: /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/zmq/backend/cython/../../.dylibs/libsodium.23.dylib
Expected in: /usr/lib/libSystem.B.dylib
in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/zmq/backend/cython/../../.dylibs/libsodium.23.dylib
I was trying to use Anaconda and got the same issue
For me, it seems to be something wrong with path...
Please help me to resolve it or give a hint of what to do
I'm seeing the exact same issue - seems the zmq package has a /cython/ in it with incompatible references. Is it not using cython from the site-packages? I've tried reinstalling cython, pyzmq, and all the jupyter modules with no joy yet.
EDIT - I downgraded pyzmq to 20.0.0 and it worked fine.
pip install pyzmq==20.0.0
I believe the issue is in pyzmq's cython packaging - and should be raised as a bug to them.

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

Cannot open Jupyter notebook using Anaconda python 3.6.1

When I use the command jupyter notebook I get the following error and traceback:
Error in sitecustomize; set PYTHONVERBOSE for traceback:
KeyError: 'PYTHONPATH'
Error in sitecustomize; set PYTHONVERBOSE for traceback:
KeyError: 'PYTHONPATH'
Traceback (most recent call last):
File "/Users/hamedbh/anaconda3/bin/jupyter-notebook", line 4, in <module>
import notebook.notebookapp
File "/usr/local/lib/python2.7/site-packages/notebook/notebookapp.py", line 31, in <module>
from zmq.eventloop import ioloop
File "/usr/local/lib/python2.7/site-packages/zmq/__init__.py", line 34, in <module>
from zmq import backend
File "/usr/local/lib/python2.7/site-packages/zmq/backend/__init__.py", line 40, in <module>
reraise(*exc_info)
File "/usr/local/lib/python2.7/site-packages/zmq/utils/sixcerpt.py", line 34, in reraise
raise value
File "/usr/local/lib/python2.7/site-packages/zmq/backend/__init__.py", line 27, in <module>
_ns = select_backend(first)
File "/usr/local/lib/python2.7/site-packages/zmq/backend/select.py", line 27, in select_backend
mod = __import__(name, fromlist=public_api)
ModuleNotFoundError: No module named 'zmq.backend.cython'
I am using the full Anaconda distribution, and although I have created an environment I did this from the root Anaconda env (i.e. /Users/me/anaconda3) and not within an env.
Some quick details that may help with figuring out the problem:
python --version = Python 3.6.1 :: Anaconda 4.4.0 (x86_64)
OS is MacOS Sierra 10.12.6
I don't know whether the same thing that is causing the KeyError: PYTHONPATH is also causing jupyter notebook to fail.
It seems that pyzmq is the problem. Run pip install pyzmq --upgrade or pip unistall pyzmq & pip install pyzmq to make sure you're on the latest version of it.

Jupyter Notebook error [duplicate]

This question already has answers here:
Error when executing `jupyter notebook` (No such file or directory)
(12 answers)
Closed 3 years ago.
I am not able to run the notebook in my browser. It does not appear. The console is giving me the following error. I have Anaconda installed. Any help would be highly appreciated. Thanks
C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\Cython\Distutils\old_build_ext.py:30: UserWarning: Cython.Distutils.old_build_ext does not properly handle dependencies and is deprecated.
"Cython.Distutils.old_build_ext does not properly handle dependencies "
_cffi_ext.c
AppData\Roaming\Python\Python35\site-packages\zmq\backend\cffi\__pycache__\_cffi_ext.c(209): fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory
Traceback (most recent call last):
File "C:\Users\Myamoto\Anaconda3\Scripts\jupyter-notebook-script.py", line 3, in <module>
import notebook.notebookapp
File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\notebook\notebookapp.py", line 32, in <module>
from zmq.eventloop import ioloop
File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\__init__.py", line 34, in <module>
from zmq import backend
File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\backend\select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: cannot import name 'constants'
I uninstalled pyzmq and re-installed it:
pip uninstall pyzmq
pip install pyzmq
This worked for me.
Note that you may also need to reinstall the Jupyter notebook to be compatible with the latest version of Python.

Categories