#🔒 Anyone able to help ?
71 messages · Page 1 of 1 (latest)
@supple pilot
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.
Hello, please show the whole code and the whole output of trying to run the code
!paste
So that everyone can easily read your code, you can paste it in this website:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
C:\Users\Marsh>python -c "import cv2; print(cv2.file)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
import cv2; print(cv2.file)
^^^^^^^^^^
ModuleNotFoundError: No module named 'cv2'
(gtuner) C:\Users\Marsh>python -c "import cv2; print(cv2.file)"
C:\Users\Marsh\miniconda3\envs\gtuner\cv2_init_.py
try python -m pip install opencv-python, then run that command again.
are u running the code out of your conda env and only have it installed in the env?
(gtuner) C:\Users\Marsh>python -m pip install opencv-python
Requirement already satisfied: opencv-python in c:\users\marsh\miniconda3\envs\gtuner\lib\site-packages (4.5.5.64)
Requirement already satisfied: numpy>=1.14.5 in c:\users\marsh\miniconda3\envs\gtuner\lib\site-packages (from opencv-python) (1.24.4)
but when you run the code are you running it in the gtuner conda env?
@strong vault you are now the official answerer for this channel, as I don't know how to help with conda issues.
no problem I use miniconda so I should hopefully be able to help
@supple pilot lmk if you are running the code within your conda environment or not
But it’s definitely installedmy bad I’m dealing with my kids one sec
no problem. but a library can be installed within your miniconda environment however if you run code outside of the environment (interpreter isnt pointed to it) then it wont use your library
How can I check to see if I’m running it from the env
are you using vscode?
I see the env folder
how are you running your file? through vscode or some otehr ide or from your terminal?
I’m running it from the anaconda terminal
But it’s all there ,but Gtuner keeps saying the module can’t be found
try running where python and conda list opencv and send the output.
also when you run ur file do you see the (gtuner) prefix?
can u run ur file in that terminal and send that output too
If you don’t mind , how could I do that ? I’m not that advanced like you ðŸ˜ðŸ˜
python yourfilename.py
how were you running your file before, did you run it elsewhere?
Yes I was running it though Gtuner I put the file location so it can find python and open cv module. But it’s only finding python not open cv
in this terminal try running your file by doing python yourfilename.py replacing "yourfilename" with the acc name of your file and see if it runs there
and send the output
because from what I see here cv2 is installed in your gtuner environment so it must be something to do with how you are running your script
So would it be python Gtuner.py ?
I believe I wrote is in miniconda3
See I don’t think I got it set up right ðŸ˜ðŸ˜
Yeah I believe Gtuner just can’t find the file , because it’s there
no it found the file for the library i can see that here
but that is the libraries file you dont run that. You write your own code and import the library into your own file and run that not the acc library files
Ah okay ðŸ˜ðŸ˜ okay let me try to learn a bit more
you can always make another thread to ask more questions as well!
have you tried gtuner before ?
is that not the name of your conda environment or is it something else I'm missing?
Gtuner is a tool , I’m asking because it’s not really known
ah yea no I have not
It looks like this
ah gotchu
Yeah , I’m just confused on why it’s not finding the module if it’s all in the files
in here try pressing browse and isntead of selecting the python38.dll file select python.exe
and see if that makes a difference
because in your earlier screen shots I can clearly see that the mini conda enviornment can find the library so its gtuner being a bit weird
you might also just have to restart gtuner after u select the exe
it wont be a folder
try scrolling down in there and see if u can find a file called python.exe and if it lets u select it
if it wont let u pick the acc file just click on the gtuner folder and try that and restart
I know what it is , it’s just Gtuner isn’t allowing me to go to it
because your conda enviornment can see opencv try to maybe uninstall and reinstall the library and restart gtuner just to troubleshoot
i think he might need 3.8 for his purpose could be wrong though
I tried newer versions it was the same outcome unfortunately that’s why I thought if I downgraded it’ll work
Someone from the Gtuner discord said it’s a bug ,others are going through the same.
ah well there u go
but yea everything else does seem to be working perfectly fine so no problem there
Yeah I appreciate the help
no problem
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.