0

enter image description hereI just created a set of functions for retrieving data of API so I shared it on my githhub website. I tried to install my packages on google colab using pip install git+url but the only a get is the following error:

  • Exit code 1

note: This error originates from a subprocess, and is likely not a problem with pip. Preparing metadata (setup.py) ... error error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

I'm new at github so i don't know if there is something that I'm missing at setting up my packages.

I would be grateful if someone can help me I left my git below

https://github.com/maxelOA/py_erpy2set.git

  • did you run `pip install git+https://github.com/maxelOA/erpy2set`? what is your error message? please post the whole thing – Matthias Feb 20 '23 at 13:57
  • Yes, I did It but I don't know why is not working. I get the following error message :error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. – Miguel Carrillo Feb 20 '23 at 14:27
  • I did a little online searching and it seems that could be a problem with the dependencies , more specifically with numpy package for some unknown reason – Miguel Carrillo Feb 20 '23 at 14:33
  • it would be helpful to see the "see above for output" part the message is referring to.. – Matthias Feb 20 '23 at 14:40
  • error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. Preparing metadata (setup.py) ... error error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. – Miguel Carrillo Feb 20 '23 at 15:50
  • I also added an image at the entry – Miguel Carrillo Feb 20 '23 at 15:50
  • very strange if there's no way to see the actual python stack trace, but I ran the command in a console and was able to see the error, see my answer it should fix this. But I would see if you can't find the same output I got, about the syntax error somehow in your environment. – Matthias Feb 20 '23 at 15:52
  • because that error is not very helpful, it only says there's a problem with the package (the one on the github link) and not with pip – Matthias Feb 20 '23 at 15:54

1 Answers1

0

There's a syntax error in your setup.py script. You have two ++ at the bottom. Try removing those, should solve this error.

This is why it's helpful to get the full error message (stack trace), when I tried running this on my console I got error message:

    ERROR: Command errored out with exit status 1:
     command: /home/matthias/projects/playground/as_env/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/matthias/projects/playground/as_env/src/erpy2set/setup.py'"'"'; __file__='"'"'/home/matthias/projects/playground/as_env/src/erpy2set/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-4we41jtq
         cwd: /home/matthias/projects/playground/as_env/src/erpy2set/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/matthias/projects/playground/as_env/src/erpy2set/setup.py", line 17
        ++
          ^
    SyntaxError: invalid syntax
    ----------------------------------------
WARNING: Discarding git+https://github.com/maxelOA/erpy2set#egg=erpy2set. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement erpy2set (unavailable) (from versions: none)
ERROR: No matching distribution found for erpy2set (unavailable)
WARNING: You are using pip version 21.2.3; however, version 23.0.1 is available.
You should consider upgrading via the '/home/matthias/projects/playground/as_env/bin/python -m pip install --upgrade pip' command.

Which then prompted me to look at the setup.py file.

The error message you posted must be just the error from google colab or whatever ide you are using, there must be some way to see the "see the above for output" part to get the more relevant info.

Matthias
  • 3,160
  • 2
  • 24
  • 38
  • Thank you, actually that was the problem, it's already working – Miguel Carrillo Feb 20 '23 at 23:44
  • and did you find out how to get the full error message with your setup? it would help you in the future – Matthias Feb 22 '23 at 09:11
  • 1
    Sorry for the delay, I didn't find how to see the full messages, I just delete the extra '++' on the setup file but didn't work at first but it was my fault because I was using .rm extension on **long_description** argument instead of .txt but the main problem was solved because of you. If I found how to see more details about this issue on "collab" I would be glad to back with the answer – Miguel Carrillo Feb 23 '23 at 15:05