-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Regression in 2020.11.15 failing to install dependencies defined in setup.py #4542
Comments
Would you mind providing the content of |
@frostming I was able to really narrow down the issue here. It looks like something is parsing my I was able to get things working fine with this very basic example: from setuptools import setup
setup_kargs = {
"name": "my-foo",
"author": "someone",
"author_email": "foo@example.com",
"description": "",
"license": "",
"classifiers": [],
"packages": ["foo"],
"package_dir": {"": "src/python"},
"package_data": {},
"install_requires": ["numpy"],
"python_requires": ">=3.6",
"entry_points": {},
}
setup(**setup_kargs) however, if you pull out the required packages into a variable and use that, it gets ignored: from setuptools import setup
install_requires = ["numpy"]
setup_kargs = {
"name": "my-foo",
"author": "someone",
"author_email": "foo@example.com",
"description": "",
"license": "",
"classifiers": [],
"packages": ["foo"],
"package_dir": {"": "src/python"},
"package_data": {},
"install_requires": install_requires,
"python_requires": ">=3.6",
"entry_points": {},
}
setup(**setup_kargs) lastly, it seems like the name of the variable actually matters! this example below actually installs from setuptools import setup
numpy = ["numpy"]
setup_kargs = {
"name": "my-foo",
"author": "someone",
"author_email": "foo@example.com",
"description": "",
"license": "",
"classifiers": [],
"packages": ["foo"],
"package_dir": {"": "src/python"},
"package_data": {},
"install_requires": numpy,
"python_requires": ">=3.6",
"entry_points": {},
}
setup(**setup_kargs) just to verify it's using the name of the variable for something meaningful, this example below actually throws an error about failing to find a distribution named from setuptools import setup
foo = ["numpy"]
setup_kargs = {
"name": "my-foo",
"author": "someone",
"author_email": "foo@example.com",
"description": "",
"license": "",
"classifiers": [],
"packages": ["foo"],
"package_dir": {"": "src/python"},
"package_data": {},
"install_requires": foo,
"python_requires": ">=3.6",
"entry_points": {},
}
setup(**setup_kargs)
let me know if you need any other examples! |
@ms-lolo Thanks for that. I think you have already figured out the workaround.
|
@frostming I tried applying your suggested fix but I think I ran into some other unexpected behavior and now I'm just even more confused and, unfortunately, troubleshooting this is taking entire days and I can't continue. I'm guessing my previous version of code was only working by chance and was just not doing what I was defining it to do. All I can do is describe my project structure and hope someone else can spend time to reproduce and troubleshoot because I am out of time here. I have two python packages in one repo, foo-contrib Pipfile
foo-contrib setup.pysetup(
name=distribution_name,
author="…",
author_email="…",
description="…",
license="…",
classifiers=[
"Private :: Do Not Upload to pypi server",
],
namespace_packages=namespace_packages,
packages=pkgs,
package_dir={"": package_dir},
package_data={"": ["py.typed"]},
data_files=generate_data_files(),
install_requires=[
"foo-common",
],
python_requires=">=3.6",
entry_points={},
use_scm_version={"root": "..", "local_scheme": "dirty-tag"}
) I am now getting an error about failing to find a version that satisfied my dependencies:
This happens on I'm adding this comment here because it's all part of my attempt to get |
#1760 is the feature request preventing me from just hiding from this issue and letting pipenv install the latest version of my dependency, regardless of it being unreleased. |
Pipenv uses a "resolve then override" method when there are editable requirements with the same name as the released one. So the release version must exist in the first place to make the resolution work. |
In that case, do you think actually packaging and releasing a version Any idea why this is not what I am observing with my previous version of I think I can give this a try relatively easily tomorrow morning, just trying to make sure I understand before I make more of a mess on my end :) |
was able to test this today and confirmed that I am back to a functional environment with the workarounds from this thread. #1760 is a much more critical feature request for me now because I cannot require the tagging of a fake, stable versions of all local dependencies in my environments. thanks for all the help getting me running while this bug is open! |
|
Hello all , I am facing issue to release from master branch where we have multibranch Jenkins project . I am able to upload succesfully from development branch but while using master branch where ENVIRONMENT=prod facing this issue while running pipenv install -e . Is this issue causing because of this bug? |
Fixed on v2021.11.5 |
Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.
Check the diagnose documentation for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way.
Make sure to mention your debugging experience if the documented solution failed.
Issue description
I was investigating this issue: #4355 and noticed that my project that contains all the dependencies in
setup.py
and has thePipfile
simply install "." in editable mode is no longer installing anything defined ininstall_requires
in mysetup.py
. However, this behavior is not present in2020.11.4
.My
setup.py
file is defining"install_requires": ["numpy"],
and my
Pipfile
looks like this:Expected result
I expect the lock file to contain
numpy
andnumpy
to be isntalled.Actual result
My package is installed but
numpy
is missing. No errors visible in any of the verbose output.Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
$ pipenv --support
Pipenv version:
'2020.11.15'
Pipenv location:
'/home/myuser/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pipenv'
Python location:
'/home/myuser/.pyenv/versions/3.6.8/bin/python3.6'
Python installations found:
3.8.5
:/usr/bin/python3
3.8.5
:/usr/bin/python3.8
3.8.5
:/bin/python3
3.8.5
:/bin/python3.8
3.7.5
:/home/myuser/.pyenv/versions/3.7.5/bin/python3.7m
3.7.4
:/home/myuser/.pyenv/versions/3.7.4/bin/python3.7m
3.6.8
:/home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin/python3
3.6.8
:/home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin/python3.6
3.6.8
:/home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin/python3.6m
3.6.8
:/home/myuser/.pyenv/versions/3.6.8/bin/python3.6m
3.6.8
:/home/myuser/.pyenv/versions/3.6.8/bin/python3.6
3.6.8
:/home/myuser/.pyenv/versions/3.6.8/bin/python3
3.6.8
:/home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin/python3
3.6.8
:/home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin/python3.6
3.6.8
:/home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin/python3.6m
3.6.8
:/home/myuser/.pyenv/versions/3.6.8/bin/python3.6m
2.7.18
:/usr/bin/python2
2.7.18
:/usr/bin/python2.7
2.7.18
:/bin/python2
2.7.18
:/bin/python2.7
PEP 508 Information:
System environment variables:
SHELL
LSCOLORS
SESSION_MANAGER
PYENV_HOOK_PATH
QT_ACCESSIBILITY
COLORTERM
PYENV_SHELL
XDG_CONFIG_DIRS
LESS
XDG_MENU_PREFIX
GNOME_DESKTOP_SESSION_ID
PIPENV_ACTIVE
TERMINATOR_DBUS_PATH
GNOME_SHELL_SESSION_MODE
SSH_AUTH_SOCK
DIRENV_DIR
TERMINATOR_UUID
XMODIFIERS
DESKTOP_SESSION
SSH_AGENT_PID
DEVOPS_PYPI_PW
PYENV_VERSION
GTK_MODULES
PWD
LOGNAME
XDG_SESSION_DESKTOP
XDG_SESSION_TYPE
GPG_AGENT_INFO
XAUTHORITY
GJS_DEBUG_TOPICS
WINDOWPATH
HOME
USERNAME
IM_CONFIG_PHASE
LANG
DEVOPS_BUILDS_PW
LS_COLORS
XDG_CURRENT_DESKTOP
VIRTUAL_ENV
VTE_VERSION
INVOCATION_ID
TERMINATOR_DBUS_NAME
MANAGERPID
DIRENV_DIFF
PYENV_DIR
GJS_DEBUG_OUTPUT
XDG_SESSION_CLASS
TERM
ZSH
USER
PIP_DISABLE_PIP_VERSION_CHECK
DISPLAY
APP_NAME
SHLVL
PAGER
QT_IM_MODULE
PYTHONDONTWRITEBYTECODE
KUBECONFIG
XDG_RUNTIME_DIR
PYENV_ROOT
DEVOPS_PYPI_URL
JOURNAL_STREAM
XDG_DATA_DIRS
PATH
GDMSESSION
DBUS_SESSION_BUS_ADDRESS
DIRENV_WATCHES
DEVOPS_PYPI_UN
GIO_LAUNCHED_DESKTOP_FILE_PID
GIO_LAUNCHED_DESKTOP_FILE
OLDPWD
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
PIPENV_ACTIVE
:1
Debug–specific environment variables:
PATH
:/home/myuser/.pyenv/versions/3.6.8/bin:/home/myuser/.pyenv/libexec:/home/myuser/.pyenv/plugins/python-build/bin:/home/myuser/.pyenv/plugins/pyenv-virtualenv/bin:/home/myuser/.pyenv/plugins/pyenv-update/bin:/home/myuser/.pyenv/plugins/pyenv-installer/bin:/home/myuser/.pyenv/plugins/pyenv-doctor/bin:/home/myuser/projects/things/thing/my-thing/bin:/home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin:/home/myuser/.pyenv/shims:/home/myuser/.pyenv/bin:/home/myuser/.local/bin:/home/myuser/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
SHELL
:/usr/bin/zsh
LANG
:en_US.UTF-8
PWD
:/home/myuser/projects/things/thing/my-thing
VIRTUAL_ENV
:/home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A
Contents of
Pipfile
('/home/myuser/projects/things/thing/my-thing/Pipfile'):Contents of
Pipfile.lock
('/home/myuser/projects/things/thing/my-thing/Pipfile.lock'):The text was updated successfully, but these errors were encountered: