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

django is not included in pip-chill output #49

Open
fabiocaccamo opened this issue Apr 6, 2021 · 15 comments
Open

django is not included in pip-chill output #49

fabiocaccamo opened this issue Apr 6, 2021 · 15 comments
Labels

Comments

@fabiocaccamo
Copy link

Environment

  • PIP Chill version: 1.0.1
  • Python version: 3.9.0
  • Operating System: OSX

Description

I'm using pip-chill on a django project to automate requirements.txt generation (without dependencies) and deploy, but pip-chill doesn't recognize django as top-level installed package.

What I Did

Running pip freeze I can see that Django==3.2 is installed correctly, but running pip-chill the django dependency is not included in the output.

@github-actions
Copy link

github-actions bot commented Jun 6, 2021

Stale issue message

@fabiocaccamo
Copy link
Author

Sure if any maintainer give a feedback the issue become stale.

@astarrh
Copy link

astarrh commented Aug 11, 2021

I am experiencing the same issue. I'm not sure if Django is considered a dependency in one of my other packages? Even if it is, it's important that I specify the version in my requirements.

These is my pip-chill output:

babel==2.8.0
channels==3.0.4
django-livereload-server==0.3.2
django-mail-factory==0.21
django-newsletter==0.9.1
django-tinymce==2.8.0
django-webpack-loader==0.6.0
pip-chill==1.0.1
psycopg2==2.7.5
psycopg2-binary==2.7.5
pyjwt==1.7.1
pyopenssl==20.0.1
python3-openid==3.1.0
requests-oauthlib==1.0.0
service-identity==21.1.0

@rbanffy
Copy link
Owner

rbanffy commented Jan 23, 2023

Sorry for the (very) late answer. I'm not sure if I understood it (and #58) correctly.

The behavior of not listing a manually installed package that is a dependency of another installed package is the intended one. If you need, say, django-newsletter, it's safe to assume you need Django and doesn't need to specify it.

However...

The consequence is that if you want to pin Django's version to a specific one, something that your dependency doesn't do, you'll not still get the django package in the chill results.

Adding a --force-listing option with comma-separated package names, that forces listing that package even if it is a dependency of something else, could be a solution.

Let me know @fabiocaccamo , @astarrh , @GammaGames, @jc9108 what your thoughts are.

I added and enhancement request as #61

@rbanffy rbanffy added invalid and removed bug labels Jan 23, 2023
@GammaGames
Copy link

I know what packages it's happening to so a --force-listing option would solve my issues.

@fabiocaccamo
Copy link
Author

@rbanffy in my case django is an installed package (python -m pip install django) but for some reason pip-chill doesn't list it.

@411A
Copy link

411A commented Feb 9, 2023

Same problem. Unfortunately, this library does not work as I expected, don't know why this vital feature does not exist in the pip itself. pip-chill not included some packages that I manually installed, like Pyrogram & Pillow; instead, it shows me the packages that I didn't install manually like: isoduration jsonpointer uri-template etc.

@rbanffy
Copy link
Owner

rbanffy commented Apr 16, 2023

I noticed some surprising behavior as well. I'll see what can be done besides what a --force-listing would do.

@rbanffy rbanffy reopened this Apr 16, 2023
@rbanffy rbanffy added bug and removed invalid labels Apr 17, 2023
@rbanffy
Copy link
Owner

rbanffy commented Apr 17, 2023

@411A Installing jupyter I noticed the issue you mention. From a clean environment,

$ python3 -m venv env2
$ . env2/bin/activate
$ pip install jupyter pip-chill
Collecting jupyter
...
$ pip-chill
fqdn==1.5.1
isoduration==20.11.0
jsonpointer==2.3
jupyter==1.0.0
pip-chill==1.0.3
uri-template==1.2.0
webcolors==1.13

Only jupyter and pip-chill should be shown, but some of the packages you mentioned still appear. There must be something in their metadata that confuses the chill function.

@github-actions
Copy link

Stale issue message

@rbanffy
Copy link
Owner

rbanffy commented Sep 1, 2023

Chill, bot. Still thinking about this.

@rbanffy rbanffy reopened this Sep 1, 2023
@github-actions github-actions bot closed this as completed Sep 9, 2023
@rangel3l2
Copy link

rangel3l2 commented Apr 20, 2024

I got the same problem with flask.

@rbanffy
Copy link
Owner

rbanffy commented Apr 20, 2024

What is your original dependencies and what does pip-chill output?

@rbanffy rbanffy reopened this Apr 20, 2024
@rangel3l2
Copy link

What is your original dependencies and what does pip-chill output?

I create a venv and installed “pip install flask”, but quem I run “pip-chill > requirements.txt” flask is not inside my dependencies inside requirements.txt file.

@rbanffy
Copy link
Owner

rbanffy commented Apr 20, 2024

I can´t replicate this behavior here (Python 3.11).

When I pip install pip-chill flask from a clean virtual environment, running pip-chill gives me:

flask==3.0.3
pip-chill==1.0.3

When running with --verbose, I get:

flask==3.0.3
pip-chill==1.0.3
# blinker==1.7.0 # Installed as dependency for flask
# click==8.1.7 # Installed as dependency for flask
# itsdangerous==2.2.0 # Installed as dependency for flask
# jinja2==3.1.3 # Installed as dependency for flask
# markupsafe==2.1.5 # Installed as dependency for jinja2, werkzeug
# werkzeug==3.0.2 # Installed as dependency for flask

Are you starting from a clean virtual environment? What do you get when you run pip freeze?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants