Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python setup.py egg_info did not run successfully when installing package #182

Open
DavidMarguerit opened this issue Feb 14, 2023 · 8 comments · Fixed by #204
Open

python setup.py egg_info did not run successfully when installing package #182

DavidMarguerit opened this issue Feb 14, 2023 · 8 comments · Fixed by #204

Comments

@DavidMarguerit
Copy link

DavidMarguerit commented Feb 14, 2023

I am trying to install the package on Windows 10 Pro with Python 3.11, but I get the following error message:

Collecting ojd-daps-skills
  Using cached ojd_daps_skills-1.0.1-py3-none-any.whl (60 kB)
Collecting numpy==1.22.4
  Using cached numpy-1.22.4.zip (11.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting ojd-daps-skills
  Using cached ojd_daps_skills-1.0.0.tar.gz (5.3 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\davidm\AppData\Local\Temp\pip-install-2i3_cfyg\ojd-daps-skills_1e86ce5b1e6948448bc7ebe9284edcd0\setup.py", line 19, in <module>
          long_description=open(os.path.join(BASE_DIR, "README.md")).read(),
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\davidm\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 23, in decode
          return codecs.charmap_decode(input,self.errors,decoding_table)[0]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 757: character maps to <undefined>
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
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.

I upgraded pip, setuptools and wheel since I found on the internet that those packages might be the reason for this error. It did not solve the issue. The versions of these packages are:
pip 23.0
setuptools 67.3.1
wheel 0.38.4

Any idea how to solve this issue and install the package?

I also try to install the package using Python 3.10, but I also get an issue, though it is different.

@lizgzil
Copy link
Collaborator

lizgzil commented Feb 14, 2023

hello @Daoudooms - thanks so much for trying to use our package. Unfortunately the package has only been developed to work on Macos and Ubuntu. We haven't been able to test it for Windows and as such I imagine there will be several issues (perhaps not just this one). Are you perhaps able to use it on an Ubuntu EC2 instance, or use a subsystem?

@Aiden-RC
Copy link
Contributor

The specific issue above can be fixed by adding UTF-8 encoding to the open in setup.py

long_description=open(os.path.join(BASE_DIR, "README.md"), encoding="utf-8").read(),

@Aiden-RC
Copy link
Contributor

Aiden-RC commented Feb 14, 2023

If you want to make the package work on windows you'll also have to modify the tag_cmd in setup.py to something like this

tag_cmd = "git describe --tags --abbrev=0" tag_cmd = tag_cmd if platform.system() == "Windows" else f"echo $({tag_cmd})"

@lizgzil
Copy link
Collaborator

lizgzil commented Feb 14, 2023

Thanks for these @Aiden-RC!

@DavidMarguerit
Copy link
Author

Many thanks @lizgzil and @Aiden-RC, for your answers. I'll try them!
and thank you for the package. It looks very amazing.

@Aiden-RC
Copy link
Contributor

Thanks for these @Aiden-RC!

i have a WIP fork containing windows related changes,

I can do a Pull Request once i've confirmed the changes indeed work,
The changes are done in a way so it wont affect any other OS

@lizgzil
Copy link
Collaborator

lizgzil commented Feb 14, 2023

that would be great @Aiden-RC

@Aiden-RC
Copy link
Contributor

that would be great @Aiden-RC

#183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants