Mike Jones
Mike Jones

Reputation: 53

Error while trying to port a repo from github

There is a github code I am trying to use that is located here.

I am trying to run params.py which is a code that will take a binary file and converts it so that I can plot it (or so I think).

I tried to run:

pip install git+https://github.com/PX4/pyulog.git

However, that gave me an error:

C:\Users\Mike\Documents>pip install git+https://github.com/PX4/pyulog.git
Collecting git+https://github.com/PX4/pyulog.git
  Cloning https://github.com/PX4/pyulog.git to c:\users\mike\appdata\local\temp\pip-t_vvh_b0-build
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Anaconda3\lib\tokenize.py", line 454, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Mike\\AppData\\Local\\Temp\\pip-t_vvh_b0-build\\setup.py'

Upvotes: 0

Views: 163

Answers (1)

Nishu Tayal
Nishu Tayal

Reputation: 20840

Pip install tries to install the module from :

  • PyPI (and other indexes) using requirement specifiers.
  • VCS project urls.
  • Local project directories.
  • Local or remote source archives.

When looking at the items to be installed, pip checks what type of item each is, in the following order:

  • Project or archive URL.
  • local directory (which must contain a setup.py, or pip will report an error).
  • Local file (a sdist or wheel format archive, following the naming conventions for those formats).
  • A requirement, as specified in PEP 440.

In your case, git repo doesn't meet the requirement. It doesn't have setup.py that's why you get the error.
Instead try cloning the repo on your local machine.

Upvotes: 1

Related Questions