qntm / greenery

Regular expression manipulation library
http://qntm.org/greenery
MIT License
331 stars 40 forks source link

Installation issue with pip #66

Closed tokamage closed 2 years ago

tokamage commented 2 years ago

There seems to be an issue in the setup that prevents pip from installing the package:


pip3 install https://github.com/ferno/greenery/archive/master.zip
 Collecting https://github.com/ferno/greenery/archive/master.zip        
  Downloading https://github.com/ferno/greenery/archive/master.zip     
     - 51.9 kB 3.2 MB/s 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 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\username\AppData\Local\Temp\pip-req-build-j7vs03bj\setup.py", line 3, in <module>
          from greenery import __version__
      ImportError: cannot import name '__version__' from 'greenery' (C:\Users\lukas.rudischhauser\AppData\Local\Temp\pip-req-build-j7vs03bj\greenery\__init__.py)
      [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.``` 
qntm commented 2 years ago

The code in the repo isn't intended to be directly installed in that way - the code is subject to rapid change without warning. To get a stable version of the package, try pip install greenery to install directly from PyPI instead. I have added a note to the README clarifying this point.

tokamage commented 2 years ago

Thank you! I was following this stackoverflow post which was written several years ago when the other installation method may not have been available.