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.

--skip-lock behaves funky when used in combination with local package

See original GitHub issue

Issue description

I continue introducing Pipfile/Pipfile.lock into my packages instead of requirements.txt into my packages, and on the second package the pipenv began to behave a bit funny when I use --skip-lock.

I Managed to move all requirements and the pipenv begun fine, but then attempted to install local package with the editable option. and that’s where it all went astray.

Expected result

I expect the project to install.

Actual result

Pipenv can’t install/create environment when using --skip-lock option. But it works fine with --verbose

❯ pipenv install --dev --python=python --skip-lock                                                                                                                                                                                  ─╯
Creating a virtualenv for this project...
Pipfile: /home/fizyk/workspace/pyramid_basemodel/Pipfile
Using /home/fizyk/.pyenv/versions/3.10.8/bin/python3 (3.10.8) to create virtualenv...
⠦ Creating virtual environment...created virtual environment CPython3.10.8.final.0-64 in 234ms
  creator Venv(dest=/home/fizyk/.local/share/virtualenvs/pyramid_basemodel-SbEfMTGb, clear=False, no_vcs_ignore=False, global=False, describe=CPython3Posix)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/fizyk/.local/share/virtualenv)
    added seed packages: pip==22.3.1, setuptools==65.5.1, wheel==0.38.4
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

✔ Successfully created virtual environment! 
Virtualenv location: /home/fizyk/.local/share/virtualenvs/pyramid_basemodel-SbEfMTGb
Installing dependencies from Pipfile...
An error occurred while installing .! Will try again.
Installing initially failed dependencies...
Failed to install some dependency or packages.  The following have failed installation and attempted retry: [Requirement(_name='pyramid-basemodel', vcs=None, req=FileRequirement(setup_path=None, path='.', editable=False, extras=None, _uri_scheme='path', uri='file:///home/fizyk/workspace/pyramid_basemodel', link=<Link file:///home/fizyk/workspace/pyramid_basemodel>, pyproject_requires=(), pyproject_backend=None, pyproject_path=None, subdirectory=None, _setup_info=SetupInfo(name='pyramid_basemodel', base_dir='/tmp/reqlib-srcodptigrg/pyramid-basemodel', _version='0.5.1', _requirements=frozenset({BaseRequirement(name='zope.interface', requirement=Requirement.parse('zope.interface')), BaseRequirement(name='requests', requirement=Requirement.parse('requests')), BaseRequirement(name='inflect', requirement=Requirement.parse('inflect')), BaseRequirement(name='pyramid', requirement=Requirement.parse('pyramid')), BaseRequirement(name='zope.sqlalchemy', requirement=Requirement.parse('zope.sqlalchemy')), BaseRequirement(name='sqlalchemy', requirement=Requirement.parse('SQLAlchemy')), BaseRequirement(name='pyramid-tm', requirement=Requirement.parse('pyramid_tm')), BaseRequirement(name='python-slugify', requirement=Requirement.parse('python-slugify'))}), build_requires=('wheel', 'setuptools >= 40.6.0'), build_backend='setuptools.build_meta', setup_requires=(), python_requires=<SpecifierSet('>=3.7')>, _extras_requirements=(('tests', (BaseRequirement(name='mock', requirement=Requirement.parse('mock')), BaseRequirement(name='pytest-cov', requirement=Requirement.parse('pytest-cov')), BaseRequirement(name='pytest', requirement=Requirement.parse('pytest')), BaseRequirement(name='requests-mock', requirement=Requirement.parse('requests-mock')))),), setup_cfg=PosixPath('/tmp/reqlib-srcodptigrg/pyramid-basemodel/setup.cfg'), setup_py=PosixPath('/tmp/reqlib-srcodptigrg/pyramid-basemodel/setup.py'), pyproject=PosixPath('/tmp/reqlib-srcodptigrg/pyramid-basemodel/pyproject.toml'), ireq=<InstallRequirement object: pyramid-basemodel==0.5.1 from file:///home/fizyk/workspace/pyramid_basemodel#egg=pyramid-basemodel editable=False>, extra_kwargs={'build_dir': '/tmp/reqlib-buildmu1c6qzs', 'src_dir': '/tmp/reqlib-srcodptigrg', 'download_dir': '/home/fizyk/.cache/pipenv/pkgs', 'wheel_download_dir': '/home/fizyk/.cache/pipenv/wheels'}, metadata=None, stack=<contextlib.ExitStack object at 0x7f114cea3e20>, _finalizer=<finalize object at 0x7f114d7cb1e0; for 'SetupInfo' at 0x7f114cf0e090>), _has_hashed_name=False, _parsed_line=<Line (editable=False, name=pyramid-basemodel, path=/home/fizyk/workspace/pyramid_basemodel, uri=file:///home/fizyk/workspace/pyramid_basemodel, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=None)>, name='pyramid-basemodel', req=Requirement.parse('pyramid-basemodel==0.5.1@ file:///home/fizyk/workspace/pyramid_basemodel')), markers=None, _specifiers='==0.5.1', index=None, editable=False, hashes=frozenset(), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=pyramid-basemodel, path=/home/fizyk/workspace/pyramid_basemodel, uri=file:///home/fizyk/workspace/pyramid_basemodel, extras=(), markers=None, vcs=None, specifier=None, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=None)>, _ireq=None)]

When possible, provide the verbose output (--verbose), especially for locking and dependencies resolving issues.

Steps to replicate

  1. Check out code and switch to this PR: https://github.com/fizyk/pyramid_basemodel/pull/289
  2. Run pipenv install --dev --skip-lock Observe error.
  3. Run pipenv --rm and then pipenv install --dev --skip-lock -v

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
fizykcommented, Nov 24, 2022

I had to install pyramid-basemodel = {editable = true, path = "./subdir"} and now it got installed without any issues (tested locally)

On the package, I got rid of the src directory and moved pyramid_basemodel to the project’s root directory, so no installation is required at the moment

0reactions
matteiuscommented, Dec 8, 2022

Thanks for the confirmation, will try to prioritize the ‘.’ issue soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · pypa/pipenv - GitHub
Local wheel Installation failure due to path removal in Pipfile.lock ... --skip-lock behaves funky when used in combination with local package triage.
Read more >
Python Packaging Authority pipenv Issues - Giters
Python Packaging Authority pipenv: Python Development Workflow for Humans. ... --skip-lock behaves funky when used in combination with local package.
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