#๐ Help me with my project
53 messages ยท Page 1 of 1 (latest)
@potent yarrow
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.
and my problem is, my code is not function anymore since I update an extension "Inference"
Are you getting an error?
yup
2024-11-08 21:53:39.220 [debug] Shell Integration is disabled, sendText: & "c:/Users/mauwl/OneDrive/Desktop/PPE Detection/.venv/Scripts/python.exe" "c:/Users/mauwl/OneDrive/Desktop/PPE Detection/Monitor.py"
That doesn't look like an error.
Traceback (most recent call last):
File "c:\Users\mauwl\OneDrive\Desktop\PPE Detection\Monitor.py", line 7, in <module>
from inference import InferencePipeline
ModuleNotFoundError: No module named 'inference'
There's two common problems:
Multiple versions of python: you might've installed it into a different version of python. That's OK and we can fix that
Or, virtual environments: in one version of python, you can create multiple environments, each with different installed packages.
How are you running the code?
I'm running on Visual Code Studio
Ok, so you're probably running two different versions of Python between vscode and command prompt. Common problem.
Run this command in terminal and paste what you get: py -0
And I use before its okay, but when I go on update then the code not work
-3.9-64 *
-3.12-64
Great. And in VSCode, what do you see in bottom right?
3.9.13 64 bit
Ok, then run: py -m pip install inference
From now on, use "py -m pip" instead of pip.
"py" lets you choose the version of python you want to use, and avoids some path issues you probably had... I bet Python 3.12 is in your path.
okay done install inference
and just two problems rn
Import "watchdog.observers" could not be resolved
Import "watchdog.events" could not be resolved
I use python 3.9.13 for my project, cause the latest one not suitable for my project
Yup, so "py" is making sure you're using 3.9. And vscode is set to 3.9, so that part is good.
!pypi watchdog
You probably need to install that too.
done with that
It looks like you posted your API key. You should reset it
thanks, didn't see... I deleted this as a precaution, but yes: reset/invalidate that key.
I don't know anything about this stuff, I was just helping with the module install stuff.
yup, thats why I ask hehe.
I use this code for labeling and make some clasification on video image that've been seen from FTP server and store it (video image) on :C/alarm.
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.