Cannot install opencv-python with pipenv and Python 3.8 - python

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

Related

ERROR: Could not find a version that satisfies the requirement django-haystack==2.8.1

I have installed python3.6.4 and pipenv,and I have git my project to the centos7, and I want to install the project dependencies and used the code like that
pipenv install --deploy --ignore-pipfile
but I get the error like this:
Installing dependencies from Pipfile.lock (bd1720)...
?? ???????????????????????????????? 2/2 ? 00:00:00
An error occurred while installing django-haystack==2.8.1 --hash=sha256:8b54bcc926596765d0a3383d693bcdd76109c7abb6b2323b3984a39e3576028c! Will try again.
An error occurred while installing django-pure-pagination==0.3.0 --hash=sha256:02b42561b8afb09f1fb6ac6dc81db13374f5f748640f31c8160a374274b54713! Will try again.
Installing initially failed dependencies...
[InstallError]: File "/usr/local/lib/python3.6/site-packages/pipenv/cli/command.py", line 253, in install
[InstallError]: site_packages=state.site_packages
[InstallError]: File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 2063, in do_install
[InstallError]: keep_outdated=keep_outdated
[InstallError]: File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 1312, in do_init
[InstallError]: pypi_mirror=pypi_mirror,
[InstallError]: File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 900, in do_install_dependencies
[InstallError]: retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[InstallError]: File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 796, in batch_install
[InstallError]: _cleanup_procs(procs, failed_deps_queue, retry=retry)
[InstallError]: File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 703, in _cleanup_procs
[InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: Collecting django-haystack==2.8.1
[pipenv.exceptions.InstallError]: Using cached django-haystack-2.8.1.tar.gz (1.6 MB)
[pipenv.exceptions.InstallError]: ERROR: Command errored out with exit status 1:
[pipenv.exceptions.InstallError]: command: /home/lovers/.local/share/virtualenvs/HelloDjango-blog-tutorial-0FfZskE0/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-g2z8fsa3/django-haystack_153569cf40b54d2ab06ebfd5ae6e2c25/setup.py'"'"'; __file__='"'"'/tmp/pip-install-g2z8fsa3/django-haystack_153569cf40b54d2ab06ebfd5ae6e2c25/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-4uisc3da
[pipenv.exceptions.InstallError]: cwd: /tmp/pip-install-g2z8fsa3/django-haystack_153569cf40b54d2ab06ebfd5ae6e2c25/
[pipenv.exceptions.InstallError]: Complete output (13 lines):
[pipenv.exceptions.InstallError]: Traceback (most recent call last):
[pipenv.exceptions.InstallError]: File "<string>", line 1, in <module>
[pipenv.exceptions.InstallError]: File "/home/lovers/.local/share/virtualenvs/HelloDjango-blog-tutorial-0FfZskE0/lib/python3.8/site-packages/setuptools/__init__.py", line 18, in <module>
[pipenv.exceptions.InstallError]: from setuptools.dist import Distribution
[pipenv.exceptions.InstallError]: File "/home/lovers/.local/share/virtualenvs/HelloDjango-blog-tutorial-0FfZskE0/lib/python3.8/site-packages/_virtualenv.py", line 89, in exec_module
[pipenv.exceptions.InstallError]: old(module)
[pipenv.exceptions.InstallError]: File "/home/lovers/.local/share/virtualenvs/HelloDjango-blog-tutorial-0FfZskE0/lib/python3.8/site-packages/setuptools/dist.py", line 34, in <module>
[pipenv.exceptions.InstallError]: from setuptools import windows_support
[pipenv.exceptions.InstallError]: File "/home/lovers/.local/share/virtualenvs/HelloDjango-blog-tutorial-0FfZskE0/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module>
[pipenv.exceptions.InstallError]: import ctypes
[pipenv.exceptions.InstallError]: File "/usr/local/lib/python3.8/ctypes/__init__.py", line 7, in <module>
[pipenv.exceptions.InstallError]: from _ctypes import Union, Structure, Array
[pipenv.exceptions.InstallError]: ModuleNotFoundError: No module named '_ctypes'
[pipenv.exceptions.InstallError]: ----------------------------------------
[pipenv.exceptions.InstallError]: WARNING: Discarding https://files.pythonhosted.org/packages/69/43/3e247b7b2134b48e9a53fb387e191e5e05b5f38f2faf78ca892097c2b441/django-haystack-2.8.1.tar.gz#sha256=8b54bcc926596765d0a3383d693bcdd76109c7abb6b2323b3984a39e3576028c (from https://pypi.org/simple/django-haystack/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
[pipenv.exceptions.InstallError]: ERROR: Could not find a version that satisfies the requirement django-haystack==2.8.1
[pipenv.exceptions.InstallError]: ERROR: No matching distribution found for django-haystack==2.8.1
ERROR: Couldn't install package: django-haystack
Package installation failed...
? ???????????????????????????????? 1/2 ? 00
ok, when I have tried so many methods, I found the solutions to the problem.
Use the code like this
pipenv install -r requirements.txt --python 3.6
and then use the commend like that
pipenv shell
pipenv run
at last, try again
pipenv install --deploy --ignore-pipfile
and it worded!

Pipenv can't install Twisted on Python 3.8

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.

pipenv not consistant from local to server

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

Unable to install Django with pipenv because of pytz package failure

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.

Python permission error when trying to install a Discord bot cog

I was trying to install a Discord bot cog and I got an error:
That cog has requirements that I could not install. Check the console for more informations.
So I checked the console. Here's what came up.
Collecting mutagen
Downloading mutagen-1.39.tar.gz (916kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 921kB 587kB/s
Installing collected packages: mutagen
Running setup.py install for mutagen ... done
Successfully installed mutagen-1.39
Collecting matplotlib
Downloading matplotlib-2.1.0-cp35-cp35m-win_amd64.whl (8.7MB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 8.7MB 136kB/s
Collecting python-dateutil>=2.0 (from matplotlib)
Using cached python_dateutil-2.6.1-py2.py3-none-any.whl
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib)
Downloading pyparsing-2.2.0-py2.py3-none-any.whl (56kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 61kB 2.6MB/s
Collecting cycler>=0.10 (from matplotlib)
Downloading cycler-0.10.0-py2.py3-none-any.whl
Collecting pytz (from matplotlib)
Using cached pytz-2017.3-py2.py3-none-any.whl
Collecting six>=1.10 (from matplotlib)
Using cached six-1.11.0-py2.py3-none-any.whl
Collecting numpy>=1.7.1 (from matplotlib)
Using cached numpy-1.13.3-cp35-none-win_amd64.whl
Installing collected packages: six, python-dateutil, pyparsing, cycler, pytz, numpy, matplotlib
Successfully installed cycler-0.10.0 matplotlib-2.1.0 numpy-1.13.3 pyparsing-2.2.0 python-dateutil-2.6.1 pytz-2017.3 six-1.11.0
Exception:
Traceback (most recent call last):
File "C:\Users\#---No Crossing---#\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\#---No Crossing---#\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\commands\install.py", line 423, in run
shutil.rmtree(target_item_dir)
File "C:\Users\#---No Crossing---#\AppData\Local\Programs\Python\Python35\lib\shutil.py", line 494, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\#---No Crossing---#\AppData\Local\Programs\Python\Python35\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Users\#---No Crossing---#\AppData\Local\Programs\Python\Python35\lib\shutil.py", line 389, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Users\#---No Crossing---#\AppData\Local\Programs\Python\Python35\lib\shutil.py", line 387, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\#---No Crossing---#\\Documents\\Red-DiscordBot\\lib\\numpy\\core\\libopenblas_v0.2.20_mingwpy.dll'
Then I tried again with the next cog.
Same error in the beginning. But in the console:
Collecting pillow
Using cached Pillow-4.3.0-cp35-cp35m-win_amd64.whl
Collecting olefile (from pillow)
Using cached olefile-0.44.zip
Installing collected packages: olefile, pillow
Running setup.py install for olefile ... done
Successfully installed olefile-0.44 pillow-4.3.0
Exception:
Traceback (most recent call last):
File "C:\Users\#---No Crossing---#\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\#---No Crossing---#\AppData\Local\Programs\Python\Python35\lib\site-packages\pip\commands\install.py", line 423, in run
shutil.rmtree(target_item_dir)
File "C:\Users\#---No Crossing---#\AppData\Local\Programs\Python\Python35\lib\shutil.py", line 494, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\#---No Crossing---#\AppData\Local\Programs\Python\Python35\lib\shutil.py", line 389, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Users\#---No Crossing---#\AppData\Local\Programs\Python\Python35\lib\shutil.py", line 387, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\#---No Crossing---#\\Documents\\Red-DiscordBot\\lib\\PIL\\_imaging.cp35-win_amd64.pyd'
I understand that this is some error with the permissions, but I'm not really sure what to do. Can someone help me? Thanks in advance!
[I don't really know too much about Command Prompt or folder permissions, so providing the commands would be nice :)] Thanks in advance once again
-A programmer that's just starting out
I found out the answer.
Here's what to do:
1. Open Command Prompt as Admin (Search for cmd in the start menu, right click and Run as administrator)
2. Type the following in: takeown /f C:\
3. If the operation was succesful, close Command Prompt and go to This PC.
4. Right click on the C:\ drive.
5. Click on Properties. 6. Click on the Security tab at the top of the window.
7. Go to your username and click Edit.
8. Tick the Full Control box.
9. Save it.
10. Run the command again. If this persists, the takeown command might not have executed correctly.

Categories