When I try to run, I keep getting this error. I've tried downgrading to pyobjc 7.3 and it still gives me the same error. What could be the problem?
Traceback (most recent call last):
File "/Users/jeremyparker/PycharmProjects/pythonProject/main.py", line 4, in <module>
import pynput
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pynput/__init__.py", line 40, in <module>
from . import keyboard
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pynput/keyboard/__init__.py", line 31, in <module>
backend = backend(__name__)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pynput/_util/__init__.py", line 70, in backend
return importlib.import_module('._' + module, package)
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/pynput/keyboard/_darwin.py", line 51, in <module>
from pynput._util.darwin import (
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pynput/_util/darwin.py", line 60, in <module>
OBJC.PyObjCObject_New.restype = ctypes.py_object
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
func = self.__getitem__(name)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(0x2055dbc80, PyObjCObject_New): symbol not found
I'm trying to run Python behave tests but get the following error:
[moadmin#modevvm12 e2e-tests]$ behave -i features/tests/connmgr_2_scan_management_container.feature
Exception ImportError: No module named request
Traceback (most recent call last):
File "/usr/bin/behave", line 11, in <module>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/behave/__main__.py", line 183, in main
return run_behave(config)
File "/usr/lib/python2.7/site-packages/behave/__main__.py", line 127, in run_behave
failed = runner.run()
File "/usr/lib/python2.7/site-packages/behave/runner.py", line 804, in run
return self.run_with_paths()
File "/usr/lib/python2.7/site-packages/behave/runner.py", line 808, in run_with_paths
self.load_hooks()
File "/usr/lib/python2.7/site-packages/behave/runner.py", line 784, in load_hooks
exec_file(hooks_path, self.hooks)
File "/usr/lib/python2.7/site-packages/behave/runner_util.py", line 386, in exec_file
exec(code, globals_, locals_)
File "features/environment.py", line 20, in <module>
from framework.sd.api.auth_rbac import AuthRBAC
File "/tmp/e2e-tests/framework/sd/api/auth_rbac.py", line 10, in <module>
from framework.sd.api.sd_endpoint import SDEndpoint
File "/tmp/e2e-tests/framework/sd/api/sd_endpoint.py", line 12, in <module>
import urllib.request, urllib.parse, urllib.error
ImportError: No module named request
urllib is installed so I can't understand why I get this error.
I am following the "Serving Inception Model with TensorFlow Serving and Kubernetes" tutorial from the tensorflow.org website. When I get to loading and exporting the model using
root#ecf82ac60c6b:/serving# bazel-bin/tensorflow_serving/example/inception_saved_model --checkpoint_dir=inception-v3 --output_dir=/tmp/inception-export
I get following error.
Traceback (most recent call last):
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/tf_serving/tensorflow_serving/example/inception_saved_model.py", line 202, in <module>
tf.app.run()
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/org_tensorflow/tensorflow/python/platform/app.py", line 124, in run
_sys.exit(main(argv))
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/tf_serving/tensorflow_serving/example/inception_saved_model.py", line 198, in main
export()
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/tf_serving/tensorflow_serving/example/inception_saved_model.py", line 91, in export
table = tf.contrib.lookup.index_to_string_table_from_tensor(class_tensor)
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/org_tensorflow/tensorflow/python/util/lazy_loader.py", line 53, in __getattr__
module = self._load()
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/org_tensorflow/tensorflow/python/util/lazy_loader.py", line 42, in _load
module = importlib.import_module(self.__name__)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/org_tensorflow/tensorflow/contrib/__init__.py", line 82, in <module>
from tensorflow.contrib.eager.python import tfe as eager
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/org_tensorflow/tensorflow/contrib/eager/python/tfe.py", line 76, in <module>
from tensorflow.contrib.eager.python.datasets import Iterator
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/org_tensorflow/tensorflow/contrib/eager/python/datasets.py", line 23, in <module>
from tensorflow.contrib.data.python.ops import prefetching_ops
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/org_tensorflow/tensorflow/contrib/data/python/ops/prefetching_ops.py", line 25, in <module>
resource_loader.get_path_to_datafile("../../_prefetching_ops.so"))
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/org_tensorflow/tensorflow/contrib/util/loader.py", line 55, in load_op_library
ret = load_library.load_op_library(path)
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/org_tensorflow/tensorflow/python/framework/load_library.py", line 56, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/org_tensorflow/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: /serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/org_tensorflow/tensorflow/contrib/data/python/ops/../../_prefetching_ops.so: undefined symbol: _ZN6google8protobuf8internal9ArenaImpl10AddCleanupEPvPFvS3_E
I tried the solution on How to troubleshoot deployment of Inception serving running in kubernetes, but it does not apply to this problem. Has anyone encountered the same problem and maybe figured out how to solve it?
I am still getting this error: An error occurred while starting the kernel
Things I tried:
setuptools command
updating spyder
Uninstalled everything that had word python in it from Uninstall or change progam panel
Uninstalling and reinstalling anaconda
Reading people's response on how they tried to fix it
Tried not to get frustrated.
This started occurring after I updated the spyder which I shouldn't have, but now I am stuck with the issue. I will share the complete message that's coming up on my IPhython Console screen.
Traceback (most recent call last):
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 245, in
main()
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 213, in main
from ipykernel.kernelapp import IPKernelApp
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\ipykernel\__init__.py", line 2, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\ipykernel\connect.py", line 18, in
import jupyter_client
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\jupyter_client\__init__.py", line 4, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\jupyter_client\connect.py", line 22, in
import zmq
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\__init__.py", line 34, in
from zmq import backend
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: cannot import name 'constants'
Traceback (most recent call last):
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 245, in
main()
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 213, in main
from ipykernel.kernelapp import IPKernelApp
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\ipykernel\__init__.py", line 2, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\ipykernel\connect.py", line 18, in
import jupyter_client
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\jupyter_client\__init__.py", line 4, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\jupyter_client\connect.py", line 22, in
import zmq
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\__init__.py", line 34, in
from zmq import backend
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: cannot import name 'constants'
Traceback (most recent call last):
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 245, in
main()
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 213, in main
from ipykernel.kernelapp import IPKernelApp
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\ipykernel\__init__.py", line 2, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\ipykernel\connect.py", line 18, in
import jupyter_client
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\jupyter_client\__init__.py", line 4, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\jupyter_client\connect.py", line 22, in
import zmq
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\__init__.py", line 34, in
from zmq import backend
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: cannot import name 'constants'
Traceback (most recent call last):
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 245, in
main()
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 213, in main
from ipykernel.kernelapp import IPKernelApp
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\ipykernel\__init__.py", line 2, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\ipykernel\connect.py", line 18, in
import jupyter_client
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\jupyter_client\__init__.py", line 4, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\jupyter_client\connect.py", line 22, in
import zmq
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\__init__.py", line 34, in
from zmq import backend
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: cannot import name 'constants'
Traceback (most recent call last):
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 245, in
main()
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 213, in main
from ipykernel.kernelapp import IPKernelApp
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\ipykernel\__init__.py", line 2, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\ipykernel\connect.py", line 18, in
import jupyter_client
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\jupyter_client\__init__.py", line 4, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\jupyter_client\connect.py", line 22, in
import zmq
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\__init__.py", line 34, in
from zmq import backend
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36\Lib\site‑packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: cannot import name 'constants'
The problem is that you have two Python versions installed:
C:\Users\afsan\Anaconda3\
C:\Users\afsan\AppData\Local\Programs\Python\Python36
Given that it seems you want to use Spyder with Anaconda, please remove your second Python version (manually, if necessary). That should fix your problem.
I am calling a python script from another python script,irrespective of the output the python script I am calling I get the following error in stderr,I googled but couldn't find anything concrete,am clueless as to why am getting this error?does anyone have any idea on how to fix it?
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 151, in _run_module_as_main
mod_name, loader, code, fname = _get_module_details(mod_name)
File "C:\Python27\lib\runpy.py", line 109, in _get_module_details
return _get_module_details(pkg_main_name)
File "C:\Python27\lib\runpy.py", line 101, in _get_module_details
loader = get_loader(mod_name)
File "C:\Python27\lib\pkgutil.py", line 464, in get_loader
return find_loader(fullname)
File "C:\Python27\lib\pkgutil.py", line 474, in find_loader
for importer in iter_importers(fullname):
File "C:\Python27\lib\pkgutil.py", line 430, in iter_importers
__import__(pkg)
File "C:\Python27\lib\site-packages\pip\__init__.py", line 14, in <module>
from pip.utils import get_installed_distributions, get_prog
File "C:\Python27\lib\site-packages\pip\utils\__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
File "C:\Python27\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 35,
import email.parser
File "C:\Python27\lib\email\parser.py", line 12, in <module>
from email.feedparser import FeedParser
File "C:\Python27\lib\email\feedparser.py", line 27, in <module>
from email import message
File "C:\Python27\lib\email\message.py", line 16, in <module>
import email.charset
File "C:\Python27\lib\email\charset.py", line 13, in <module>
import email.base64mime
File "C:\Python27\lib\email\base64mime.py", line 40, in <module>
from email.utils import fix_eols
File "C:\Python27\lib\email\utils.py", line 27, in <module>
import random
File "C:\Python27\lib\random.py", line 49, in <module>
import hashlib as _hashlib
File "C:\Python27\lib\hashlib.py", line 138, in <module>
_hashlib.openssl_md_meth_names)
AttributeError: 'module' object has no attribute 'openssl_md_meth_names'
Try to run brew cleanup and after that brew postinstall python.
For more info see this thread