#πŸ”’ Modules help

5 messages Β· Page 1 of 1 (latest)

true belfry
#

hello everyone. i am doing an image classification project using tensor flow and opencv. i am already having some problems with the installation of those modules. I have asked chatgpt but he is unable to help me so i wanted to ask you:
i think i have a version mismatch from the installed modules and i dont know how to fix it. can anyone help me with that?

here is the error:
2 import numpy as np
3 import matplotlib.pyplot as plt
----> 4 from tensorflow.keras import datasets, layers, models

File c:\Users\gregl\AppData\Local\Programs\Python\Python312\Lib\site-packages\tensorflow__init.py:49
46 from tensorflow.python import tf2 as _tf2
47 _tf2.enable()
---> 49 from tensorflow._api.v2 import internal
50 from tensorflow._api.v2 import operators
51 from tensorflow._api.v2 import audio

File c:\Users\gregl\AppData\Local\Programs\Python\Python312\Lib\site-packages\tensorflow_api\v2__internal__init.py:13
11 from tensorflow._api.v2.internal import distribute
12 from tensorflow._api.v2.internal import eager_context
---> 13 from tensorflow._api.v2.internal import feature_column
14 from tensorflow._api.v2.internal import function
15 from tensorflow._api.v2.internal import graph_util

File c:\Users\gregl\AppData\Local\Programs\Python\Python312\Lib\site-packages\tensorflow_api\v2__internal\feature_column__init.py:8
3 """Public API for tf.api.v2.internal.feature_column namespace
4 """
6 import sys as sys
...
425 return char.chararray
--> 427 raise AttributeError("module {!r} has no attribute "
428 "{!r}".format(name
, attr))

AttributeError: module 'numpy' has no attribute '_no_nep50_warning'

mild quartzBOT
#

@true belfry

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

covert pewter
#

What are your versions of libs?
I see you're not using a venv. I found that some people got a similar error in the past with some lib conflicts... So starting fresh with a venv and installing only what needed might help?

mild quartzBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.