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 ignores install_requires from setup.py #4355

Closed
svenhartmann opened this issue Jun 19, 2020 · 14 comments
Closed

pipenv install ignores install_requires from setup.py #4355

svenhartmann opened this issue Jun 19, 2020 · 14 comments
Labels
Status: Awaiting Update ⏳ This issue requires more information before assistance can be provided. triage

Comments

@svenhartmann
Copy link

Affacted release: 2020.6.2

works fine in 2018.11.26

Issue description

pipenv install does not install dependencies from setup.py -> install_requires

Pipefile

example-adapter = {ref = "my-tag", git = "ssh://git@myinternalgit/example-adapter.git"}

setup.py:

setup(
	name="example-adapter",
	version="1.7.1",
	author="abc",
	author_email="abc",
	description=("abc"),
	long_description=read('README.md'),
	keywords=["abc", "adapter"],
	packages=find_packages(),
	python_requires='>=3.6',
	install_requires=['python-jose==3.1.0', 'cachetools==3.1.0'],
	tests_require=[]
)

Expected result

Configured packages from example-adapter/setup.py / install_requires are being installed.

Actual result

Configured packages from example-adapter/setup.py / install_requires NOT are being installed.

Steps to replicate

pipenv install

@svenhartmann svenhartmann changed the title pipenv install ignores install_requires fom setup.py pipenv install ignores install_requires from setup.py Jun 19, 2020
@CloudySnake
Copy link

We are also seeing the same thing. We have a library that installs from a GitHub repo, and the dependencies for the library do not install with pipenv 2020.6.2

@cbrochtrup
Copy link

cbrochtrup commented Aug 6, 2020

I reproduced this by installing the following Pipfile and checking if joblib, a dependency of Librosa, is installed.

[[source]]
url = 'https://pypi.python.org/simple'
verify_ssl = true
name = 'pypi'

[requires]

[packages]
librosa = {ref = "5d7314fa226355f96bdfb50a8a60282570cf5917",git = "git://github.com/librosa/librosa.git"}

Run the following with pipenv versions 2018.11.26 and 2020.6.2 and joblib will only be found in the former.

$ pipenv install
$ find $(pipenv --venv) -name 'joblib'

@pmahoney
Copy link

pmahoney commented Aug 7, 2020

Same issue is present in 2020.5.28

@adam-grant-hendry
Copy link

adam-grant-hendry commented Aug 10, 2020

Perhaps use pipenv-setup (https://pypi.org/project/pipenv-setup/). Also, seems like a historical issue #1263 . Probably also worth mentioning taking a look at poetry.

@frostming
Copy link
Contributor

Did you regenerate the lock file? Or can you show the lockfile content?

@svenhartmann
Copy link
Author

The dependencies are still missing within the lock file.

@jordivandooren
Copy link

jordivandooren commented Aug 20, 2020

Setting environment variable PIPENV_RESOLVE_VCS to 0 fixed this exact problem for me (newer Pipenv versions skipping subdependencies of internal VCS dependencies).

Quote:

PIPENV_RESOLVE_VCS
Tells Pipenv whether to resolve all VCS dependencies in full.
As of Pipenv 2018.11.26, only editable VCS dependencies were resolved in full. To retain this behavior and avoid handling any conflicts that arise from the new approach, you may set this to ‘0’, ‘off’, or ‘false’.

@ms-lolo
Copy link

ms-lolo commented Nov 21, 2020

We're still experiencing this issue in the latest 2020.11.15 version of pipenv and we've been stuck in the 2018 version because of it. We use local editable installs heavily and dependencies in our setup.py files are simply being ignored.

My Pipfile entry just looks something like this:

[packages]
my-thing = {path = ".",editable = true}

using pip install -e . works just fine so it doesn't seem like a bug in my setup.py file. pipenv isntall will just succeed and my-thing will be installed but none of its dependencies are even attempting to be isntalled.

@ms-lolo
Copy link

ms-lolo commented Nov 21, 2020

seems this is not happening to me in 2020-11-4 so I filed a new ticket in hopes that it is a simple regression.

@zjpiazza
Copy link

I am experiencing this issue as well. Has there been any updates on this?

@konstantinmiller
Copy link

Make sure setuptools is installed before you run pipenv install -e .

That is, run pip install --upgrade setuptools prior to running pipenv install -e .

@ms-lolo
Copy link

ms-lolo commented Sep 24, 2021

@konstantinmiller that doesn't seem possible. the local . dependency is defined in Pipfile and the venv doesn't exist until you first run pipenv install. We don't have a point in time, after the venv is created but before pipenv installs dependencies, where we can upgrade setuptools.

@danetrata
Copy link

danetrata commented Feb 25, 2022

Seems there has been a regression. I needed to define PIPENV_RESOLVE_VCS=0 in my Dockerfile to recognize or install dependencies again.

Required packages missing from the virtualenv

Target package setup.py

(cloudsense-logging) danetrata@danetrata-ubuntu:~/gitlab/ulap/cloudsense/cloudsense-logging$ cat setup.py 
from setuptools import setup, find_packages

from pipenv.project import Project
from pipenv.utils import convert_deps_to_pip

pfile = Project(chdir=False).parsed_pipfile
requirements = convert_deps_to_pip(pfile["packages"], r=False)

setup(
    name="cloudsense-logging",
    version="0.1.0",
    packages=find_packages(),
    install_requires=requirements,
)

@matteius
Copy link
Member

matteius commented Aug 17, 2022

Please recheck with pipenv=2022.8.24

@matteius matteius added the Status: Awaiting Update ⏳ This issue requires more information before assistance can be provided. label Aug 17, 2022
@matteius matteius closed this as completed Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting Update ⏳ This issue requires more information before assistance can be provided. triage
Projects
None yet
Development

No branches or pull requests