stickerpicker icon indicating copy to clipboard operation
stickerpicker copied to clipboard

Installation on Windows now failing

Open pulpocaminante opened this issue 2 years ago • 3 comments

Seems to be an environment variable issue

amnesia ❯ git init .
Reinitialized existing Git repository in [ Truncated ]
                                                             
amnesia ❯ pip install .
Processing  [ Truncated ]\stickerpicker
  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 " [ Truncated ]\stickerpicker\setup.py", line 3, in <module>
          from sticker.get_version import git_tag, git_revision, version, linkified_version
        File " [ Truncated ]\stickerpicker\sticker\get_version.py", line 9, in <module>

Specifically:

          "HOME": os.environ["HOME"],
        File " [ Truncated ]\Python\Python310\lib\os.py", line 680, in __getitem__
          raise KeyError(key) from None
      KeyError: 'HOME'
      [end of output]

Although setting %HOME%=anything has no effect on this error.

pulpocaminante avatar Jan 25 '23 03:01 pulpocaminante

hey I was able to actually fix this!

change these two lines in setup.py and get_version.py

get_version.py "HOME": os.environ["USERPROFILE"], and setup.py long_desc = open("README.md", encoding="utf-8").read()

this fixed it for me

Lewko6702 avatar Apr 07 '23 00:04 Lewko6702

editing setup.py is required, but with the home env variable you can just type

 $env:HOME = $env:USERPROFILE

beforehand

iraizo avatar Jun 22 '23 18:06 iraizo

ah yeah that is a much better solution

Lewko6702 avatar Jun 22 '23 20:06 Lewko6702