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

Pipenv install relative paths fails when the Pipfile is not in current directory. #3776

Closed
yssource opened this issue Jun 2, 2019 · 8 comments
Labels
Type: Bug 🐛 This issue is a bug.

Comments

@yssource
Copy link

yssource commented Jun 2, 2019

#2896
#2896 (comment)
@techalchemy
This happens to me also.
Yes, I am using pyenv-virtualenv

pyenv

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
  eval "$(pyenv init -)"
  eval "$(pyenv virtualenv-init -)"
fi

pipenv

export WORKON_HOME=~/.venvs
export PIPENV_PYTHON=$PYENV_ROOT/shims/python
export PIPENV_IGNORE_VIRTUALENVS=1
export PIP_IGNORE_INSTALLED=1
export PIPENV_PIPFILE=/home/jimmy/.venvs/quant/Pipfile

if command -v pipenv 1>/dev/null 2>&1; then
  eval "$(pipenv --completion)"
fi

Reproduce

  1. mkdir -v /tmp/hello && cd /tmp/hello
  2. pipenv --python=/home/jimmy/.pyenv/versions/3.7-dev/envs/quant/bin/python --site-packages
  3. pipenv --venv
    /home/jimmy/.venvs/quant-6R1YVBAt-/home/jimmy/.pyenv/shims/python

Actual Result

pipenv --venv
/home/jimmy/.venvs/quant-6R1YVBAt-/home/jimmy/.pyenv/shims/python

Expected Result

pipenv --venv
/home/jimmy/.venvs/quant-6R1YVBAt-${python_version}
Or
/home/jimmy/.venvs/quant-6R1YVBAt

pipenv --suport

<details><summary>$ pipenv --support</summary>

Pipenv version: `'2018.11.27.dev0'`

Pipenv location: `'/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv'`

Python location: `'/home/jimmy/.pyenv/versions/3.7-dev/bin/python3.7'`

Python installations found:

  - `3.7.3`: `/home/jimmy/.pyenv/versions/3.7-dev/bin/python3`
  - `3.7.3`: `/home/jimmy/.pyenv/versions/3.7-dev/bin/python3.7m`
  - `3.7.3`: `/home/jimmy/.pyenv/versions/anaconda3-2019.03/bin/python3`
  - `3.7.3`: `/home/jimmy/.pyenv/versions/3.7-dev-debug/bin/python3`
  - `3.7.3`: `/home/jimmy/.pyenv/versions/quant/bin/python3`
  - `3.7.3`: `/home/jimmy/.pyenv/versions/ana-devel/bin/python3`
  - `3.7.3`: `/home/jimmy/.pyenv/versions/373debug/bin/python3`
  - `3.7.3`: `/usr/bin/python3`
  - `3.7.3`: `/usr/bin/python3.7m`
  - `3.7.1`: `/home/jimmy/.pyenv/versions/anaconda3-2018.12/bin/python3`
  - `2.7.16`: `/usr/bin/python2`

PEP 508 Information:

{'implementation_name': 'cpython',
'implementation_version': '3.7.3',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.19.47-1-MANJARO',
'platform_system': 'Linux',
'platform_version': '#1 SMP PREEMPT Fri May 31 16:47:49 UTC 2019',
'python_full_version': '3.7.3+',
'python_version': '3.7',
'sys_platform': 'linux'}


System environment variables:

  - `SHELL`
  - `PIPENV_PYPI_MIRROR`
  - `LSCOLORS`
  - `SESSION_MANAGER`
  - `WINDOWID`
  - `PYENV_HOOK_PATH`
  - `COLORTERM`
  - `PYENV_SHELL`
  - `XDG_CONFIG_DIRS`
  - `LESS`
  - `XDG_SESSION_PATH`
  - `XDG_MENU_PREFIX`
  - `GTK_IM_MODULE`
  - `PKG_CONFIG_PATH`
  - `ABQ_HOME`
  - `LC_ADDRESS`
  - `LC_NAME`
  - `SSH_AUTH_SOCK`
  - `TF_HOME`
  - `XMODIFIERS`
  - `DESKTOP_SESSION`
  - `LC_MONETARY`
  - `SSH_AGENT_PID`
  - `XTENSOR_CMAKE_INSTALL_PREFIX`
  - `SECRETS_FILE`
  - `GDK_CORE_DEVICE_EVENTS`
  - `PIPENV_PIPFILE`
  - `GPG_TTY`
  - `EDITOR`
  - `PYENV_VERSION`
  - `GTK_MODULES`
  - `XDG_SEAT`
  - `ABQ_CXX_TEST_HOME`
  - `GPG_ID`
  - `PWD`
  - `PYENV_VIRTUALENV_INIT`
  - `LOGNAME`
  - `XDG_SESSION_DESKTOP`
  - `QT_QPA_PLATFORMTHEME`
  - `TFDIR`
  - `XDG_SESSION_TYPE`
  - `CXX`
  - `XAUTHORITY`
  - `FZF_DEFAULT_COMMAND`
  - `XDG_GREETER_DATA_DIR`
  - `GTK2_RC_FILES`
  - `WINEARCH`
  - `HOME`
  - `AUTOJUMP_ERROR_PATH`
  - `LC_PAPER`
  - `LANG`
  - `WINEPREFIX`
  - `LS_COLORS`
  - `XDG_CURRENT_DESKTOP`
  - `VTE_VERSION`
  - `CMAKE_PREFIX_PATH`
  - `XDG_SEAT_PATH`
  - `PERL5LIB`
  - `PIPENV_IGNORE_VIRTUALENVS`
  - `PYENV_DIR`
  - `PIPENV_COLORBLIND`
  - `NVM_DIR`
  - `WORKON_HOME`
  - `XDG_SESSION_CLASS`
  - `SECRETS_HOME`
  - `PYTHONPATH`
  - `TERM`
  - `LC_IDENTIFICATION`
  - `FZF_CTRL_T_COMMAND`
  - `ZSH`
  - `PERL_MB_OPT`
  - `USER`
  - `PIP_IGNORE_INSTALLED`
  - `FZF_CTRL_T_OPTS`
  - `PERL_MM_OPT`
  - `AUTOJUMP_SOURCED`
  - `DISPLAY`
  - `SHLVL`
  - `NVM_CD_FLAGS`
  - `PAGER`
  - `LC_TELEPHONE`
  - `QT_IM_MODULE`
  - `LC_MEASUREMENT`
  - `XDG_VTNR`
  - `XDG_SESSION_ID`
  - `LD_LIBRARY_PATH`
  - `MOZ_PLUGIN_PATH`
  - `LC_CTYPE`
  - `XDG_RUNTIME_DIR`
  - `FZF_BASE`
  - `ABQ_CXX_HOME`
  - `QTDIR`
  - `YAML_CPP_HOME`
  - `PYENV_ROOT`
  - `LC_TIME`
  - `LC_ALL`
  - `QT_AUTO_SCREEN_SCALE_FACTOR`
  - `XDG_DATA_DIRS`
  - `PERL_LOCAL_LIB_ROOT`
  - `PATH`
  - `CC`
  - `GDMSESSION`
  - `DBUS_SESSION_BUS_ADDRESS`
  - `FZF_DEFAULT_OPTS`
  - `HG`
  - `NVM_BIN`
  - `MAIL`
  - `PIPENV_PYTHON`
  - `LC_NUMERIC`
  - `OLDPWD`
  - `PIP_DISABLE_PIP_VERSION_CHECK`
  - `PYTHONDONTWRITEBYTECODE`
  - `PIP_SHIMS_BASE_MODULE`
  - `PIP_PYTHON_PATH`
  - `PYTHONFINDER_IGNORE_UNSUPPORTED`

Pipenv–specific environment variables:

 - `PIPENV_PYPI_MIRROR`: `https://pypi.tuna.tsinghua.edu.cn/simple/`
 - `PIPENV_PIPFILE`: `/home/jimmy/.venvs/quant/Pipfile`
 - `PIPENV_IGNORE_VIRTUALENVS`: `1`
 - `PIPENV_COLORBLIND`: `1`
 - `PIPENV_PYTHON`: `/home/jimmy/.pyenv/shims/python`

Debug–specific environment variables:

  - `PATH`: `/home/jimmy/.pyenv/versions/3.7-dev/bin:/home/jimmy/.pyenv/libexec:/home/jimmy/.pyenv/plugins/python-build/bin:/home/jimmy/.pyenv/plugins/pyenv-virtualenv/bin:/home/jimmy/.pyenv/plugins/pyenv-update/bin:/home/jimmy/.pyenv/plugins/pyenv-doctor/bin:/home/jimmy/.local/bin:/home/jimmy/perl5/bin:/home/jimmy/.cask/bin:/opt/treefrog/bin:/home/jimmy/Qt/5.12.1/gcc_64/bin:/home/jimmy/.nvm/versions/node/v10.15.0/bin:/home/jimmy/perl5/bin:/home/jimmy/.pyenv/plugins/pyenv-virtualenv/shims:/home/jimmy/.pyenv/shims:/home/jimmy/.pyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/jimmy/.antigen/bundles/robbyrussell/oh-my-zsh/lib:/home/jimmy/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git:/home/jimmy/.antigen/bundles/gmatheu/zsh-plugins/profile-secrets:/home/jimmy/.antigen/bundles/gmatheu/zsh-plugins/password-store`
  - `SHELL`: `/bin/zsh`
  - `EDITOR`: `vim`
  - `LANG`: `en_US.UTF-8`
  - `PWD`: `/tmp/banana`


---------------------------

Contents of `Pipfile` ('/home/jimmy/.venvs/quant/Pipfile'):

```toml
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
requests = "*"
python-language-server = {extras = ["all"],version = "*"}
pyls-isort = "*"
pyls-mypy = "*"
flake8 = "*"
autoflake = "*"
ptvsd = ">=4.2"
importmagic = "*"
epc = "*"
nose = "*"

[packages]

[requires]
python_version = "3.7"

Contents of Pipfile.lock ('/home/jimmy/.venvs/quant/Pipfile.lock'):

{
    "_meta": {
        "hash": {
            "sha256": "76f6ae38ee3b8ce485d5fd8fed6c92e9ae8601a2b6fc2fa3675cce4775d71f92"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.7"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {},
    "develop": {
        "astroid": {
            "markers": "python_version >= '3.4'",
            "version": "==2.2.5"
        },
        "autoflake": {
            "index": "pypi",
            "version": "==1.3"
        },
        "autopep8": {
            "version": "==1.4.4"
        },
        "certifi": {
            "version": "==2019.3.9"
        },
        "chardet": {
            "version": "==3.0.4"
        },
        "entrypoints": {
            "markers": "python_version >= '2.7'",
            "version": "==0.3"
        },
        "epc": {
            "index": "pypi",
            "version": "==0.0.5"
        },
        "flake8": {
            "index": "pypi",
            "version": "==3.7.7"
        },
        "future": {
            "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
            "version": "==0.17.1"
        },
        "idna": {
            "version": "==2.8"
        },
        "importlib-metadata": {
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
            "version": "==0.17"
        },
        "importmagic": {
            "index": "pypi",
            "version": "==0.1.7"
        },
        "isort": {
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
            "version": "==4.3.20"
        },
        "jedi": {
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
            "version": "==0.13.3"
        },
        "lazy-object-proxy": {
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
            "version": "==1.4.1"
        },
        "mccabe": {
            "version": "==0.6.1"
        },
        "mypy": {
            "version": "==0.701"
        },
        "mypy-extensions": {
            "version": "==0.4.1"
        },
        "nose": {
            "index": "pypi",
            "version": "==1.3.7"
        },
        "parso": {
            "version": "==0.4.0"
        },
        "pluggy": {
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
            "version": "==0.12.0"
        },
        "ptvsd": {
            "index": "pypi",
            "version": "==4.2.10"
        },
        "pycodestyle": {
            "version": "==2.5.0"
        },
        "pydocstyle": {
            "version": "==3.0.0"
        },
        "pyflakes": {
            "version": "==2.1.1"
        },
        "pylint": {
            "version": "==2.3.1"
        },
        "pyls-isort": {
            "index": "pypi",
            "version": "==0.1.1"
        },
        "pyls-mypy": {
            "index": "pypi",
            "version": "==0.1.6"
        },
        "python-jsonrpc-server": {
            "version": "==0.1.2"
        },
        "python-language-server": {
            "extras": [
                "all"
            ],
            "index": "pypi",
            "version": "==0.26.1"
        },
        "requests": {
            "index": "pypi",
            "version": "==2.22.0"
        },
        "rope": {
            "version": "==0.14.0"
        },
        "sexpdata": {
            "version": "==0.0.3"
        },
        "six": {
            "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
            "version": "==1.12.0"
        },
        "snowballstemmer": {
            "version": "==1.2.1"
        },
        "typed-ast": {
            "markers": "implementation_name == 'cpython'",
            "version": "==1.3.5"
        },
        "urllib3": {
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' and python_version < '4'",
            "version": "==1.25.3"
        },
        "wrapt": {
            "version": "==1.11.1"
        },
        "yapf": {
            "version": "==0.27.0"
        },
        "zipp": {
            "markers": "python_version >= '2.7'",
            "version": "==0.5.1"
        }
    }
}
@yssource
Copy link
Author

yssource commented Jun 2, 2019

What's more. I find another two problems. (1.) (3.)

With the same virtual environment as above, The Pipfile is placed different from where my local development project is. For exmaple

export PIPENV_PIPFILE=/home/jimmy/.venvs/quant/Pipfile
But my project is /tmp/click.
Then pipenv shell my virtual environment.

  1. Failing
    pipenv install -e git+git@github.com:pallets/click.git#egg=click --dev is OK to install.
    But, the content of the click.egg-link is /tmp/requirementslibwss9zxat/click, which does not exist.
    import click
    ModuleNotFoundError: No module named 'click'

  2. Working
    git clone https://github.com/pallets/click.git and then pip install -e . is OK to install.

  3. Failing
    git clone https://github.com/pallets/click.git and pipenv install -e . --dev -v. It fails.

And the error message for (3.) .

Installing -e .…
Traceback (most recent call last):
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 90, in __init__
    req = REQUIREMENT.parseString(requirement_string)
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py", line 1654, in parseString
    raise exc
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py", line 1644, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py", line 1402, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py", line 3417, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py", line 1402, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py", line 3739, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py", line 1402, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py", line 3400, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py", line 1406, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py", line 2711, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pkg_resources._vendor.pyparsing.ParseException: Expected W:(abcd...) (at char 0), (line:1, col:1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3092, in __init__
    super(Requirement, self).__init__(requirement_string)
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 94, in __init__
    requirement_string[e.loc:e.loc + 8]))
pkg_resources.extern.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'.'"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/requirementslib/models/requirements.py", line 912, in _parse_name_from_line
    self._requirement = init_requirement(self.line)
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/requirementslib/models/utils.py", line 196, in init_requirement
    req = Requirement.parse(name)
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3138, in parse
    req, = parse_requirements(s)
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3085, in parse_requirements
    yield Requirement(line)
  File "/home/jimmy/.pyenv/versions/3.7-dev/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3094, in __init__
    raise RequirementParseError(str(e))
pkg_resources.RequirementParseError: Invalid requirement, parse error at "'.'"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jimmy/.pyenv/versions/3.7-dev/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv', 'console_scripts', 'pipenv')()
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/cli/command.py", line 255, in install
    editable_packages=state.installstate.editables,
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/core.py", line 2066, in do_install
    pkg_requirement = Requirement.from_line(pkg_line)
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/requirementslib/models/requirements.py", line 2732, in from_line
    r = named_req_from_parsed_line(parsed_line)
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/requirementslib/models/requirements.py", line 3201, in named_req_from_parsed_line
    if parsed_line.name is not None:
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/requirementslib/models/requirements.py", line 594, in name
    self.parse_name()
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/requirementslib/models/requirements.py", line 972, in parse_name
    name = self._parse_name_from_line()
  File "/mnt/fedora-home/jimmy/workspace/devel/github/pypa/pipenv/pipenv/vendor/requirementslib/models/requirements.py", line 915, in _parse_name_from_line
    "Failed parsing requirement from {0!r}".format(self.line)
pipenv.vendor.requirementslib.exceptions.RequirementError: Failed parsing requirement from '.

@yssource yssource changed the title PIPENV_PYTHON="$PYENV_ROOT/shims/python" 1. Fail to pipenv install -e git+git@, 2. Fail to pipenv install -e ., if Pipfile is put in a different place。 Jun 4, 2019
@petrprikryl
Copy link

Looks like #3647.

@frostming frostming added the Type: Bug 🐛 This issue is a bug. label Jul 16, 2019
@frostming
Copy link
Contributor

frostming commented Jul 16, 2019

  1. The PIPENV_PYTHON value will be appended to the virtualenv path, it is deliberate.
  2. (1) Can't reproduce, maybe fixed by some commits on the master branch.
    (3) Reproduced, this is a bug.

@frostming frostming changed the title 1. Fail to pipenv install -e git+git@, 2. Fail to pipenv install -e ., if Pipfile is put in a different place。 Pipenv install relative paths fails when the Pipfile is not in current directory. Jul 16, 2019
@isomorpheme
Copy link

I'm having a similar issue, except no change of current directory and setting PIPENV_PIPFILE is involved. Rather, I maintain a typing stubs package in-tree and list it as foobar-stubs = { editable = true, path = "./foobar-stubs" }; the usual pipenv install --dev works, but pipenv install --dev --system doesn't. I'm guessing the issue is that the relative path is passed as-is to pip, but since it's working from site-packages or the like, the relative path is obviously incorrect.

One workaround I've tried is using variable expansion, i.e. path = "/$PWD/foobar-stubs" instead, but that in turn triggers something like ValueError: non-local file URIs are not supported on this platform: 'file://home/user/project-root/foobar-stubs'.

I can try making a small example package that reproduces this if that helps.

@isomorpheme
Copy link

Nevermind, looking closer at the traceback it seems that the issue stems from the parser of requirementslib for some reason - that's what I get for responding to issues at 2 AM. 🙃

@matteius
Copy link
Member

Anyone care to recheck this on latest pipenv?

@matteius
Copy link
Member

matteius commented Aug 1, 2023

I believe this is fixed on overhaul branch that is out for review: #5793

@matteius
Copy link
Member

I believe this is resolved now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 This issue is a bug.
Projects
None yet
Development

No branches or pull requests

5 participants