Row 2126

Row ID: 2126 | Dataset Entry | Axioma AXP Content Repository

Content Data

This page contains data entry 2126 from the Axioma AXP content repository. The structured data below represents the complete record for this entry.

Whenever I try to import tensor flow or spacy I get this error that I have tried everything to solve.

​

For context these are my current versions when I check pkg\_resources.get\_distribution(package).version :

Python version: 3.9.12, pandas: 1.4.2, numpy: 1.21.6, spacy: 3.5.4, tensorflow: 2.12.0, conda: 23.1.0, pip: 23.1.2

​

I have tried the following:

!pip install numpy==1.21.6

​

conda install -c conda-forge spacy

pip install -U spacy python -m spacy [validate](https://spacy.io/api/cli#validate)

​

python -m venv .env

source .env/bin/activate

pip install -U

pip setuptools wheel

pip install -U spacy

​

This is the error:

​

--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Input In [7], in <cell line: 4>() 2 import re 3 import nltk ----> 4 import spacy 6 from nltk.corpus import stopwords 7 from nltk.tokenize import word_tokenize File ~\anaconda3\lib\site-packages\spacy\__init__.py:6, in <module> 3 import sys 5 # set library-specific custom warning handling before doing anything else ----> 6 from .errors import setup_default_warnings 8 setup_default_warnings() # noqa: E402 10 # These are imported as part of the API File ~\anaconda3\lib\site-packages\spacy\errors.py:2, in <module> 1 import warnings ----> 2 from .compat import Literal 5 class ErrorsWithCodes(type): 6 def __getattribute__(self, code): File ~\anaconda3\lib\site-packages\spacy\compat.py:3, in <module> 1 """Helpers for Python and platform compatibility.""" 2 import sys ----> 3 from thinc.util import copy_array 5 try: 6 import cPickle as pickle File ~\anaconda3\lib\site-packages\thinc\__init__.py:5, in <module> 2 import numpy 4 from .about import __version__ ----> 5 from .config import registry 8 # fmt: off 9 __all__ = [ 10 "registry", 11 "__version__", 12 ] File ~\anaconda3\lib\site-packages\thinc\config.py:4, in <module> 2 import confection 3 from confection import Config, ConfigValidationError, Promise, VARIABLE_RE ----> 4 from .types import Decorator 7 class registry(confection.registry): 8 # fmt: off 9 optimizers: Decorator = catalogue.create("thinc", "optimizers", entry_points=True) File ~\anaconda3\lib\site-packages\thinc\types.py:8, in <module> 6 import numpy 7 import sys ----> 8 from .compat import has_cupy, cupy 10 if has_cupy: 11 get_array_module = cupy.get_array_module File ~\anaconda3\lib\site-packages\thinc\compat.py:54, in <module> 51 torch_version = Version("0.0.0") 53 try: # pragma: no cover ---> 54 import tensorflow.experimental.dlpack 55 import tensorflow 57 has_tensorflow = True File ~\anaconda3\lib\site-packages\tensorflow\__init__.py:37, in <module> 34 import sys as _sys 35 import typing as _typing ---> 37 from tensorflow.python.tools import module_util as _module_util 38 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader 40 # Make sure code inside the TensorFlow codebase can use tf2.enabled() at import. File ~\anaconda3\lib\site-packages\tensorflow\python\__init__.py:42, in <module> 37 from tensorflow.python.eager import context 39 # pylint: enable=wildcard-import 40 41 # Bring in subpackages. ---> 42 from tensorflow.python import data 43 from tensorflow.python import distribute 44 # from tensorflow.python import keras File ~\anaconda3\lib\site-packages\tensorflow\python\data\__init__.py:21, in <module> 15 """`tf.data.Dataset` API for input pipelines. 16 17 See [Importing Data](https://tensorflow.org/guide/data) for an overview. 18 """ 20 # pylint: disable=unused-import ---> 21 from tensorflow.python.data import experimental 22 from tensorflow.python.data.ops.dataset_ops import AUTOTUNE 23 from tensorflow.python.data.ops.dataset_ops import Dataset File ~\anaconda3\lib\site-packages\tensorflow\python\data\experimental\__init__.py:97, in <module> 15 """Experimental API for building input pipelines. 16 17 This module contains experimental `Dataset` sources and transformations that can (...) 93 @@UNKNOWN_CARDINALITY 94 """ 96 # pylint: disable=unused-import ---> 97 from tensorflow.python.data.experimental import service 98 from tensorflow.python.data.experimental.ops.batching import dense_to_ragged_batch 99 from tensorflow.python.data.experimental.ops.batching import dense_to_sparse_batch File ~\anaconda3\lib\site-packages\tensorflow\python\data\experimental\service\__init__.py:419, in <module> 1 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); (...) 13 # limitations under the License. 14 # ============================================================================== 15 """API for using the tf.data service. 16 17 This module contains: (...) 416 job of ParameterServerStrategy). 417 """ --> 419 from tensorflow.python.data.experimental.ops.data_service_ops import distribute 420 from tensorflow.python.data.experimental.ops.data_service_ops import from_dataset_id 421 from tensorflow.python.data.experimental.ops.data_service_ops import register_dataset File ~\anaconda3\lib\site-packages\tensorflow\python\data\experimental\ops\data_service_ops.py:22, in <module> 20 from tensorflow.core.protobuf import data_service_pb2 21 from tensorflow.python import tf2 ---> 22 from tensorflow.python.data.experimental.ops import compression_ops 23 from tensorflow.python.data.experimental.service import _pywrap_server_lib 24 from tensorflow.python.data.experimental.service import _pywrap_utils File ~\anaconda3\lib\site-packages\tensorflow\python\data\experimental\ops\compression_ops.py:16, in <module> 1 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); (...) 13 # limitations under the License. 14 # ============================================================================== 15 """Ops for compressing and uncompressing dataset elements.""" ---> 16 from tensorflow.python.data.util import structure 17 from tensorflow.python.ops import gen_experimental_dataset_ops as ged_ops 20 def compress(element): File ~\anaconda3\lib\site-packages\tensorflow\python\data\util\structure.py:22, in <module> 18 import itertools 20 import wrapt ---> 22 from tensorflow.python.data.util import nest 23 from tensorflow.python.framework import composite_tensor 24 from tensorflow.python.framework import ops File ~\anaconda3\lib\site-packages\tensorflow\python\data\util\nest.py:34, in <module> 1 # Copyright 2017 The TensorFlow Authors. All Rights Reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); (...) 13 # limitations under the License. 14 # ============================================================================== 16 """## Functions for working with arbitrarily nested sequences of elements. 17 18 NOTE(mrry): This fork of the `tensorflow.python.util.nest` module (...) 31 arrays. 32 """ ---> 34 from tensorflow.python.framework import sparse_tensor as _sparse_tensor 35 from tensorflow.python.util import _pywrap_utils 36 from tensorflow.python.util import nest File ~\anaconda3\lib\site-packages\tensorflow\python\framework\sparse_tensor.py:25, in <module> 23 from tensorflow.python import tf2 24 from tensorflow.python.framework import composite_tensor ---> 25 from tensorflow.python.framework import constant_op 26 from tensorflow.python.framework import dtypes 27 from tensorflow.python.framework import ops File ~\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py:25, in <module> 23 from tensorflow.core.framework import types_pb2 24 from tensorflow.python.eager import context ---> 25 from tensorflow.python.eager import execute 26 from tensorflow.python.framework import dtypes 27 from tensorflow.python.framework import op_callbacks File ~\anaconda3\lib\site-packages\tensorflow\python\eager\execute.py:21, in <module> 19 from tensorflow.python import pywrap_tfe 20 from tensorflow.python.eager import core ---> 21 from tensorflow.python.framework import dtypes 22 from tensorflow.python.framework import ops 23 from tensorflow.python.framework import tensor_shape File ~\anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:37, in <module> 34 from tensorflow.core.function import trace_type 35 from tensorflow.tools.docs import doc_controls ---> 37 _np_bfloat16 = _pywrap_bfloat16.TF_bfloat16_type() 38 _np_float8_e4m3fn = _pywrap_float8.TF_float8_e4m3fn_type() 39 _np_float8_e5m2 = _pywrap_float8.TF_float8_e5m2_type() TypeError: Unable to convert function return value to a Python type! The signature was () -> handle

FieldValue
text Whenever I try to import tensor flow or spacy I get this error that I have tried everything to solve. &#x200B; For context these are my current versions when I check pkg\_resources.get\_distribution(package).version : Python version: 3.9.12, pandas: 1.4.2, numpy: 1.21.6, spacy: 3.5.4, tensorflow: 2.12.0, conda: 23.1.0, pip: 23.1.2 &#x200B; I have tried the following: !pip install numpy==1.21.6 &#x200B; conda install -c conda-forge spacy pip install -U spacy python -m spacy [validat…
label r/tensorflow
dataType post
communityName r/tensorflow
datetime 2023-06-28
username_encoded Z0FBQUFBQm5Lakwwbm9yamxiT1h3OHNXcGFxMGlDdjRBR2lwQV9peUpwNThyMzZpSU5FQjZ2TkRrSjhzSTIteVdXbVo5cG5mVGhGanktTTBvTFVUTEVHYXRHMTBobWFWc3c9PQ==
url_encoded Z0FBQUFBQm5Lak9FVWtfNnVscmNEaDB1V3lPMUdYdHFWR1hOSjU1QnZzam5NdEV6Q3JucmRCYXhWVF9KeHd3dGlKU1g1cnlGVmZxLXlCbzk4Y0tPMDR1TmFOZEZ0MUFsT1l5YkRUTnhTdURPMF9kQ0xFbVZJNm1ZUjV5bldGeHhKaHlVRVpDRjNIc1EtaFZPOEN0S0pYNS1DQXpNeExfcVhFd0ZGNnI2UzhjbFgwdUJBTE1FLUZsTHZLWFB5UWloMFRIbUQ2NnVmajRt

Raw Record

{
  "text": "Whenever I try to import tensor flow or spacy I get this error that I have tried everything to solve. \n\n&#x200B;\n\nFor context these are my current versions when I check pkg\\_resources.get\\_distribution(package).version :\n\nPython version: 3.9.12, pandas: 1.4.2, numpy: 1.21.6, spacy: 3.5.4, tensorflow: 2.12.0, conda: 23.1.0, pip: 23.1.2 \n\n&#x200B;\n\nI have tried the following:\n\n!pip install numpy==1.21.6\n\n&#x200B;\n\n conda install -c conda-forge spacy \n\n pip install -U spacy python -m spacy [validate](https://spacy.io/api/cli#validate) \n\n&#x200B;\n\n python -m venv .env \n\nsource .env/bin/activate \n\npip install -U\n\n pip setuptools wheel \n\npip install -U spacy \n\n&#x200B;\n\nThis is the error: \n\n&#x200B;\n\n    ---------------------------------------------------------------------------\n    TypeError                                 Traceback (most recent call last)\n    Input In [7], in <cell line: 4>()\n          2 import re\n          3 import nltk\n    ----> 4 import spacy\n          6 from nltk.corpus import stopwords\n          7 from nltk.tokenize import word_tokenize\n    \n    File ~\\anaconda3\\lib\\site-packages\\spacy\\__init__.py:6, in <module>\n          3 import sys\n          5 # set library-specific custom warning handling before doing anything else\n    ----> 6 from .errors import setup_default_warnings\n          8 setup_default_warnings()  # noqa: E402\n         10 # These are imported as part of the API\n    \n    File ~\\anaconda3\\lib\\site-packages\\spacy\\errors.py:2, in <module>\n          1 import warnings\n    ----> 2 from .compat import Literal\n          5 class ErrorsWithCodes(type):\n          6     def __getattribute__(self, code):\n    \n    File ~\\anaconda3\\lib\\site-packages\\spacy\\compat.py:3, in <module>\n          1 \"\"\"Helpers for Python and platform compatibility.\"\"\"\n          2 import sys\n    ----> 3 from thinc.util import copy_array\n          5 try:\n          6     import cPickle as pickle\n    \n    File ~\\anaconda3\\lib\\site-packages\\thinc\\__init__.py:5, in <module>\n          2 import numpy\n          4 from .about import __version__\n    ----> 5 from .config import registry\n          8 # fmt: off\n          9 __all__ = [\n         10     \"registry\",\n         11     \"__version__\",\n         12 ]\n    \n    File ~\\anaconda3\\lib\\site-packages\\thinc\\config.py:4, in <module>\n          2 import confection\n          3 from confection import Config, ConfigValidationError, Promise, VARIABLE_RE\n    ----> 4 from .types import Decorator\n          7 class registry(confection.registry):\n          8     # fmt: off\n          9     optimizers: Decorator = catalogue.create(\"thinc\", \"optimizers\", entry_points=True)\n    \n    File ~\\anaconda3\\lib\\site-packages\\thinc\\types.py:8, in <module>\n          6 import numpy\n          7 import sys\n    ----> 8 from .compat import has_cupy, cupy\n         10 if has_cupy:\n         11     get_array_module = cupy.get_array_module\n    \n    File ~\\anaconda3\\lib\\site-packages\\thinc\\compat.py:54, in <module>\n         51     torch_version = Version(\"0.0.0\")\n         53 try:  # pragma: no cover\n    ---> 54     import tensorflow.experimental.dlpack\n         55     import tensorflow\n         57     has_tensorflow = True\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\__init__.py:37, in <module>\n         34 import sys as _sys\n         35 import typing as _typing\n    ---> 37 from tensorflow.python.tools import module_util as _module_util\n         38 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader\n         40 # Make sure code inside the TensorFlow codebase can use tf2.enabled() at import.\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\python\\__init__.py:42, in <module>\n         37 from tensorflow.python.eager import context\n         39 # pylint: enable=wildcard-import\n         40 \n         41 # Bring in subpackages.\n    ---> 42 from tensorflow.python import data\n         43 from tensorflow.python import distribute\n         44 # from tensorflow.python import keras\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\python\\data\\__init__.py:21, in <module>\n         15 \"\"\"`tf.data.Dataset` API for input pipelines.\n         16 \n         17 See [Importing Data](https://tensorflow.org/guide/data) for an overview.\n         18 \"\"\"\n         20 # pylint: disable=unused-import\n    ---> 21 from tensorflow.python.data import experimental\n         22 from tensorflow.python.data.ops.dataset_ops import AUTOTUNE\n         23 from tensorflow.python.data.ops.dataset_ops import Dataset\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\python\\data\\experimental\\__init__.py:97, in <module>\n         15 \"\"\"Experimental API for building input pipelines.\n         16 \n         17 This module contains experimental `Dataset` sources and transformations that can\n       (...)\n         93 @@UNKNOWN_CARDINALITY\n         94 \"\"\"\n         96 # pylint: disable=unused-import\n    ---> 97 from tensorflow.python.data.experimental import service\n         98 from tensorflow.python.data.experimental.ops.batching import dense_to_ragged_batch\n         99 from tensorflow.python.data.experimental.ops.batching import dense_to_sparse_batch\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\python\\data\\experimental\\service\\__init__.py:419, in <module>\n          1 # Copyright 2020 The TensorFlow Authors. All Rights Reserved.\n          2 #\n          3 # Licensed under the Apache License, Version 2.0 (the \"License\");\n       (...)\n         13 # limitations under the License.\n         14 # ==============================================================================\n         15 \"\"\"API for using the tf.data service.\n         16 \n         17 This module contains:\n       (...)\n        416   job of ParameterServerStrategy).\n        417 \"\"\"\n    --> 419 from tensorflow.python.data.experimental.ops.data_service_ops import distribute\n        420 from tensorflow.python.data.experimental.ops.data_service_ops import from_dataset_id\n        421 from tensorflow.python.data.experimental.ops.data_service_ops import register_dataset\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\python\\data\\experimental\\ops\\data_service_ops.py:22, in <module>\n         20 from tensorflow.core.protobuf import data_service_pb2\n         21 from tensorflow.python import tf2\n    ---> 22 from tensorflow.python.data.experimental.ops import compression_ops\n         23 from tensorflow.python.data.experimental.service import _pywrap_server_lib\n         24 from tensorflow.python.data.experimental.service import _pywrap_utils\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\python\\data\\experimental\\ops\\compression_ops.py:16, in <module>\n          1 # Copyright 2020 The TensorFlow Authors. All Rights Reserved.\n          2 #\n          3 # Licensed under the Apache License, Version 2.0 (the \"License\");\n       (...)\n         13 # limitations under the License.\n         14 # ==============================================================================\n         15 \"\"\"Ops for compressing and uncompressing dataset elements.\"\"\"\n    ---> 16 from tensorflow.python.data.util import structure\n         17 from tensorflow.python.ops import gen_experimental_dataset_ops as ged_ops\n         20 def compress(element):\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\python\\data\\util\\structure.py:22, in <module>\n         18 import itertools\n         20 import wrapt\n    ---> 22 from tensorflow.python.data.util import nest\n         23 from tensorflow.python.framework import composite_tensor\n         24 from tensorflow.python.framework import ops\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\python\\data\\util\\nest.py:34, in <module>\n          1 # Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n          2 #\n          3 # Licensed under the Apache License, Version 2.0 (the \"License\");\n       (...)\n         13 # limitations under the License.\n         14 # ==============================================================================\n         16 \"\"\"## Functions for working with arbitrarily nested sequences of elements.\n         17 \n         18 NOTE(mrry): This fork of the `tensorflow.python.util.nest` module\n       (...)\n         31    arrays.\n         32 \"\"\"\n    ---> 34 from tensorflow.python.framework import sparse_tensor as _sparse_tensor\n         35 from tensorflow.python.util import _pywrap_utils\n         36 from tensorflow.python.util import nest\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\python\\framework\\sparse_tensor.py:25, in <module>\n         23 from tensorflow.python import tf2\n         24 from tensorflow.python.framework import composite_tensor\n    ---> 25 from tensorflow.python.framework import constant_op\n         26 from tensorflow.python.framework import dtypes\n         27 from tensorflow.python.framework import ops\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\python\\framework\\constant_op.py:25, in <module>\n         23 from tensorflow.core.framework import types_pb2\n         24 from tensorflow.python.eager import context\n    ---> 25 from tensorflow.python.eager import execute\n         26 from tensorflow.python.framework import dtypes\n         27 from tensorflow.python.framework import op_callbacks\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\python\\eager\\execute.py:21, in <module>\n         19 from tensorflow.python import pywrap_tfe\n         20 from tensorflow.python.eager import core\n    ---> 21 from tensorflow.python.framework import dtypes\n         22 from tensorflow.python.framework import ops\n         23 from tensorflow.python.framework import tensor_shape\n    \n    File ~\\anaconda3\\lib\\site-packages\\tensorflow\\python\\framework\\dtypes.py:37, in <module>\n         34 from tensorflow.core.function import trace_type\n         35 from tensorflow.tools.docs import doc_controls\n    ---> 37 _np_bfloat16 = _pywrap_bfloat16.TF_bfloat16_type()\n         38 _np_float8_e4m3fn = _pywrap_float8.TF_float8_e4m3fn_type()\n         39 _np_float8_e5m2 = _pywrap_float8.TF_float8_e5m2_type()\n    \n    TypeError: Unable to convert function return value to a Python type! The signature was\n    \t() -> handle",
  "label": "r/tensorflow",
  "dataType": "post",
  "communityName": "r/tensorflow",
  "datetime": "2023-06-28",
  "username_encoded": "Z0FBQUFBQm5Lakwwbm9yamxiT1h3OHNXcGFxMGlDdjRBR2lwQV9peUpwNThyMzZpSU5FQjZ2TkRrSjhzSTIteVdXbVo5cG5mVGhGanktTTBvTFVUTEVHYXRHMTBobWFWc3c9PQ==",
  "url_encoded": "Z0FBQUFBQm5Lak9FVWtfNnVscmNEaDB1V3lPMUdYdHFWR1hOSjU1QnZzam5NdEV6Q3JucmRCYXhWVF9KeHd3dGlKU1g1cnlGVmZxLXlCbzk4Y0tPMDR1TmFOZEZ0MUFsT1l5YkRUTnhTdURPMF9kQ0xFbVZJNm1ZUjV5bldGeHhKaHlVRVpDRjNIc1EtaFZPOEN0S0pYNS1DQXpNeExfcVhFd0ZGNnI2UzhjbFgwdUJBTE1FLUZsTHZLWFB5UWloMFRIbUQ2NnVmajRt"
}

Entry Information