broke my venv
-
I'm not sure how I managed it, but I broke my venv. I'm using Qt Creator and going through a bunch of tutorials. I have been using a single venv which included PySide6. This has been working for some time, but now, none of my tutorial projects works. When I run a project from within Qt Creator, or from the command line, I get the same result:
C:\Users\mikek\cloud\VBPjts\python\qt\tutorials\venv\Scripts\python.exe: can't find '__main__' module in 'C:\\Users\\mikek'The *.py files are in the tutorials directory, but the venv python.exe call is now looking in a directory 4 levels up.
Anyone know where this gets fixed?
Note, most of these *.py files have a main function:
if name == 'main': -
There is no
__init__.py.I'm on Win11, and there is no PYTHONPATH environment variable.
No, it doesn't happen with a dummy script.
I think my question is wrong. It looks to be a QT Creator settings issue. It doesn't work in QT Creator. But if I activate the correct venv in a terminal window, I can run these scripts successfully.
The problem seems to be that when I run a script from within Qt Creator it is looking for a script with the name of a directory 4 levels up from my working directory. I'm looking for working directory settings...
I solved it. I couldn't figure out how it broke or how to fix it. But I was able to delete it and create another one in its place. The new one works fine.
-
Hi,
Do you have any
__init__.pyfile in your project folder ?Was there a change to the
PYTHONPATHenvironment variable ?Does it also happen with a dummy script ?
-
Hi,
Do you have any
__init__.pyfile in your project folder ?Was there a change to the
PYTHONPATHenvironment variable ?Does it also happen with a dummy script ?
There is no
__init__.py.I'm on Win11, and there is no PYTHONPATH environment variable.
No, it doesn't happen with a dummy script.
I think my question is wrong. It looks to be a QT Creator settings issue. It doesn't work in QT Creator. But if I activate the correct venv in a terminal window, I can run these scripts successfully.
The problem seems to be that when I run a script from within Qt Creator it is looking for a script with the name of a directory 4 levels up from my working directory. I'm looking for working directory settings...
-
There is no
__init__.py.I'm on Win11, and there is no PYTHONPATH environment variable.
No, it doesn't happen with a dummy script.
I think my question is wrong. It looks to be a QT Creator settings issue. It doesn't work in QT Creator. But if I activate the correct venv in a terminal window, I can run these scripts successfully.
The problem seems to be that when I run a script from within Qt Creator it is looking for a script with the name of a directory 4 levels up from my working directory. I'm looking for working directory settings...
I solved it. I couldn't figure out how it broke or how to fix it. But I was able to delete it and create another one in its place. The new one works fine.
-
C CryptoJake has marked this topic as solved on