question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

installation from a git repo is not working with python version other than 3.5

See original GitHub issue
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS: Debian GNU/Linux 8.0 (jessie)
  • poetry version: 0.12.9

Issue

Trying to install from a private gitlab repo with python 2.7 gives this error:

[RuntimeError]
Unable to retrieve the package version for /tmp/pypoetry-git-xxxxxPmWHI

It looks like SetupReader.read_setup_py will return an empty version for a package with any python version different from 3.5

# file read_setup.py, line 68
def read_setup_py(
        self, filepath
    ):  # type: (Union[basestring, Path]) -> Dict[str, Union[List, Dict]]
        if not PY35:
            return self.DEFAULT

Any reason for that ?

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
tom-micommented, Mar 8, 2019

I’d be happy already if this would work with current python versions like 3.6 or 3.7. Is there a reason that this feature is disabled for later versions?

Thanks for looking into it.

1reaction
sdispatercommented, Feb 29, 2020

It works for Python >=3.5.

The if statement mentioned in the original post is correct, albeit a little misleading.

the PY35 constraint is actually sys.version_info >= (3, 5), so not PY35 actually means ‘sys.version_info < (3, 5)’ which is acually what we want.

Read more comments on GitHub >

github_iconTop Results From Across the Web

installation from a git repo is not working with python version ...
I am on the latest Poetry version. I have searched the issues of this repo and believe that this is not a duplicate....
Read more >
How to change python version in windows git bash?
Follow these steps: Open Git bash, cd ~; Depending on your favorite editor touch , code or vim (in my case) type code...
Read more >
Unable to upgrade Python 3.8.10 to 3.10 - SOLVED
Python 3.8 is the default version that comes with Ubuntu But the latest version is Python 3.10. In this article, we upgrade to...
Read more >
PIP Install Git - A quick read - ActiveState
Click to PIP install Git and use pip together with Git. ... Try a faster and easier way to work with Python packages...
Read more >
Supported Python Versions
With Python 2.7 officially going EOL on 01 Jan 2020, we need a support plan for ... that indicates a different version than...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found