-
-
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
Locking failed without an error message #4962
Comments
@Dzeri96 When I made the requirements.txt I got a more detailed error. Please see:
And then I ran
I am not sure why, it looks like there is a source distribution for it here: https://pypi.org/project/vectorbt/0.15.5/#files
Digging a little deeper, it seems yours and my Python is too new. Well it says your system python is 3.8, but that you also have 3.9 available. I downgraded to 3.8 and it just worked, so I suspect you are actually not on 3.8 but 3.9 which is actually the issue.
|
I guess I wasn't being clear enough. The packages I posted in the steps to replicate section are coming from our internal package, which is not available on pypi. You would need to add these to the list of packages already present in my Pipfile, which are:
After attempting installation in an
Sorry if I wasted your time and thanks for any further help. |
Update: After manually installing llvmlite before running
|
@Dzeri96 Does it actually fail out, or just spin in locking or does it actually conclude for you in reasonable amount of time? This feels like another example of the infinity lock bug, at least when I use this
It is currently broken for some scenarios. I am having a real trouble getting to the bottom of what exactly is happening in the dependency resolver, but I feel like I am making progress in my debugger. Unfortunately I think this may require more than just my effort to figure out. |
It takes about 10 minutes on my M1 Macbook Air, depending on what has been downloaded previously, but it always definitely concludes with a message |
I am seeing this same error with a private code repo:
|
@delwaterman Your issue is more closely related to revised index restricted packages security feature. There are some threads that would be helpful to review: |
@Dzeri96 Please try again with |
I will give a status update this week! |
@matteius Thank you! Switching the order of the sources solved the underlying issue for me. |
@matteius So I've just tried running Thank you for working on it and I'm glad my report made pipenv a bit better. Full trace
|
I got a similar error on my Mac M1 today with the latest pipenv trying to install a new project, I kept getting
|
Sorry to comment on this closed issue, but I got a similar problem. I'm working on a project that have 3 categories of dependencies, the default one ("packages"), dev-packages and a "prod" category. The "prod" category contains When installing dependencies, pipenv tries to lock all categories, and fails as expected. But there's no clear error message, whick took me long to figure out it's Here's the error message: > pipenv install -d
Pipfile.lock (7eb2ec) out of date, updating to (a59309)...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
Success!
Locking [dev-packages] dependencies...
Building requirements...
Resolving dependencies...
Success!
Locking [prod] dependencies...
Building requirements...
Resolving dependencies...
Locking Failed!
[== ] Locking...False
ERROR:pip.subprocessor:Preparing metadata (pyproject.toml) exited with 1
[ResolutionFailure]: File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\resolver.py", line 645, in _main
[ResolutionFailure]: resolve_packages(
[ResolutionFailure]: File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\resolver.py", line 612, in resolve_packages
[ResolutionFailure]: results, resolver = resolve(
[ResolutionFailure]: ^^^^^^^^
[ResolutionFailure]: File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\resolver.py", line 592, in resolve
[ResolutionFailure]: return resolve_deps(
[ResolutionFailure]: ^^^^^^^^^^^^^
[ResolutionFailure]: File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\utils\resolver.py", line 906, in resolve_deps
[ResolutionFailure]: results, hashes, internal_resolver = actually_resolve_deps(
[ResolutionFailure]: ^^^^^^^^^^^^^^^^^^^^^^
[ResolutionFailure]: File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\utils\resolver.py", line 679, in actually_resolve_deps
[ResolutionFailure]: resolver.resolve()
[ResolutionFailure]: File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\utils\resolver.py", line 442, in resolve
[ResolutionFailure]: raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv run pip install <requirement_name> to bypass this mechanism, then run $ pipenv graph to inspect the versions actually installed in the virtualenv.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: metadata generation failed
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\james\AppData\Roaming\Python\Python311\Scripts\pipenv.exe\__main__.py", line 7, in <module>
# when invoked as python -m pip <command>
^^^^^
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\vendor\click\core.py", line 1130, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\cli\options.py", line 58, in main
return super().main(*args, **kwargs, windows_expand_args=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\vendor\click\core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\vendor\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\vendor\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\vendor\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\vendor\click\decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\vendor\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\cli\command.py", line 209, in install
do_install(
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\routines\install.py", line 164, in do_install
do_init(
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\routines\install.py", line 648, in do_init
do_lock(
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\routines\lock.py", line 65, in do_lock
venv_resolve_deps(
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\utils\resolver.py", line 847, in venv_resolve_deps
c = resolve(cmd, st, project=project)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\james\AppData\Roaming\Python\Python311\site-packages\pipenv\utils\resolver.py", line 716, in resolve
raise RuntimeError("Failed to lock Pipfile.lock!")
RuntimeError: Failed to lock Pipfile.lock! When I specify the category to install with |
Issue description
Since some of my dependencies cannot be run on M1/Aarch64, I tried using a development container running on another architecture (
amd64/python:3.8-bullseye
), however pipenv fails in the locking step of the dependency installation with no error message.Installing from requirements.txt works via pip, and running
pipenv install
on an x86_64 Ubuntu 20.04 machine works without issue.Expected result
The dependencies are installed
Actual result
The point at which the locking step fails seems almost random.
For a while it used to fail at llvmlite when locking numba dependencies, tough now it fails at scipy.
Steps to replicate
Since one of the dependencies is a company-internal package, you should add the following dependencies to the Pipfile:
Start a container from the above-mentioned python image (ideally on an arm64 processor), install the latest pipenv and run
pipenv install
$ pipenv --support
Pipenv version:
'2022.1.8'
Pipenv location:
'/usr/local/lib/python3.8/site-packages/pipenv'
Python location:
'/usr/local/bin/python'
Python installations found:
3.9.2
:/usr/bin/python3.9
3.9.2
:/usr/bin/python3
3.8.12
:/usr/local/bin/python
3.8.12
:/usr/local/bin/python3
3.8.12
:/usr/local/bin/python3.8
PEP 508 Information:
System environment variables:
_
VSCODE_IPC_HOOK_CLI
TERM_PROGRAM
PATH
BROWSER
PYTHON_GET_PIP_URL
VSCODE_GIT_ASKPASS_MAIN
PYTHON_GET_PIP_SHA256
PYTHON_PIP_VERSION
SHLVL
VSCODE_GIT_IPC_HANDLE
REMOTE_CONTAINERS_SOCKETS
TERM
GIT_ASKPASS
GPG_KEY
REMOTE_CONTAINERS
LS_COLORS
LANG
HOME
VSCODE_GIT_ASKPASS_NODE
PYTHON_SETUPTOOLS_VERSION
PWD
REMOTE_CONTAINERS_IPC
SSH_AUTH_SOCK
PYTHON_VERSION
HOSTNAME
TERM_PROGRAM_VERSION
COLORTERM
SHELL
PIP_SHIMS_BASE_MODULE
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/vscode/vscode-server/bin/x64/7f6ab5485bbc008386c4386d08766667e155244e/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SHELL
:/bin/bash
LANG
:C.UTF-8
PWD
:/workspaces/weight-generation-service
Some hashes were omitted for brevity.
Contents of
Pipfile
('/workspaces/weight-generation-service/Pipfile'):Contents of
Pipfile.lock
('/workspaces/weight-generation-service/Pipfile.lock'):The text was updated successfully, but these errors were encountered: