Reputation: 74
I am new to python and pycharm tool. I have created a project and checked in Git hub. Now one of my friend pulled the changes and tried to run and he encountered with an error message stating "No interpreters found". When i revalidated the project structure i found that i have 'venv' folder in my project but the person who pulled the changes dosent have it.
Can you please help me on this.
Thanks in Advance!
PS: I am using Windows OS
Upvotes: 0
Views: 5580
Reputation: 5190
As you've said you're new to Python, I'll try to explain how things work in Python projects.
Steps to do setup on your another machine.
pip freeze
and write them to a text file which contains library names and versions. Add this file to your project. Convention is to name it as requirements.txt
. Refer this https://pip.pypa.io/en/stable/reference/pip_freeze/Note: It's not suggested to have venv folder which contains all your packages inside your project directory itself. You may have to add the folder to .gitignore
just for this purpose.
You might want to take a look at .idea
folder in project directory. But I don't think that would be much useful.
Upvotes: 1
Reputation: 5037
Usually, you don't check in your venv folder.
Save the output of pip freeze
in a file called requirements.txt
and check that into your repo.
Once your friend gets the full code, they can install the dependencies using pip install -r requirements.txt
Upvotes: 1