2022-03-22 17:55:13.940009: I tensorflow/stream_executor/platform/default/dso_loader.cc:44\] Successfully opened dynamic library cudart64_101.dll
Traceback (most recent call last):
File "train.py", line 27, in \<module\>
import tensorflow as tf
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow\__init_\_.py", line 101, in \<module\>
from tensorflow_core import \*
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core\__init_\_.py", line 46, in \<module\>
from . _api.v2 import compat_
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core_api\\v2\\compat\__init_.py", line 39, in \<module\>
from . import v1
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core_api\\v2\\compat\\v1\__init_\_.py", line 32, in \<module\>
from . import compat
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core_api\\v2\\compat\\v1\\compat\__init_\_.py", line 38, in \<module\>
from . import v1
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core_api\\v2\\compat\\v1\\compat\\v1\__init_\_.py", line 29, in \<module\>
from tensorflow._api.v2.compat.v1 import app_
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core_api\\v2\\compat\__init_.py", line 39, in \<module\>
from . import v1
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core_api\\v2\\compat\\v1\__init_\_.py", line 32, in \<module\>
from . import compat
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core_api\\v2\\compat\\v1\\compat\__init_\_.py", line 38, in \<module\>
from . import v1
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core_api\\v2\\compat\\v1\\compat\\v1\__init_\_.py", line 675, in \<module\>
from tensorflow.python.keras.api._v1 import keras_
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core\\python\\keras\\api\__init_.py", line 10, in \<module\>
from . import keras
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core\\python\\keras\\api\\keras\__init_\_.py", line 15, in \<module\>
from . import applications
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core\\python\\keras\\api\\keras\\applications\__init_\_.py", line 10, in \<module\>
from . import densenet
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core\\python\\keras\\api\\keras\\applications\\densenet\__init_\_.py", line 11, in \<module\>
from tensorflow.python.keras.applications.densenet import DenseNet121
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\tensorflow_core\\python\\keras\\applications\__init_\_.py", line 22, in \<module\>
import keras_applications
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\keras_applications\__init_\_.py", line 63, in \<module\>
from . import resnet
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\keras_applications\\resnet.py", line 22, in \<module\>
from .resnet_common import ResNet50
File "C:\\Users\\sahro\\anaconda3\\envs\\learningFromAlignement\\lib\\site-packages\\keras_applications\\resnet_common.py", line 27
from tensorflow.python.util.tf_export import
^
SyntaxError: invalid syntax
I unistall and again install the tensorflow all the version and i have AMD Radeon Grahpics.
I use the conda environment to the run the code
Related
I uninstalled and installed Tensorflow. I updated. I got the same error. I ran the program a lot and it didn't give an error until yesterday I installed pip install tf-nightly-gpu. Is that why?
File "C:\Users\faikm\OneDrive\Masaüstü\DeeepLearning\model_egit.py", line 14, in <module>
from tensorflow.keras import layers
File "C:\Program Files\Python310\lib\site-packages\keras\api\_v2\keras\__init__.py", line 12, in <module>
from keras import __version__
File "C:\Program Files\Python310\lib\site-packages\keras\__init__.py", line 24, in <module>
from keras import models
File "C:\Program Files\Python310\lib\site-packages\keras\models\__init__.py", line 18, in <module>
from keras.engine.functional import Functional
File "C:\Program Files\Python310\lib\site-packages\keras\engine\functional.py", line 24, in <module>
from keras.dtensor import layout_map as layout_map_lib
File "C:\Program Files\Python310\lib\site-packages\keras\dtensor\__init__.py", line 22, in <module>
from tensorflow.compat.v2.experimental import dtensor as dtensor_api # pylint: disable=g-import-not-at-top
File "C:\Program Files\Python310\lib\site-packages\tensorflow\_api\v2\compat\v2\experimental\dtensor\__init__.py", line 8, in <module>
from tensorflow.dtensor.python.api import call_with_layout
File "C:\Program Files\Python310\lib\site-packages\tensorflow\dtensor\python\__init__.py", line 18, in <module>
from tensorflow.dtensor.python import mesh_util
File "C:\Program Files\Python310\lib\site-packages\tensorflow\dtensor\python\mesh_util.py", line 21, in <module>
from tensorflow.dtensor.python import api
File "C:\Program Files\Python310\lib\site-packages\tensorflow\dtensor\python\api.py", line 22, in <module>
from tensorflow.dtensor.python import dtensor_device
File "C:\Program Files\Python310\lib\site-packages\tensorflow\dtensor\python\dtensor_device.py", line 28, in <module>
from tensorflow.python import _pywrap_dtensor_device
ImportError: cannot import name '_pywrap_dtensor_device' from 'tensorflow.python' (C:\Program Files\Python310\lib\site-packages\tensorflow\python\__init__.py)
I am very new to Tensorflow. If anyone could help, I will be really appreciated it.
(tensorflow) C:\Tensorflow\workspace\training_demo>python model_main_tf2.py --model_dir=models/my_ssd_resnet50_v1_fpn --pipeline_config_path=models/my_ssd_resnet50_v1_fpn/pipeline.config
2021-12-16 12:15:09.775852: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
Traceback (most recent call last):
File "C:\Tensorflow\workspace\training_demo\model_main_tf2.py", line 40, in <module>
from object_detection import model_lib_v2
File "C:\Tensorflow\models\research\object_detection\model_lib_v2.py", line 27, in <module>
from object_detection import eval_util
File "C:\Tensorflow\models\research\object_detection\eval_util.py", line 35, in <module>
from object_detection.metrics import coco_evaluation
File "C:\Tensorflow\models\research\object_detection\metrics\coco_evaluation.py", line 25, in <module>
from object_detection.metrics import coco_tools
File "C:\Tensorflow\models\research\object_detection\metrics\coco_tools.py", line 51, in <module>
from pycocotools import coco
File "C:\Tensorflow\models\research\pycocotools\coco.py", line 55, in <module>
from . import mask as maskUtils
File "C:\Tensorflow\models\research\pycocotools\mask.py", line 3, in <module>
import pycocotools._mask as _mask
ModuleNotFoundError: No module named 'pycocotools._mask'
I use instructions from here:https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html
Thank you in advance!
I installed tensorflow only for CPU in windows 10 with
pip3 install --upgrade tensorflow
it downloaded and installed correctly, but when i tried to import it gave me the following error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Eloy\anaconda3\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\Eloy\anaconda3\lib\site-packages\tensorflow\python\__init__.py", line 40, in <module>
from tensorflow.python.eager import context
File "C:\Users\Eloy\anaconda3\lib\site-packages\tensorflow\python\eager\context.py", line 32, in <module>
from tensorflow.core.framework import function_pb2
File "C:\Users\Eloy\anaconda3\lib\site-packages\tensorflow\core\framework\function_pb2.py", line 16, in <module>
from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
File "C:\Users\Eloy\anaconda3\lib\site-packages\tensorflow\core\framework\attr_value_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
File "C:\Users\Eloy\anaconda3\lib\site-packages\tensorflow\core\framework\tensor_pb2.py", line 16, in <module>
from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
File "C:\Users\Eloy\anaconda3\lib\site-packages\tensorflow\core\framework\resource_handle_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
File "C:\Users\Eloy\anaconda3\lib\site-packages\tensorflow\core\framework\tensor_shape_pb2.py", line 112, in <module>
'__module__' : 'tensorflow.core.framework.tensor_shape_pb2'
TypeError: expected bytes, Descriptor found
I installed probuf with
pip install protobuf-py3
But another problem came up
import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Eloy\anaconda3\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\Eloy\anaconda3\lib\site-packages\tensorflow\python\__init__.py", line 40, in <module>
from tensorflow.python.eager import context
File "C:\Users\Eloy\anaconda3\lib\site-packages\tensorflow\python\eager\context.py", line 32, in <module>
from tensorflow.core.framework import function_pb2
File "C:\Users\Eloy\anaconda3\lib\site-packages\tensorflow\core\framework\function_pb2.py", line 10, in <module>
from google.protobuf import symbol_database as _symbol_database
File "C:\Users\Eloy\anaconda3\lib\site-packages\google\protobuf\symbol_database.py", line 184, in <module>
_DEFAULT = SymbolDatabase(pool=descriptor_pool.Default())
AttributeError: module 'google.protobuf.descriptor_pool' has no attribute 'Default'
this solved my new problem
Getting module 'google.protobuf.descriptor_pool' has no attribute 'Default' in my python script
I have anaconda installed. Running python 2.7. I have uninstalled, reinstalled, and upgraded numpy to 1.11.0, uninstalled and reinstalled pandas, and I still get this traceback when I try to import numpy:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/__init__.py", line 180, in <module>
from . import add_newdocs
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/core/__init__.py", line 58, in <module>
from numpy.testing.nosetester import _numpy_tester
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/testing/__init__.py", line 12, in <module>
from . import decorators as dec
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/testing/decorators.py", line 21, in <module>
from .utils import SkipTest
File "/Users/nicole/anaconda/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.5-x86_64.egg/numpy/testing/utils.py", line 15, in <module>
from tempfile import mkdtemp, mkstemp
File "/Users/nicole/anaconda/lib/python2.7/tempfile.py", line 35, in <module>
from random import Random as _Random
File "random/__init__.py", line 99, in <module>
from .mtrand import *
File "numpy.pxd", line 92, in init mtrand (numpy/random/mtrand/mtrand.c:37726)
It was working fine last night, which is really frustrating. Thank you for any insight.
I am running into the following error while using the command scrapy startproject to create a project. I am running Python 2.7.6 through canopy on Ubuntu 14.04 (64 bit). I have installed all the required dependencies still I cannot find a solution to this. Can anyone help me with this?
Python27\Scripts>scrapy startproject ps_localize
Traceback (most recent call last):
File "/home/Enthought/Canopy_64bit/User/bin/scrapy", line 7, in <module>
from scrapy.cmdline import execute
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/scrapy/cmdline.py", line 9, in <module>
from scrapy.crawler import CrawlerProcess
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/scrapy/crawler.py", line 3, in <module>
from twisted.internet import reactor, defer
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/twisted/internet/reactor.py", line 38, in <module>
from twisted.internet import default
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/twisted/internet/default.py", line 56, in <module>
install = _getInstallFunction(platform)
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/twisted/internet/default.py", line 44, in _getInstallFunction
from twisted.internet.epollreactor import install
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/twisted/internet/epollreactor.py", line 24, in <module>
from twisted.internet import posixbase
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 23, in <module>
from twisted.internet import error, udp, tcp
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/twisted/internet/tcp.py", line 29, in <module>
from twisted.internet._newtls import (
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/twisted/internet/_newtls.py", line 21, in <module>
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/twisted/protocols/tls.py", line 41, in <module>
from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/OpenSSL/rand.py", line 11, in <module>
from OpenSSL._util import (
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/OpenSSL/_util.py", line 7, in <module>
binding = Binding()
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 114, in __init__
self._ensure_ffi_initialized()
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 126, in _ensure_ffi_initialized
cls._modules,
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cryptography/hazmat/bindings/utils.py", line 31, in load_library_for_binding
lib = ffi.verifier.load_library()
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cffi/verifier.py", line 97, in load_library
return self._load_library()
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cffi/verifier.py", line 207, in _load_library
return self._vengine.load_library()
File "/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cffi/vengine_cpy.py", line 155, in load_library
raise ffiplatform.VerificationError(error)
cffi.ffiplatform.VerificationError: importing '/home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_a269d620xd5c405b7.so': /home/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_a269d620xd5c405b7.so: undefined symbol: EC_KEY_clear_flags