I am having a lot of issues when uploading a PyPi package, because I have a package that reads information from a TXT file in another directory. This is my project structure:
I can read the files if I do it using my own package from the PyCharm project, but the problem is when I upload it to PyPi
and I import is as a pip package.
I read the file in local this way:
tickers = pd.read_csv('../data/tickers.csv')
But that does not work when I install the package using pip.
I have been trying to configure setup.py
, but with no succeed, because when I install the package uploaded to PyPi using pip, I get an error like this:
FileNotFoundError: [Errno 2] No such file or directory: 'data/user-agent-list.txt'
This is what I have in my setup.py
related to those external files contained in the data/ directory:
I also have a MANIFEST.in to include the data files:
I hope the information I provided is enough for you to let me know how can I fix this... To give you extra information, I am following this tutorial to upload my package to PyPi, but the error has nothing to do with it.
Thank you!