Pycharm uses wrong setup.py file for detecting requirements
Hi,
I have a project where to try and make it as simple as possible the structure is as follows:
Root/
random/
sub_random/
setup.py
random2/
code.py
installer/
requirements.txt
code.py
setup.py (under root)
The idea is that the project contains external code that has its own setup.py (termed random here) and a folder called installer that is sent on its own to install the product (it downloads the code, installs requirements etc).
But code in the various folders (install and random2) are saying that various packages imported are not listed in the requirements. When i try and add them to my surprise it adds them to the setup.py in random and not that at the root of the project or in the requirements.txt file. In the case of code in the install directory i would like to have it ideally in a requirements.txt file there and in the root setup.py, but if need be only in the setup.py. In the case of code in the rest of the project again it should refer to setup.py. I really don't get how a random setup.py (and there are many) got the position of default.
I am trying to figure out how to have pycharm add the requirements to the correct file.
Help?
Please sign in to leave a comment.
Multiple setup.py and requirements.txt files are not supported, please vote for this issue.
Thanks! Is there any way to allow for a single setup.py, but where i can control which? The one will suffice if needed, but it automatically references the wrong one.
Sorry but there is no such opportunity for `setup.py` files, only for `requirements.txt` :(