#๐ How do I fix this error?
29 messages ยท Page 1 of 1 (latest)
@lyric viper
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.
Hmm, it looks like Pycharm is trying to use a virtual environment that doesn't exist or has missing files
Did you create the virtual environment yourself or let Pycharm manage it?
Either way, I think creating a new virtual environment through Pycharm should fix the issue https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html#python_create_virtual_env
I deleted my previous project and created a new one. Pycharm made venv himself
Maybe I need to edit .venv/Scripts/activate.ps1?
Also it installs python packages to c:\users\user\appdata\local\programs\python\python312\lib\site-packages and not venv
That's a script that is automatically created when you make a virtual environment, and the error is saying it doesn't exist. There shouldn't be any need to edit/create the file manually
What do you mean by "it", pycharm or pip?
pip of course
Guess I will just transfer my files into a new project
It works just fine
Do you want to use a virtual environment or are you happy installing any libraries to your system python installation?
It sounds like you just need to reconfigure the interpreter/venv that PyCharm is using because it's trying to use one that doesn't exist
Oh it isn't, the name 'My Stuff' makes that error. Strange
I am using venv for my projects. This is just one I use for random scripts
For some reason it stopped working
Any other name works fine
ahhh, maybe it's because there's a space in the name
Right, sorry for leading you down the wrong path there, I should have realised since it's only highlighted up to "My" here!
Now error is gone, I really thought I was able to use spaces in naming things before
Thanks anyway
I would have expected PyCharm to support it fine, but yeah, sometimes spaces in paths do cause issues
!close
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.