Error encountered while setting up Python environment

I am developing a web browser extension and found a tool that will allow me to publish the extension for all browsers from a single code base. This tool is called Open Forge and is developed by Trigger.io .

The installation instructions listed in the Open Commge ReadMe (included in the link above) involve creating and setting up a new python environment. I was able to create and activate a new python environment in my project directory, however the environment setup command (pip install -r requirements.txt) throws the following exception:

Exception:
Traceback (most recent call last):
  File "C:\Users\ian\Documents\Kitchology\browser-extensions\python-env\lib\site
-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "C:\Users\ian\Documents\Kitchology\browser-extensions\python-env\lib\site
-packages\pip\commands\install.py", line 347, in run
    root=options.root_path,
  File "C:\Users\ian\Documents\Kitchology\browser-extensions\python-env\lib\site
-packages\pip\req\req_set.py", line 497, in install
    and req.installed_version in distribute_req):
  File "C:\Users\ian\Documents\Kitchology\browser-extensions\python-env\lib\site
-packages\pip\_vendor\pkg_resources.py", line 2851, in __contains__
    return self.specifier.contains(item, prereleases=True)
  File "C:\Users\ian\Documents\Kitchology\browser-extensions\python-env\lib\site
-packages\pip\_vendor\packaging\specifiers.py", line 651, in contains
    item = parse(item)
  File "C:\Users\ian\Documents\Kitchology\browser-extensions\python-env\lib\site
-packages\pip\_vendor\packaging\version.py", line 41, in parse
    return Version(version)
  File "C:\Users\ian\Documents\Kitchology\browser-extensions\python-env\lib\site
-packages\pip\_vendor\packaging\version.py", line 202, in __init__
    match = self._regex.search(version)
TypeError: expected string or buffer

      

The process hangs at line 17 of the requirements.txt document. Relevant line:

PyHamcrest == 1.6

I also tried this process on Unix (OS X) and ran into the same error.

I can successfully complete the process by listing the latest version of PyHamcrest (1.8) in the requirements .txt file. I've never used PyHamcrest before, and don't feel comfortable thinking about why 1.8 works and 1.6 doesn't.

+3


source to share





All Articles