The full path to the folder is /Users/User/M/M1/DS project
I have tried these filenames, Test, Test.xlsx, Test.xlsx.xlsx but doesn't seem to help.
I believe it should be a simple fix but I just can't find the solution after reading so many relevant posts. Can someone help please? Thanking in advance.
CodePudding user response:
Please try and use the full file path and see if the issue persists. In my experience VS code runs the python script in a different location than where it is saved. So it might be looking for the file in a different directory than where it is saved.
CodePudding user response:
You must use the python virtualenv model for your projects. This provides an environment for the program to understand the connection of your files.
- Create a directory and put your files in it.
- Open terminal and install virtualenv :
pip install virtualenv
- In terminal, Get in the project directory and create new venv:
python -m virtualenv venv
- Now you have to active you venv:
source venv/bin/activate
now start runnig your project.
for deactivate directory just type:
deactivate