0

I have this public GH repository.

However, if I create a new folder in my local computer, for example my-python-project, set up a virtual environment in there and try to install the package by doing this:

pip install git+https://github.com/jtorre94/dummydf

It will throw this error:

  Cloning https://github.com/jtorre94/dummydf to c:\users\u339990\appdata\local\temp\pip-req-build-0cywtbl6
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\u339990\AppData\Local\Continuum\anaconda3\lib\tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\myuser\\AppData\\Local\\Temp\\pip-req-build-0cywtbl6\\setup.py'

I guess it's missing the setup.py file in the repository, but how can I set that up to get past that error and have the package installed in my virtual environment?

PS: as you can see from my repository, I'm a newbie in python, so any tips on how to improve would be greatly appreciated, although I'm planning to post the repository in code review after I am able to import the package.

EDIT: the associated question was solving how to pip install a package without setup file, but here I would like to create a setup.py file so I can import my library.

Javi Torre
  • 724
  • 8
  • 23
  • 1
    You cannot. For `pip install` to work you must have either `setup.py` or `setup.cfg`. See https://docs.python.org/3/distributing/ and https://packaging.python.org/ – phd Dec 22 '21 at 11:30
  • Yes, sorry, I've explained myself wrong in the question. What I'm asking is how to create the setup.py file so as the pip install works. – Javi Torre Dec 22 '21 at 11:47
  • 1
    Read the docs. Search for examples: [tag:setup.py], [tag:setuptools] – phd Dec 22 '21 at 12:15

0 Answers0