Im using pipenv to manage my dependencies,
I have the following command working fine on my local machine:
pipenv install --dev
but when I run it on the server I get the following error:
n error occurred while installing pyparsing==2.4.1 --hash=sha256:530d8bf8cc93a34019d08142593cf4d78a05c890da8cf87ffa3120af53772238 --hash=sha256:f78e99616b6f1a4745c0580e170251ef1bbafc0d0513e270c4bd281bf29d2800 --hash=sha256:530d8bf8cc93a34019d08142593cf4d78a05c890da8cf87ffa3120af53772238 --hash=sha256:f78e99616b6f1a4745c0580e170251ef1bbafc0d0513e270c4bd281bf29d2800! Will try again.
π ββββββββββββββββββββββββββββββββ 237/237 β 00:00:30
Installing initially failed dependenciesβ¦
[pipenv.exceptions.InstallError]: File "/home/ubuntu/.local/lib/python3.6/site-packages/pipenv/core.py", line 1874, in do_install
[pipenv.exceptions.InstallError]: keep_outdated=keep_outdated
[pipenv.exceptions.InstallError]: File "/home/ubuntu/.local/lib/python3.6/site-packages/pipenv/core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]: File "/home/ubuntu/.local/lib/python3.6/site-packages/pipenv/core.py", line 859, in do_install_dependencies
[pipenv.exceptions.InstallError]: retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]: File "/home/ubuntu/.local/lib/python3.6/site-packages/pipenv/core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]: File "/home/ubuntu/.local/lib/python3.6/site-packages/pipenv/core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting pyparsing==2.4.1 (from -r /tmp/pipenv-nfz65sbh-requirements/pipenv-11553m_x-requirement.txt (line 1))']
[pipenv.exceptions.InstallError]: ['ERROR: Could not find a version that satisfies the requirement pyparsing==2.4.1 (from -r /tmp/pipenv-nfz65sbh-requirements/pipenv-11553m_x-requirement.txt (line 1)) (from versions: 1.4.6, 1.4.7, 1.4.8, 1.4.11, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.1.7, 2.1.8, 2.1.9, 2.1.10, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1.1, 2.4.2a1)', 'ERROR: No matching distribution found for pyparsing==2.4.1 (from -r /tmp/pipenv-nfz65sbh-requirements/pipenv-11553m_x-requirement.txt (line 1))']
I have handled pipenv errors before and most were pretty reasonable (clashes between dependency and sub-dependecies), but this one makes less sense to me as I did not specifically installed this package, but rather pipenv added it to the pipfile.lock and it doesnt find that version all together while locally that version is available for some reason.
I dont know which dependency is asking for that specific version either.
Pipfile.lock section:
"pyparsing": {
"hashes": [
"sha256:530d8bf8cc93a34019d08142593cf4d78a05c890da8cf87ffa3120af53772238",
"sha256:f78e99616b6f1a4745c0580e170251ef1bbafc0d0513e270c4bd281bf29d2800"
],
"version": "==2.4.1"
},
Any ideas?
EDIT:
you can see in the releases for pyparsing that this version does exist. See it here
Turns out that pyparsing have deleted a version, which is really weird.
I ended up updating a package (scipy) and it update pyparsing to 2.4.1.1, now works fine
Related
I am using python3.9 in django framework, for that I have to install mysqlclient. But error is coming when I try
pipenv install mysqlclient
output like this as error:
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV__VERBOSITY=-1 to suppress this warning. Installing mysqlclient... Adding mysqlclient to Pipfile's [packages]... Installation Succeeded Pipfile.lock (06f36b) out of date, updating to (f95eff)... Locking [dev-packages] dependencies... Locking [packages] dependencies...
Resolving dependencies... Locking Failed!
CRITICAL:pipenv.patched.notpip._internal.resolution.resolvelib.factory:Could not find a version that satisfies the requirement django (from versions: none)
[ResolutionFailure]: File "C:\Users\meghd\anaconda3\lib\site-packages\pipenv\resolver.py", line 743, in _main
[ResolutionFailure]: resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
[ResolutionFailure]: File "C:\Users\meghd\anaconda3\lib\site-packages\pipenv\resolver.py", line 704, in resolve_packages
[ResolutionFailure]: results, resolver = resolve(
[ResolutionFailure]: File "C:\Users\meghd\anaconda3\lib\site-packages\pipenv\resolver.py", line 685, in resolve
[ResolutionFailure]: return resolve_deps(
[ResolutionFailure]: File "c:\users\meghd\anaconda3\lib\site-packages\pipenv\utils.py", line 1377, in resolve_deps
[ResolutionFailure]: results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
[ResolutionFailure]: File "c:\users\meghd\anaconda3\lib\site-packages\pipenv\utils.py", line 1106, in actually_resolve_deps
[ResolutionFailure]: resolver.resolve()
[ResolutionFailure]: File "c:\users\meghd\anaconda3\lib\site-packages\pipenv\utils.py", line 884, 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 install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: No matching distribution found for django```
I'm trying to do a command pipenv lock 'cause heroku said my Pipfile.lock is out of date, and I'm trying to upload my django project at heroku. But I constantly got the error like below.
PS C:\Users\josep\Documents\nomad academy\Airbnb-Clone> pipenv lock --pre --clear
Locking [dev-packages] dependencies...
Locking...Building requirements...
Resolving dependencies...
Locking Failed!
[ResolutionFailure]: File "c:\users\josep\.virtualenvs\airbnb-clone-grekw6gp\lib\site-packages\pipenv\resolver.py", line 741, in _main
[ResolutionFailure]: resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
[ResolutionFailure]: File "c:\users\josep\.virtualenvs\airbnb-clone-grekw6gp\lib\site-packages\pipenv\resolver.py", line 702, in resolve_packages
[ResolutionFailure]: results, resolver = resolve(
[ResolutionFailure]: File "c:\users\josep\.virtualenvs\airbnb-clone-grekw6gp\lib\site-packages\pipenv\resolver.py", line 684, in resolve
[ResolutionFailure]: return resolve_deps(
[ResolutionFailure]: File "C:\Users\josep\.virtualenvs\Airbnb-Clone-GrEkW6GP\lib\site-packages\pipenv\utils.py", line 1395, in resolve_deps
[ResolutionFailure]: results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
[ResolutionFailure]: File "C:\Users\josep\.virtualenvs\Airbnb-Clone-GrEkW6GP\lib\site-packages\pipenv\utils.py", line 1108, in actually_resolve_deps
[ResolutionFailure]: resolver.resolve()
[ResolutionFailure]: File "C:\Users\josep\.virtualenvs\Airbnb-Clone-GrEkW6GP\lib\site-packages\pipenv\utils.py", line 833, 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.
First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Could not find a version that matches pathspec<1,==0.5.9,>=0.6 (from black==20.8b1->-r C:\Users\josep\AppData\Local\Temp\pipenvnt4vjek5requirements\pipenv-0sidr1ev-constraints.txt (line 4))
Tried: 0.2.2, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.4.0, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.5.9, 0.6.0, 0.7.0, 0.7.0, 0.8.0, 0.8.0, 0.8.1, 0.8.1
There are incompatible versions in the resolved dependencies:
pathspec<1,>=0.6 (from black==20.8b1->-r C:\Users\josep\AppData\Local\Temp\pipenvnt4vjek5requirements\pipenv-0sidr1ev-constraints.txt (line 4))
pathspec==0.5.9 (from awsebcli==3.19.2->-r C:\Users\josep\AppData\Local\Temp\pipenvnt4vjek5requirements\pipenv-0sidr1ev-constraints.txt (line 3))
I searched about that a bit, and I tried quite many like pipenv lock,pipenv lock --clear,etc. But none of them working for me. And according to error, it seems that I'm having this error because of the version issue, but I've got no idea what pipenv want me to do to fix this. What should I do to fix this?
I originally ran into this issue using Pipenv to install the news-please package, but I've narrowed the issue down specifically to the combination of the Twisted package and Python 3.8. This pipfile:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
Twisted = "*"
[requires]
python_version = "3.8"
Results in this error:
Pipfile.lock (2aac7a) out of date, updating to (42c109)β¦
Locking [dev-packages] dependenciesβ¦
Locking [packages] dependenciesβ¦
β Success!
Updated Pipfile.lock (2aac7a)!
Installing dependencies from Pipfile.lock (2aac7a)β¦
An error occurred while installing twisted==19.10.0 --hash=sha256:0f39698c2aac318032ed4fe95e28ee2bd7d72327c2f6927139811ad403770885 --hash=sha256:1f0919a0363b4fbed5def5315383db36fd581464bca80290764f8c4465e91c04 --hash=sha256:257dbc78e72bc69c2970035fc74df54b04573d5ddd380251a8a23f74d619db03 --hash=sha256:3f651c52ad78cc5a643f61e3b786a6b5c9b4ee68eced975c04fdf6b02026f470 --hash=sha256:58b581ae4eee5a831aac9d03edc331d662fa028f601015bb3df47f8704bfe876 --hash=sha256:611ef7696d406605962d9a7b040d357f3e91df20cf75c0b06e350947f541538b --hash=sha256:6338e5b987e95c94360acb14e78b41097be9b45d44d15a68060db9c3bf89e102 --hash=sha256:776c65270b57ac074d5b7a471142f434b0ac5a8b39d9c974769c855c32abfd91 --hash=sha256:8b2f7f4dded5ad02931bed38042e55329d1e4919b63078f5a29f05502a163f1d --hash=sha256:97f8a76632bf051a27179337fe937df315920a08e9bd146126e0126629db3721 --hash=sha256:a1de7598ce977943b3edbcc0a7d2112f134cc1b98b2fd7e348ee9e0bef092e50 --hash=sha256:d145c418a46f8a7021030a3246b9e5111f64531278e5252f2073f23c1661c8be --hash=sha256:d53e1f883bc429b14fd2999d355352974f9d7b4ae7554154bbfe3f90aecede5f --hash=sha256:d9037ff5e07909b1d31f81db71a3bbc8227ba1ed20c87332bdb2eb48e55f326e --hash=sha256:ef1396d1680d6a1ae6dff293d778755c8e10d471f286aff678877b2cee235d42 --hash=sha256:f1fe9139fdcf7721d308e36c51cf975474678a8241a9799af02a7bb1c531b722 --hash=sha256:f28355e61ce0b5c1ce47784522022322cc5059c8ed80638e0caae8c7301e1705 --hash=sha256:f7cc56a45c983e4e48601fbeec879b62c740cb848c75164f69a48ac0c6e8a21c! Will try again.
π ββββββββββββββββββββββββββββββββ 10/10 β 00:00:03
Installing initially failed dependenciesβ¦
[pipenv.exceptions.InstallError]: File "/home/fischer/.local/lib/python3.6/site-packages/pipenv/core.py", line 1874, in do_install
[pipenv.exceptions.InstallError]: keep_outdated=keep_outdated
[pipenv.exceptions.InstallError]: File "/home/fischer/.local/lib/python3.6/site-packages/pipenv/core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]: File "/home/fischer/.local/lib/python3.6/site-packages/pipenv/core.py", line 859, in do_install_dependencies
[pipenv.exceptions.InstallError]: retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]: File "/home/fischer/.local/lib/python3.6/site-packages/pipenv/core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]: File "/home/fischer/.local/lib/python3.6/site-packages/pipenv/core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: []
[pipenv.exceptions.InstallError]: ['ERROR: Could not find a version that satisfies the requirement twisted==19.10.0 (from -r /tmp/pipenv-bj65cloq-requirements/pipenv-3idjau65-requirement.txt (line 1)) (from versions: none)', 'ERROR: No matching distribution found for twisted==19.10.0 (from -r /tmp/pipenv-bj65cloq-requirements/pipenv-3idjau65-requirement.txt (line 1))']
When running pipenv install. Trying specific versions of Twisted doesn't seem to help. I can successfully install and use the package with pip3 or by installing from git, but would prefer to use the default pypi index because it simplifies my docker build.
I just installed Python 3.8 on my Mac OS X (10.15.1) and was trying to add opencv-python to my pipenv project. I did the following:
$> pipenv install opencv-python
Installing dependencies from Pipfile.lock (ec16ad)β¦
An error occurred while installing opencv-python==4.1.1.26 --hash=sha256:01505b131dc35f60e99a5da98b77156e37f872ae0ff5596e5e68d526bb572d3c --hash=sha256:0478a1037505ddde312806c960a5e8958d2cf7a2885e8f2f5dde74c4028e0b04 --hash=sha256:17810b89f9ef8e8537e75332acf533e619e26ccadbf1b73f24bf338f2d327ddd --hash=sha256:19ad2ea9fb32946761b47b9d6eed51876a8329da127f27788263fecd66651ba0 --hash=sha256:1a250edb739baf3e7c25d99a2ee252aac4f59a97e0bee39237eaa490fd0281d3 --hash=sha256:3505468970448f66cd776cb9e179570c87988f94b5cf9bcbc4c2d88bd88bbdf1 --hash=sha256:4e04a91da157885359f487534433340b2d709927559c80acf62c28167e59be02 --hash=sha256:5a49cffcdec5e37217672579c3343565926d999642844efa9c6a031ed5f32318 --hash=sha256:604b2ce3d4a86480ced0813da7fba269b4605ad9fea26cd2144d8077928d4b49 --hash=sha256:61cbb8fa9565a0480c46028599431ad8f19181a7fac8070a700515fd54cd7377 --hash=sha256:62d7c6e511c9454f099616315c695d02a584048e1affe034b39160db7a2ae34d --hash=sha256:6555272dd9efd412d17cdc1a4f4c2da5753c099d95d9ff01aca54bb9782fb5cf --hash=sha256:67d994c6b2b14cb9239e85dc7dfa6c08ef7cf6eb4def80c0af6141dfacc8cbb9 --hash=sha256:68c9cbe538666c4667523821cc56caee49389bea06bae4c0fc2cd68bd264226a --hash=sha256:822ad8f628a9498f569c57d30865f5ef9ee17824cee0a1d456211f742028c135 --hash=sha256:82d972429eb4fee22c1dc4204af2a2e981f010e5e4f66daea2a6c68381b79184 --hash=sha256:9128924f5b58269ee221b8cf2d736f31bd3bb0391b92ee8504caadd68c8176a2 --hash=sha256:9172cf8270572c494d8b2ae12ef87c0f6eed9d132927e614099f76843b0c91d7 --hash=sha256:952bce4d30a8287b17721ddaad7f115dab268efee8576249ddfede80ec2ce404 --hash=sha256:a8147718e70b1f170a3d26518e992160137365a4db0ed82a9efd3040f9f660d4 --hash=sha256:bfdb636a3796ff223460ea0fcfda906b3b54f4bef22ae433a5b67e66fab00b25 --hash=sha256:c9c3f27867153634e1083390920067008ebaaab78aeb09c4e0274e69746cb2c8 --hash=sha256:d69be21973d450a4662ae6bd1b3df6b1af030e448d7276380b0d1adf7c8c2ae6 --hash=sha256:db1479636812a6579a3753b72a6fefaa73190f32bf7b19e483f8bc750cebe1a5 --hash=sha256:db8313d755962a7dd61e5c22a651e0743208adfdb255c6ec8904ce9cb02940c6 --hash=sha256:e4625a6b032e7797958aeb630d6e3e91e3896d285020aae612e6d7b342d6dfea --hash=sha256:e8397a26966a1290836a52c34b362aabc65a422b9ffabcbbdec1862f023ccab8! Will try again.
π ββββββββββββββββββββββββββββββββ 2/2 β 00:00:00
Installing initially failed dependenciesβ¦
[pipenv.exceptions.InstallError]: File "/Users/stevenbarnett/Library/Python/3.8/lib/python/site-packages/pipenv/core.py", line 1863, in do_install
[pipenv.exceptions.InstallError]: do_init(
[pipenv.exceptions.InstallError]: File "/Users/stevenbarnett/Library/Python/3.8/lib/python/site-packages/pipenv/core.py", line 1246, in do_init
[pipenv.exceptions.InstallError]: do_install_dependencies(
[pipenv.exceptions.InstallError]: File "/Users/stevenbarnett/Library/Python/3.8/lib/python/site-packages/pipenv/core.py", line 858, in do_install_dependencies
[pipenv.exceptions.InstallError]: batch_install(
[pipenv.exceptions.InstallError]: File "/Users/stevenbarnett/Library/Python/3.8/lib/python/site-packages/pipenv/core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]: File "/Users/stevenbarnett/Library/Python/3.8/lib/python/site-packages/pipenv/core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: []
[pipenv.exceptions.InstallError]: ['ERROR: Could not find a version that satisfies the requirement opencv-python==4.1.1.26 (from -r /var/folders/17/82l5td8d01nbgslcj1lbfh8r0000gn/T/pipenv-glzkfmcm-requirements/pipenv-a34e3whg-requirement.txt (line 1)) (from versions: none)', 'ERROR: No matching distribution found for opencv-python==4.1.1.26 (from -r /var/folders/17/82l5td8d01nbgslcj1lbfh8r0000gn/T/pipenv-glzkfmcm-requirements/pipenv-a34e3whg-requirement.txt (line 1))']
ERROR: ERROR: Package installation failed...
β€ ββββββββββββββββββββββββββββββββ 0/1 β 00:00:00
$>
What am I doing wrong? I thought pipenv was supposed to prevent all of these dependency errors...
As #eyllanesc mentioned, kindly please try installing opencv-python for lower version for python e.g. python 3.7
Reason is still python 3.8 package not yet available for opencv-python as shown in below url .
https://pypi.org/project/opencv-python/#files
This has caused problems for me when developing with django, the simplest case to reproduce this error follows.
I'm using Anaconda 4.6.4 running Python 3.6.5, pip version 19.0.3, and pipenv version 2018.11.26. I've updated all the packages, even tried to use previous versions of several packages.
When I use:
pipenv shell
I get a new virtual environment, then I try:
pipenv install django
I then get the following error message:
Installing djangoβ¦
Adding django to Pipfile's [packages]β¦
Installation Succeeded
Pipfile.lock not found, creatingβ¦
Locking [dev-packages] dependenciesβ¦
Locking [packages] dependenciesβ¦
Success!
Updated Pipfile.lock (85c883)!
Installing dependencies from Pipfile.lock (85c883)β¦
An error occurred while installing pytz==2018.9 --hash= ! Will try again.
================================ 2/2 - 00:00:01
Installing initially failed dependenciesβ¦
[pipenv.exceptions.InstallError]: File "c:\programdata\anaconda3\lib\site-packages\pipenv\core.py", line 1992, in do_install
[pipenv.exceptions.InstallError]: skip_lock=skip_lock,
[pipenv.exceptions.InstallError]: File "c:\programdata\anaconda3\lib\site-packages\pipenv\core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]: File "c:\programdata\anaconda3\lib\site-packages\pipenv\core.py", line 859, in do_install_dependencies
[pipenv.exceptions.InstallError]: retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]: File "c:\programdata\anaconda3\lib\site-packages\pipenv\core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]: File "c:\programdata\anaconda3\lib\site-packages\pipenv\core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: []
[pipenv.exceptions.InstallError]: ['Usage: pip [options]', '', 'Invalid requirement: pytz==2018.9 --hash=\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'pip: error: Arguments to --hash must be a hash name followed by a value, like --hash=sha256:abcde...']
ERROR: ERROR: Package installation failed...
================================ 0/1 - 00:00:00
This occurs when I'm using command line, power shell, pycharm, atom editor. I've searched for similar errors online all over the place but can't find anything relevant to this. I tried looking at the pipenv source code for the batch_install and _clean_procs functions among others in the stack trace, but couldn't figure out why it's failing.