I'm just trying to get advice on if i'm doing this correctly.
I typically use Python for purposes similar to data science. I've tried Anaconda/Spyder before, but certains functionalities in Pycharm and its flexible customization makes it more appealing to me. I've been using Pycharm for about 2 years now and I've had the chance to work on numerous projects, many which are standalone and will probably never be looked by anybody other than me. Consequently, I don't need (but would be good practice) to think about importing my scripts to other users.
Whenever I have a new project, I will create a new virtual environment to avoid clogging my Python with too many packages that are sometimes too specific for a specific project. However, there are certain packages and homemade functions/classes that I will often reuse on more than one project. As a result, I've created a project that I attach to other projects in order to avoid having to redownload the packages and copy-paste the homemade scripts (and having to modify each of them individually). This is where things get messy.
After creating a new project (called "pythonProject") I will attach the universal project (called "WeatherData", also a virtual environment) by going on "File/Open" and that clicking on "Attach" when the following window appears :
The project window will then look like the following :
This will allow me to get the homemade scripts in WeatherData, but I'm still missing the packages from WeatherData. To do this, I do the following : I go on Settings in the Python Interpreter where I can choose between pythonProject and WeatherData. I want the packages that are in WeatherData. Typically the interpreter would look like this :
But instead i'm selecting the WeatherData interpreter to get this :
Like this I have the homemade scripts and the packages... but this all feels very scrappy and also I lose the ability to download/use packages that I would only want for pythonProject.
If I want to use a project in multiple projects in order to avoid re downloading certain packages and also using scripts that I've made myself, is there a better way than what i'm doing? Maybe I should just move all the scripts and packages from WeatherData into the default Python environment?