Python: Requirements file for Conda environment - python

I was given a requirements file that looks like this:
# Name Version Build Channel
appnope 0.1.0 py37_0
arrow-cpp 0.13.0 py37h29c365f_3 conda-forge
asn1crypto 0.24.0 py37_1003 conda-forge
astroid 2.2.5 py37_0
atomicwrites 1.3.0 pypi_0 pypi
attrs 19.1.0 pypi_0 pypi
backcall 0.1.0 py37_0
blas 1.0 mkl
etc...
I went ahead and changed it to
#Name Version Build Channel
appnope=0.1.0=py37_0
arrow-cpp=0.13.0=py37h29c365f_3=conda-forge
asn1crypto=0.24.0=py37_1003=conda-forge
astroid=2.2.5=py37_0
atomicwrites=1.3.0=pypi_0=pypi
attrs=19.1.0=pypi_0=pypi
backcall=0.1.0=py37_0
blas=1.0=mkl
etc...
I am a bit new to virtual environements, so when I go to create it, I'm getting this error
conda create --name solver --file spec.txt
CondaValueError: could not parse 'asn1crypto=0.24.0=py37_1003=conda-forge' in: file.txt
So I went ahead and removed the build and channel field from each of them.
But now I'm getting
PackagesNotFoundError: The following packages are not available from current channels:
- teradatasqlalchemy==16.20.0.7
- ortools==7.1.6720
- grpcio==1.24.3
- pyathenajdbc==2.0.4
- gcc==4.8.5
- docplex==2.9.133
- idna==2.8000
- redis==3.3.5
- docloud==1.0.257
- teradatasql==16.20.0.48
- pyorc==0.3.0
- cplex==12.9.0.0
- docutils==0.14001
- ray==0.7.1
Current channels:
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
- https://conda.anaconda.org/pypi/osx-64
- https://conda.anaconda.org/pypi/noarch
Any ideas on what I'm doing incorrectly?

Related

CondaHTTPError: HTTP 000 CONNECTION FAILED for url [duplicate]

This question already has answers here:
conda update CondaHTTPError: HTTP None
(23 answers)
CondaHTTPError: HTTP 000 CONNECTION FAILED for url - Anaconda
(5 answers)
Issues with installing python libraries on Windows : CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/anaconda/win-64
(25 answers)
Closed last year.
Goal: conda create -n sdg python=3.8.8
Using:
miniconda3
Python 3.8.10
Poetry project Python 3.8.8
Command doesn't run in (base) venv either.
Bash Terminal:
(conda install python=3.8.8 also causes the same error)
me#PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/foo/bar$ conda create -n sdg python=3.8.8
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/current_repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
'https://repo.anaconda.com/pkgs/main/linux-64'
me#PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/foo/bar$ sudo conda create -n sdg python=3.8.8
[sudo] password for me:
sudo: conda: command not found
conda list:
# packages in environment at /home/me/miniconda3:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main
_openmp_mutex 4.5 1_gnu
brotlipy 0.7.0 py39h27cfd23_1003
ca-certificates 2021.7.5 h06a4308_1
certifi 2021.5.30 py39h06a4308_0
cffi 1.14.6 py39h400218f_0
chardet 4.0.0 py39h06a4308_1003
conda 4.10.3 py39h06a4308_0
conda-package-handling 1.7.3 py39h27cfd23_1
cryptography 3.4.7 py39hd23ed53_0
idna 2.10 pyhd3eb1b0_0
ld_impl_linux-64 2.35.1 h7274673_9
libffi 3.3 he6710b0_2
libgcc-ng 9.3.0 h5101ec6_17
libgomp 9.3.0 h5101ec6_17
libstdcxx-ng 9.3.0 hd4cf53a_17
ncurses 6.2 he6710b0_1
openssl 1.1.1k h27cfd23_0
pip 21.1.3 py39h06a4308_0
pycosat 0.6.3 py39h27cfd23_0
pycparser 2.20 py_2
pyopenssl 20.0.1 pyhd3eb1b0_1
pysocks 1.7.1 py39h06a4308_0
python 3.9.5 h12debd9_4
readline 8.1 h27cfd23_0
requests 2.25.1 pyhd3eb1b0_0
ruamel_yaml 0.15.100 py39h27cfd23_0
setuptools 52.0.0 py39h06a4308_0
six 1.16.0 pyhd3eb1b0_0
sqlite 3.36.0 hc218d9a_0
tk 8.6.10 hbc83047_0
tqdm 4.61.2 pyhd3eb1b0_1
tzdata 2021a h52ac0ba_0
urllib3 1.26.6 pyhd3eb1b0_1
wheel 0.36.2 pyhd3eb1b0_0
xz 5.2.5 h7b6447c_0
yaml 0.2.5 h7b6447c_0
zlib 1.2.11 h7b6447c_3
conda info:
active environment : None
shell level : 0
user config file : /home/me/.condarc
populated config files :
conda version : 4.10.3
conda-build version : not installed
python version : 3.9.5.final.0
virtual packages : __linux=4.4.0=0
__glibc=2.31=0
__unix=0=0
__archspec=1=x86_64
base environment : /home/me/miniconda3 (writable)
conda av data dir : /home/me/miniconda3/etc/conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/me/miniconda3/pkgs
/home/me/.conda/pkgs
envs directories : /home/me/miniconda3/envs
/home/me/.conda/envs
platform : linux-64
user-agent : conda/4.10.3 requests/2.25.1 CPython/3.9.5 Linux/4.4.0-19041-Microsoft ubuntu/20.04.3 glibc/2.31
UID:GID : 1000:1000
netrc file : None
offline mode : False
conda info -a:
active environment : None
shell level : 0
user config file : /home/me/.condarc
populated config files :
conda version : 4.10.3
conda-build version : not installed
python version : 3.9.5.final.0
virtual packages : __linux=4.4.0=0
__glibc=2.31=0
__unix=0=0
__archspec=1=x86_64
base environment : /home/me/miniconda3 (writable)
conda av data dir : /home/me/miniconda3/etc/conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/me/miniconda3/pkgs
/home/me/.conda/pkgs
envs directories : /home/me/miniconda3/envs
/home/me/.conda/envs
platform : linux-64
user-agent : conda/4.10.3 requests/2.25.1 CPython/3.9.5 Linux/4.4.0-19041-Microsoft ubuntu/20.04.3 glibc/2.31
UID:GID : 1000:1000
netrc file : None
offline mode : False
# conda environments:
#
base * /home/me/miniconda3
sys.version: 3.9.5 (default, Jun 4 2021, 12:28:51)
...
sys.prefix: /home/me/miniconda3
sys.executable: /home/me/miniconda3/bin/python
conda location: /home/me/miniconda3/lib/python3.9/site-packages/conda
conda-build: None
conda-env: /home/me/miniconda3/bin/conda-env
user site dirs: ~/.local/lib/python3.8
CIO_TEST: <not set>
CONDA_EXE: /home/me/miniconda3/bin/conda
CONDA_PYTHON_EXE: /home/me/miniconda3/bin/python
CONDA_ROOT: /home/me/miniconda3
CONDA_SHLVL: 0
CURL_CA_BUNDLE: <not set>
PATH: /home/me/miniconda3/bin:/home/me/miniconda3/condabin:/home/me/.vscode-server/bin/d6ee99e4c045a6716e5c653d7da8e9ae6f5a8b03/bin/remote-cli:/home/me/.poetry/bin:/home/me/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/Common Files/Oracle/Java/javapath:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Users/me/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/me/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/ProgramData/me/GitHubDesktop/bin:/mnt/c/Users/me/AppData/Local/Programs/Git LFS:/mnt/c/Users/me/AppData/Local/Programs/Git LFS:/mnt/c/Users/me/AppData/Local/Programs/Git/cmd:/snap/bin
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>
conda list --show-channel-urls:
# packages in environment at /home/me/miniconda3:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main defaults
_openmp_mutex 4.5 1_gnu defaults
brotlipy 0.7.0 py39h27cfd23_1003 defaults
ca-certificates 2021.7.5 h06a4308_1 defaults
certifi 2021.5.30 py39h06a4308_0 defaults
cffi 1.14.6 py39h400218f_0 defaults
chardet 4.0.0 py39h06a4308_1003 defaults
conda 4.10.3 py39h06a4308_0 defaults
conda-package-handling 1.7.3 py39h27cfd23_1 defaults
cryptography 3.4.7 py39hd23ed53_0 defaults
idna 2.10 pyhd3eb1b0_0 defaults
ld_impl_linux-64 2.35.1 h7274673_9 defaults
libffi 3.3 he6710b0_2 defaults
libgcc-ng 9.3.0 h5101ec6_17 defaults
libgomp 9.3.0 h5101ec6_17 defaults
libstdcxx-ng 9.3.0 hd4cf53a_17 defaults
ncurses 6.2 he6710b0_1 defaults
openssl 1.1.1k h27cfd23_0 defaults
pip 21.1.3 py39h06a4308_0 defaults
pycosat 0.6.3 py39h27cfd23_0 defaults
pycparser 2.20 py_2 defaults
pyopenssl 20.0.1 pyhd3eb1b0_1 defaults
pysocks 1.7.1 py39h06a4308_0 defaults
python 3.9.5 h12debd9_4 defaults
readline 8.1 h27cfd23_0 defaults
requests 2.25.1 pyhd3eb1b0_0 defaults
ruamel_yaml 0.15.100 py39h27cfd23_0 defaults
setuptools 52.0.0 py39h06a4308_0 defaults
six 1.16.0 pyhd3eb1b0_0 defaults
sqlite 3.36.0 hc218d9a_0 defaults
tk 8.6.10 hbc83047_0 defaults
tqdm 4.61.2 pyhd3eb1b0_1 defaults
tzdata 2021a h52ac0ba_0 defaults
urllib3 1.26.6 pyhd3eb1b0_1 defaults
wheel 0.36.2 pyhd3eb1b0_0 defaults
xz 5.2.5 h7b6447c_0 defaults
yaml 0.2.5 h7b6447c_0 defaults
zlib 1.2.11 h7b6447c_3 defaults

How can I make a python windows service that uses the GPU?

Using this link, I was able to create a Windows service using python and it runs great. However, when I try to get it to start utilizing the GPU (to interact with tensorflow) it will not see the GPU inside of the Service class.
Here is code that I am using to test the windows service.
import sys
import os
import os.path
import numpy as np
from PIL import Image
import random
#from scipy.misc import imread, imsave
import tensorflow as tf
from tensorflow import keras
from tensorflow.python.keras.layers import concatenate, Lambda, Input, Dense, Dropout, Flatten, Conv2D, MaxPooling2D, \
BatchNormalization, Activation, GlobalAveragePooling2D, SeparableConv2D, Reshape, Conv2DTranspose
import queue
from queue import Queue
#import keras
import pika
import json
import base64
import time
from six.moves import configparser
import threading
from threading import Lock, Thread
import win32serviceutil
import win32service
import win32event
import servicemanager
import logging
import logging.handlers
log_file = "C:\\loglocation\\GPUService.log"
configLocation="D:\\configlocation\\config.ini"
# Return a logger with the specified name.
mylogger = logging.getLogger("MyLogger")
# Sets the threshold for this logger to lvl. Logging messages which are less severe than lvl will be ignored.
mylogger.setLevel(logging.DEBUG)
# Sets rotation parameters of disk log files
# https://docs.python.org/3.4/library/logging.handlers.html#rotatingfilehandler
handler = logging.handlers.RotatingFileHandler(log_file, maxBytes=10485760, backupCount=2)
# Sets format of record in log file
formatter = logging.Formatter('%(asctime)s - %(module)-10s - %(levelname)-8s %(message)s', '%d-%m-%Y %H:%M:%S')
handler.setFormatter(formatter)
# Adds the specified handler to logger "MyLogger"
mylogger.addHandler(handler)
SEED = 42
np.random.seed(SEED)
random.seed(SEED)
class AAAService(win32serviceutil.ServiceFramework):
_svc_name_ = "AAATestService"
_svc_display_name_ = "Test Service"
def __init__(self, args):
mylogger.info("*** INIT SERVICE ***\n")
win32serviceutil.ServiceFramework.__init__(self, args)
# Create an event which we will use to wait on.
# The "service stop" request will set this event.
self.hWaitStop = win32event.CreateEvent(None, 0, 0, None)
self.stop_requested=False
def SvcStop(self):
# Before we do anything, tell the SCM we are starting the stop process.
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
mylogger.info("*** STOP SERVICE ***\n")
# And set my event.
win32event.SetEvent(self.hWaitStop)
self.stop_requested=True
def SvcDoRun(self):
# We do nothing other than wait to be stopped!
mylogger.info("*** STARTING SERVICE ***\n")
self.main()
win32event.WaitForSingleObject(self.hWaitStop, win32event.INFINITE)
def main(self):
mylogger.info("... Can I see a GPU? ...\n")
mylogger.info(tf.config.list_physical_devices('GPU'))
sys_details = tf.sysconfig.get_build_info()
cuda_version = sys_details["cuda_version"]
mylogger.info("This is my cuda version: " + cuda_version)
cudnn_version = sys_details["cudnn_version"]
mylogger.info("CUDNN_VERSION: "+ cudnn_version)
cuda_compute_capabilities = sys_details["cuda_compute_capabilities"]
mylogger.info(cuda_compute_capabilities)
mylogger.info("... STARTING SCHEDULE PROCESS ...\n")
mylogger.info("... Waiting for reponse messages ...\n")
# while not self.stop_requested:
# # execute task on schedule
# mylogger.info("... task ...\n")
# time.sleep(10)
return
if __name__=='__main__':
if len(sys.argv) == 1:
servicemanager.Initialize()
servicemanager.PrepareToHostSingle(AAAService)
servicemanager.StartServiceCtrlDispatcher()
else:
win32serviceutil.HandleCommandLine(AAAService)
mylogger.info("... 1Can I see a GPU? ...\n")
mylogger.info(tf.config.list_physical_devices('GPU'))
sys_details = tf.sysconfig.get_build_info()
cuda_version = sys_details["cuda_version"]
mylogger.info("1This is my cuda version: " + cuda_version)
cudnn_version = sys_details["cudnn_version"]
mylogger.info("1CUDNN_VERSION: "+ cudnn_version)
cuda_compute_capabilities = sys_details["cuda_compute_capabilities"]
mylogger.info(cuda_compute_capabilities)
mylogger.info("... 1STARTING SCHEDULE PROCESS ...\n")
mylogger.info("... 1Waiting for reponse messages ...\n")
And here is my conda list to show my environment
#
# Name Version Build Channel
absl-py 0.15.0 pypi_0 pypi
altgraph 0.17 pyhd3eb1b0_0
astunparse 1.6.3 pypi_0 pypi
ca-certificates 2021.10.8 h5b45459_0 conda-forge
cachetools 5.0.0 pypi_0 pypi
certifi 2021.10.8 py39hcbf5309_1 conda-forge
charset-normalizer 2.0.12 pypi_0 pypi
flatbuffers 1.12 pypi_0 pypi
freetype 2.10.4 hd328e21_0
future 0.18.2 py39haa95532_1
gast 0.4.0 pypi_0 pypi
google-auth 2.6.0 pypi_0 pypi
google-auth-oauthlib 0.4.6 pypi_0 pypi
google-pasta 0.2.0 pypi_0 pypi
grpcio 1.34.1 pypi_0 pypi
h5py 3.1.0 pypi_0 pypi
idna 3.3 pypi_0 pypi
importlib-metadata 4.11.1 pypi_0 pypi
jpeg 9d h2bbff1b_0
keras-nightly 2.5.0.dev2021032900 pypi_0 pypi
keras-preprocessing 1.1.2 pypi_0 pypi
libpng 1.6.37 h2a8f88b_0
libtiff 4.2.0 hd0e1b90_0
libwebp 1.2.0 h2bbff1b_0
lz4-c 1.9.3 h2bbff1b_1
macholib 1.14 pyhd3eb1b0_1
markdown 3.3.6 pypi_0 pypi
numpy 1.19.5 pypi_0 pypi
oauthlib 3.2.0 pypi_0 pypi
olefile 0.46 pyhd3eb1b0_0
openssl 1.1.1l h8ffe710_0 conda-forge
opt-einsum 3.3.0 pypi_0 pypi
pefile 2019.4.18 py_0
pika 1.2.0 pyh44b312d_0 conda-forge
pillow 8.4.0 py39hd45dc43_0
pip 21.2.4 py39haa95532_0
protobuf 3.19.4 pypi_0 pypi
pyasn1 0.4.8 pypi_0 pypi
pyasn1-modules 0.2.8 pypi_0 pypi
pycryptodome 3.12.0 py39h2bbff1b_0
pyinstaller 3.6 py39h8cc25b3_6
python 3.9.7 h6244533_1
python_abi 3.9 2_cp39 conda-forge
pywin32 302 py39h827c3e9_1
pywin32-ctypes 0.2.0 py39haa95532_1000
requests 2.27.1 pypi_0 pypi
requests-oauthlib 1.3.1 pypi_0 pypi
rsa 4.8 pypi_0 pypi
setuptools 58.0.4 py39haa95532_0
six 1.15.0 pypi_0 pypi
sqlite 3.37.2 h2bbff1b_0
tensorboard 2.8.0 pypi_0 pypi
tensorboard-data-server 0.6.1 pypi_0 pypi
tensorboard-plugin-wit 1.8.1 pypi_0 pypi
tensorflow-estimator 2.5.0 pypi_0 pypi
tensorflow-gpu 2.5.0 pypi_0 pypi
termcolor 1.1.0 pypi_0 pypi
tk 8.6.11 h2bbff1b_0
typing-extensions 3.7.4.3 pypi_0 pypi
tzdata 2021e hda174b7_0
urllib3 1.26.8 pypi_0 pypi
vc 14.2 h21ff451_1
vs2015_runtime 14.27.29016 h5e58377_2
werkzeug 2.0.3 pypi_0 pypi
wheel 0.37.1 pyhd3eb1b0_0
wincertstore 0.2 py39haa95532_2
wrapt 1.12.1 pypi_0 pypi
xz 5.2.5 h62dcd97_0
zipp 3.7.0 pypi_0 pypi
zlib 1.2.11 h8cc25b3_4
zstd 1.4.9 h19a0ad4_0
When I install or start the service, my log is showing the GPU is appropriately being recognized in the
__main__
function, but when I get to the service class, the GPU is no longer seen.
The service still sees the appropriate version of cuda as well, here is a snapshot from the log
02-03-2022 10:36:09 - GPUService - INFO ... 1Can I see a GPU? ...
02-03-2022 10:36:09 - GPUService - INFO [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
02-03-2022 10:36:09 - GPUService - INFO 1This is my cuda version: 64_112
02-03-2022 10:36:09 - GPUService - INFO 1CUDNN_VERSION: 64_8
02-03-2022 10:36:09 - GPUService - INFO ['sm_35', 'sm_50', 'sm_60', 'sm_70', 'sm_75', 'compute_80']
02-03-2022 10:36:09 - GPUService - INFO ... 1STARTING SCHEDULE PROCESS ...
02-03-2022 10:36:09 - GPUService - INFO ... 1Waiting for reponse messages ...
02-03-2022 10:36:11 - GPUService - INFO *** INIT SERVICE ***
02-03-2022 10:36:11 - GPUService - INFO *** STARTING SERVICE ***
02-03-2022 10:36:11 - GPUService - INFO ... Can I see a GPU? ...
02-03-2022 10:36:11 - GPUService - INFO []
02-03-2022 10:36:11 - GPUService - INFO This is my cuda version: 64_112
02-03-2022 10:36:11 - GPUService - INFO CUDNN_VERSION: 64_8
02-03-2022 10:36:11 - GPUService - INFO ['sm_35', 'sm_50', 'sm_60', 'sm_70', 'sm_75', 'compute_80']
02-03-2022 10:36:11 - GPUService - INFO ... STARTING SCHEDULE PROCESS ...
02-03-2022 10:36:11 - GPUService - INFO ... Waiting for reponse messages ...
I have another script that is just testing out the GPU within this conda env and it sees the GPU just fine.
I think it has something to do with the changing of context once it enters the service.

GAE/P3 dependency conflicts

I have a GAE standard Python 3 app. When I deploy with
gcloud app deploy app.yaml --project XXX
and this for my requirements.txt:
Werkzeug==1.0.1
Flask==1.1.2
Flask-Login==0.5.0
Flask-WTF==0.14.3
google-cloud-ndb==1.10.5
google-cloud-tasks==2.6.0
firebase-admin==5.0.3
I now get this error:
Updating service [default]...
WARNING: Found incompatible dependencies:
google-cloud-datastore 1.15.3 has requirement google-api-core[grpc]<2.0.0dev,>=1.14.0, but you have google-api-core 2.1.1.
google-cloud-core 1.7.2 has requirement google-api-core<2.0.0dev,>=1.21.0, but you have google-api-core 2.1.1.
google-cloud-core 1.7.2 has requirement google-auth<2.0dev,>=1.24.0, but you have google-auth 2.3.0.
Although my app appears to be working, I'd like to get rid of these errors just in case.
I don't get these errors on my Mac, and nothing requires google-api-core 2.1.1.
The output of pipdeptree | fgrep api-core is:
- google-api-core [required: >=1.22.1,<3.0.0dev, installed: 1.31.3]
- google-api-core [required: >=1.21.0,<3.0.0dev, installed: 1.31.3]
- google-api-core [required: >=1.26.0,<3.0.0dev, installed: 1.31.3]
- google-api-core [required: >=1.21.0,<2.0.0dev, installed: 1.31.3]
- google-api-core [required: >=1.29.0,<3.0dev, installed: 1.31.3]
- google-api-core [required: >=1.21.0,<2.0.0dev, installed: 1.31.3]
- google-api-core [required: >=1.14.0,<2.0.0dev, installed: 1.31.3]
- google-api-core [required: >=1.21.0,<2.0.0dev, installed: 1.31.3]
- google-api-core [required: >=1.26.0,<3.0.0dev, installed: 1.31.3]
My requirements.txt is shown below.
Is there a combination of versions of google-cloud-ndb, google-cloud-tasks, and firebase-admin that work together?
When version numbers are not explicitly set in requirements.txt, the system will install the most recent version. And sometimes, the most recent version of one package is not compatible to another package.
In your project, google-api-core 2.1.1 is automatically installed but your version of google-cloud-datastore needs something lower than 2.0.0 but a minimum of 1.14.0. The same logic goes with the warnings related to google-cloud-core 1.7.2.
To fix this, you should explicitly set the version numbers for the mentioned packages using the version range provided in the warning message. You'll have to pick something that works for you. For example, you can have google-api-core 1.14.0 in your requirements.txt file but this assumes that there is nothing in your code that needs a feature that is in a higher release.
Fixing the versions of google-api-core and google-auth gets rid of the version incompatibilities. It looks like there are a lot of changes with version 2 of these libraries (which are new as of a few months ago), and that firebase hasn't caught up yet so I fixed the most recent 1.* version.
Here is a working requirements.txt using latest libraries:
Werkzeug==1.0.1
Flask==1.1.2
Flask-Login==0.5.0
Flask-WTF==0.14.3
google-api-core==1.31.5 # Avoid conflicts
google-auth==1.35.0 # Avoid conflicts
google-cloud-ndb==1.11.1
google-cloud-tasks==2.7.1
firebase-admin==5.2.0
I wish pip could figure this stuff out...

bash: cd: /home/user/.conda/pkgs: No such file or directory

I have had the loader problem with my conda similar to this post:
AttributeError: 'NoneType' object has no attribute 'loader'
So when can not solve it i have decides to reinstall conda by These command :
conda install anaconda-clean
anaconda-clean --yes
wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
sudo bash Anaconda3-2020.11-Linux-x86_64.sh
So based of this post my Conda information is :
active environment : base
active env location : /home/so/anaconda3
shell level : 1
user config file : /home/so/.condarc populated config files : /home/so/.condarc
conda version : 4.9.2
conda-build version : 3.20.5
python version : 3.8.5.final.0
virtual packages : __cuda=11.0=0
__glibc=2.27=0
__unix=0=0
__archspec=1=x86_64
base environment : /home/so/anaconda3 (read only)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/so/anaconda3/pkgs
/home/so/.conda/pkgs
envs directories : /home/so/.conda/envs
/home/so/anaconda3/envs
platform : linux-64
user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.5 Linux/5.4.0-66-generic ubuntu/18.04.5 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False
``` and `conda config --show-sources` is:
``` conda config --show-sources
==> /home/so/.condarc <== ssl_verify: True channels:
- defaults
``` and `conda list --show-channel-urls` is:
``` conda list --show-channel-urls
# packages in environment at /home/so/anaconda3:
#
# Name Version Build Channel
_ipyw_jlab_nb_ext_conf 0.1.0 py38_0 defaults
_libgcc_mutex 0.1 main defaults alabaster 0.7.12 py_0 defaults
anaconda 2020.11 py38_0 defaults
anaconda-client 1.7.2 py38_0 defaults
anaconda-navigator 1.10.0 py38_0 defaults
anaconda-project 0.8.4 py_0 defaults
argh 0.26.2 py38_0 defaults
argon2-cffi 20.1.0 py38h7b6447c_1 defaults
asn1crypto 1.4.0 py_0 defaults
astroid 2.4.2 py38_0 defaults
astropy 4.0.2 py38h7b6447c_0 defaults
async_generator 1.10 py_0 defaults
atomicwrites 1.4.0 py_0 defaults
attrs 20.3.0 pyhd3eb1b0_0 defaults
autopep8 1.5.4 py_0 defaults
babel 2.8.1 pyhd3eb1b0_0 defaults
backcall 0.2.0 py_0 defaults
backports 1.0 py_2 defaults
backports.functools_lru_cache 1.6.1 py_0
defaults backports.shutil_get_terminal_size 1.0.0
py38_2 defaults backports.tempfile 1.0
py_1 defaults backports.weakref 1.0.post1
py_1 defaults beautifulsoup4 4.9.3
pyhb0f4dca_0 defaults bitarray 1.6.1
py38h27cfd23_0 defaults bkcharts 0.2
py38_0 defaults blas 1.0
mkl defaults bleach 3.2.1
py_0 defaults blosc 1.20.1
hd408876_0 defaults bokeh 2.2.3
py38_0 defaults boto 2.49.0
py38_0 defaults bottleneck 1.3.2
py38heb32a55_1 defaults brotlipy 0.7.0
py38h7b6447c_1000 defaults bzip2 1.0.8
h7b6447c_0 defaults ca-certificates 2020.10.14
0 defaults cairo 1.14.12
h8948797_3 defaults certifi 2020.6.20
pyhd3eb1b0_3 defaults cffi 1.14.3
py38he30daa8_0 defaults chardet 3.0.4
py38_1003 defaults click 7.1.2
py_0 defaults cloudpickle 1.6.0
py_0 defaults clyent 1.2.2
py38_1 defaults colorama 0.4.4
py_0 defaults conda 4.9.2
py38h06a4308_0 defaults conda-build 3.20.5
py38_1 defaults conda-env 2.6.0
1 defaults conda-package-handling 1.7.2
py38h03888b9_0 defaults conda-verify 3.4.2
py_1 defaults contextlib2 0.6.0.post1
py_0 defaults cryptography 3.1.1
py38h1ba5d50_0 defaults curl 7.71.1
hbc83047_1 defaults cycler 0.10.0
py38_0 defaults cython 0.29.21
py38he6710b0_0 defaults cytoolz 0.11.0
py38h7b6447c_0 defaults dask 2.30.0
py_0 defaults dask-core 2.30.0
py_0 defaults dbus 1.13.18
hb2f20db_0 defaults decorator 4.4.2
py_0 defaults defusedxml 0.6.0
py_0 defaults diff-match-patch 20200713
py_0 defaults distributed 2.30.1
py38h06a4308_0 defaults docutils 0.16
py38_1 defaults entrypoints 0.3
py38_0 defaults et_xmlfile 1.0.1
py_1001 defaults expat 2.2.10
he6710b0_2 defaults fastcache 1.1.0
py38h7b6447c_0 defaults filelock 3.0.12
py_0 defaults flake8 3.8.4
py_0 defaults flask 1.1.2
py_0 defaults fontconfig 2.13.0
h9420a91_0 defaults freetype 2.10.4
h5ab3b9f_0 defaults fribidi 1.0.10
h7b6447c_0 defaults fsspec 0.8.3
py_0 defaults future 0.18.2
py38_1 defaults get_terminal_size 1.0.0
haa9412d_0 defaults gevent 20.9.0
py38h7b6447c_0 defaults glib 2.66.1
h92f7085_0 defaults glob2 0.7
py_0 defaults gmp 6.1.2
h6c8ec71_1 defaults gmpy2 2.0.8
py38hd5f6e3b_3 defaults graphite2 1.3.14
h23475e2_0 defaults greenlet 0.4.17
py38h7b6447c_0 defaults gst-plugins-base 1.14.0
hbbd80ab_1 defaults gstreamer 1.14.0
hb31296c_0 defaults h5py 2.10.0
py38h7918eee_0 defaults harfbuzz 2.4.0
hca77d97_1 defaults hdf5 1.10.4
hb1b8bf9_0 defaults heapdict 1.0.1
py_0 defaults html5lib 1.1
py_0 defaults icu 58.2
he6710b0_3 defaults idna 2.10
py_0 defaults imageio 2.9.0
py_0 defaults imagesize 1.2.0
py_0 defaults importlib-metadata 2.0.0
py_1 defaults importlib_metadata 2.0.0
1 defaults iniconfig 1.1.1
py_0 defaults intel-openmp 2020.2
254 defaults intervaltree 3.1.0
py_0 defaults ipykernel 5.3.4
py38h5ca1d4c_0 defaults ipython 7.19.0
py38hb070fc8_0 defaults ipython_genutils 0.2.0
py38_0 defaults ipywidgets 7.5.1
py_1 defaults isort 5.6.4
py_0 defaults itsdangerous 1.1.0
py_0 defaults jbig 2.1
hdba287a_0 defaults jdcal 1.4.1
py_0 defaults jedi 0.17.1
py38_0 defaults jeepney 0.5.0
pyhd3eb1b0_0 defaults jinja2 2.11.2
py_0 defaults joblib 0.17.0
py_0 defaults jpeg 9b
h024ee3a_2 defaults json5 0.9.5
py_0 defaults jsonschema 3.2.0
py_2 defaults jupyter 1.0.0
py38_7 defaults jupyter_client 6.1.7
py_0 defaults jupyter_console 6.2.0
py_0 defaults jupyter_core 4.6.3
py38_0 defaults jupyterlab 2.2.6
py_0 defaults jupyterlab_pygments 0.1.2
py_0 defaults jupyterlab_server 1.2.0
py_0 defaults keyring 21.4.0
py38_1 defaults kiwisolver 1.3.0
py38h2531618_0 defaults krb5 1.18.2
h173b8e3_0 defaults lazy-object-proxy 1.4.3
py38h7b6447c_0 defaults lcms2 2.11
h396b838_0 defaults ld_impl_linux-64 2.33.1
h53a641e_7 defaults libarchive 3.4.2
h62408e4_0 defaults libcurl 7.71.1
h20c2e04_1 defaults libedit 3.1.20191231
h14c3975_1 defaults libffi 3.3
he6710b0_2 defaults libgcc-ng 9.1.0
hdf63c60_0 defaults libgfortran-ng 7.3.0
hdf63c60_0 defaults liblief 0.10.1
he6710b0_0 defaults libllvm10 10.0.1
hbcb73fb_5 defaults libllvm9 9.0.1
h4a3c616_1 defaults libpng 1.6.37
hbc83047_0 defaults libsodium 1.0.18
h7b6447c_0 defaults libspatialindex 1.9.3
he6710b0_0 defaults libssh2 1.9.0
h1ba5d50_1 defaults libstdcxx-ng 9.1.0
hdf63c60_0 defaults libtiff 4.1.0
h2733197_1 defaults libtool 2.4.6
h7b6447c_1005 defaults libuuid 1.0.3
h1bed415_2 defaults libxcb 1.14
h7b6447c_0 defaults libxml2 2.9.10
hb55368b_3 defaults libxslt 1.1.34
hc22bd24_0 defaults llvmlite 0.34.0
py38h269e1b5_4 defaults locket 0.2.0
py38_1 defaults lxml 4.6.1
py38hefd8a0e_0 defaults lz4-c 1.9.2
heb0550a_3 defaults lzo 2.10
h7b6447c_2 defaults markupsafe 1.1.1
py38h7b6447c_0 defaults matplotlib 3.3.2
0 defaults matplotlib-base 3.3.2
py38h817c723_0 defaults mccabe 0.6.1
py38_1 defaults mistune 0.8.4
py38h7b6447c_1000 defaults mkl 2020.2
256 defaults mkl-service 2.3.0
py38he904b0f_0 defaults mkl_fft 1.2.0
py38h23d657b_0 defaults mkl_random 1.1.1
py38h0573a6f_0 defaults mock 4.0.2
py_0 defaults more-itertools 8.6.0
pyhd3eb1b0_0 defaults mpc 1.1.0
h10f8cd9_1 defaults mpfr 4.0.2
hb69a4c5_1 defaults mpmath 1.1.0
py38_0 defaults msgpack-python 1.0.0
py38hfd86e86_1 defaults multipledispatch 0.6.0
py38_0 defaults navigator-updater 0.2.1
py38_0 defaults nbclient 0.5.1
py_0 defaults nbconvert 6.0.7
py38_0 defaults nbformat 5.0.8
py_0 defaults ncurses 6.2
he6710b0_1 defaults nest-asyncio 1.4.2
pyhd3eb1b0_0 defaults networkx 2.5
py_0 defaults nltk 3.5
py_0 defaults nose 1.3.7
py38_2 defaults notebook 6.1.4
py38_0 defaults numba 0.51.2
py38h0573a6f_1 defaults numexpr 2.7.1
py38h423224d_0 defaults numpy 1.19.2
py38h54aff64_0 defaults numpy-base 1.19.2
py38hfa32c7d_0 defaults numpydoc 1.1.0
pyhd3eb1b0_1 defaults olefile 0.46
py_0 defaults openpyxl 3.0.5
py_0 defaults openssl 1.1.1h
h7b6447c_0 defaults packaging 20.4
py_0 defaults pandas 1.1.3
py38he6710b0_0 defaults pandoc 2.11
hb0f4dca_0 defaults pandocfilters 1.4.3
py38h06a4308_1 defaults pango 1.45.3
hd140c19_0 defaults parso 0.7.0
py_0 defaults partd 1.1.0
py_0 defaults patchelf 0.12
he6710b0_0 defaults path 15.0.0
py38_0 defaults path.py 12.5.0
0 defaults pathlib2 2.3.5
py38_0 defaults pathtools 0.1.2
py_1 defaults patsy 0.5.1
py38_0 defaults pcre 8.44
he6710b0_0 defaults pep8 1.7.1
py38_0 defaults pexpect 4.8.0
py38_0 defaults pickleshare 0.7.5
py38_1000 defaults pillow 8.0.1
py38he98fc37_0 defaults pip 20.2.4
py38h06a4308_0 defaults pixman 0.40.0
h7b6447c_0 defaults pkginfo 1.6.1
py38h06a4308_0 defaults pluggy 0.13.1
py38_0 defaults ply 3.11
py38_0 defaults prometheus_client 0.8.0
py_0 defaults prompt-toolkit 3.0.8
py_0 defaults prompt_toolkit 3.0.8
0 defaults psutil 5.7.2
py38h7b6447c_0 defaults ptyprocess 0.6.0
py38_0 defaults py 1.9.0
py_0 defaults py-lief 0.10.1
py38h403a769_0 defaults pycodestyle 2.6.0
py_0 defaults pycosat 0.6.3
py38h7b6447c_1 defaults pycparser 2.20
py_2 defaults pycurl 7.43.0.6
py38h1ba5d50_0 defaults pydocstyle 5.1.1
py_0 defaults pyflakes 2.2.0
py_0 defaults pygments 2.7.2
pyhd3eb1b0_0 defaults pylint 2.6.0
py38_0 defaults pyodbc 4.0.30
py38he6710b0_0 defaults pyopenssl 19.1.0
py_1 defaults pyparsing 2.4.7
py_0 defaults pyqt 5.9.2
py38h05f1152_4 defaults pyrsistent 0.17.3
py38h7b6447c_0 defaults pysocks 1.7.1
py38_0 defaults pytables 3.6.1
py38h9fd0a39_0 defaults pytest 6.1.1
py38_0 defaults python 3.8.5
h7579374_1 defaults python-dateutil 2.8.1
py_0 defaults python-jsonrpc-server 0.4.0
py_0 defaults python-language-server 0.35.1
py_0 defaults python-libarchive-c 2.9
py_0 defaults pytz 2020.1
py_0 defaults pywavelets 1.1.1
py38h7b6447c_2 defaults pyxdg 0.27
pyhd3eb1b0_0 defaults pyyaml 5.3.1
py38h7b6447c_1 defaults pyzmq 19.0.2
py38he6710b0_1 defaults qdarkstyle 2.8.1
py_0 defaults qt 5.9.7
h5867ecd_1 defaults qtawesome 1.0.1
py_0 defaults qtconsole 4.7.7
py_0 defaults qtpy 1.9.0
py_0 defaults readline 8.0
h7b6447c_0 defaults regex 2020.10.15
py38h7b6447c_0 defaults requests 2.24.0
py_0 defaults ripgrep 12.1.1
0 defaults rope 0.18.0
py_0 defaults rtree 0.9.4
py38_1 defaults ruamel_yaml 0.15.87
py38h7b6447c_1 defaults scikit-image 0.17.2
py38hdf5156a_0 defaults scikit-learn 0.23.2
py38h0573a6f_0 defaults scipy 1.5.2
py38h0b6359f_0 defaults seaborn 0.11.0
py_0 defaults secretstorage 3.1.2
py38_0 defaults send2trash 1.5.0
py38_0 defaults setuptools 50.3.1
py38h06a4308_1 defaults simplegeneric 0.8.1
py38_2 defaults singledispatch 3.4.0.3
py_1001 defaults sip 4.19.13
py38he6710b0_0 defaults six 1.15.0
py38h06a4308_0 defaults snappy 1.1.8
he6710b0_0 defaults snowballstemmer 2.0.0
py_0 defaults sortedcollections 1.2.1
py_0 defaults sortedcontainers 2.2.2
py_0 defaults soupsieve 2.0.1
py_0 defaults sphinx 3.2.1
py_0 defaults sphinxcontrib 1.0
py38_1 defaults sphinxcontrib-applehelp 1.0.2
py_0 defaults sphinxcontrib-devhelp 1.0.2
py_0 defaults sphinxcontrib-htmlhelp 1.0.3
py_0 defaults sphinxcontrib-jsmath 1.0.1
py_0 defaults sphinxcontrib-qthelp 1.0.3
py_0 defaults sphinxcontrib-serializinghtml 1.1.4
py_0 defaults sphinxcontrib-websupport 1.2.4
py_0 defaults spyder 4.1.5
py38_0 defaults spyder-kernels 1.9.4
py38_0 defaults sqlalchemy 1.3.20
py38h7b6447c_0 defaults sqlite 3.33.0
h62c20be_0 defaults statsmodels 0.12.0
py38h7b6447c_0 defaults sympy 1.6.2
py38h06a4308_1 defaults tbb 2020.3
hfd86e86_0 defaults tblib 1.7.0
py_0 defaults terminado 0.9.1
py38_0 defaults testpath 0.4.4
py_0 defaults threadpoolctl 2.1.0
pyh5ca1d4c_0 defaults tifffile 2020.10.1
py38hdd07704_2 defaults tk 8.6.10
hbc83047_0 defaults toml 0.10.1
py_0 defaults toolz 0.11.1
py_0 defaults tornado 6.0.4
py38h7b6447c_1 defaults tqdm 4.50.2
py_0 defaults traitlets 5.0.5
py_0 defaults typing_extensions 3.7.4.3
py_0 defaults ujson 4.0.1
py38he6710b0_0 defaults unicodecsv 0.14.1
py38_0 defaults unixodbc 2.3.9
h7b6447c_0 defaults urllib3 1.25.11
py_0 defaults watchdog 0.10.3
py38_0 defaults wcwidth 0.2.5
py_0 defaults webencodings 0.5.1
py38_1 defaults werkzeug 1.0.1
py_0 defaults wheel 0.35.1
py_0 defaults widgetsnbextension 3.5.1
py38_0 defaults wrapt 1.11.2
py38h7b6447c_0 defaults wurlitzer 2.0.1
py38_0 defaults xlrd 1.2.0
py_0 defaults xlsxwriter 1.3.7
py_0 defaults xlwt 1.3.0
py38_0 defaults xmltodict 0.12.0
py_0 defaults xz 5.2.5
h7b6447c_0 defaults yaml 0.2.5
h7b6447c_0 defaults yapf 0.30.0
py_0 defaults zeromq 4.3.3
he6710b0_3 defaults zict 2.0.0
py_0 defaults zipp 3.4.0
pyhd3eb1b0_0 defaults zlib 1.2.11
h7b6447c_3 defaults zope 1.0
py38_1 defaults zope.event 4.5.0
py38_0 defaults zope.interface 5.1.2
py38h7b6447c_0 defaults zstd 1.4.5
h9ceee32_0 defaults
but when i tried to install the Jupyter by conda install -c conda-forge jupyterlab command i get this error:
(base) so#so-Lenovo-ideapad-310-15IKB:~/Downloads$ conda install -c conda-forge jupyterlab
Collecting package metadata (current_repodata.json): failed
NotWritableError: The current user does not have write permissions to a required path.
path: /home/so/.conda/pkgs/urls.txt
uid: 1000
gid: 1000
If you feel that permissions on this path are set incorrectly, you can manually
change them by executing
$ sudo chown 1000:1000 /home/so/.conda/pkgs/urls.txt
In general, it's not advisable to use 'sudo conda'.
And i have understand the /home/so/.conda/pkgs folder is not exist as you can see below:
(base) so#so-Lenovo-ideapad-310-15IKB:~$ cd /home/so/.conda/pkgs
bash: cd: /home/so/.conda/pkgs: No such file or directory
So what do you suggest to solve this problem?
Update:
I have found solution and write it as answer to this question for other usage, But I don't know why by removing the 'username:` part of the above command , like said here and shown below, it was not working?
(base) so#so-Lenovo-ideapad-310-15IKB:~$ sudo chmod -R +x /home/so/anaconda3
(base) so#so-Lenovo-ideapad-310-15IKB:~$ sudo chmod -R +x /home/so/.conda
(base) so#so-Lenovo-ideapad-310-15IKB:~$ conda update --all
Collecting package metadata (current_repodata.json): failed
NotWritableError: The current user does not have write permissions to a required path.
path: /home/so/.conda/pkgs/urls.txt
uid: 1000
gid: 1000
If you feel that permissions on this path are set incorrectly, you can manually
change them by executing
$ sudo chown 1000:1000 /home/so/.conda/pkgs/urls.txt
In general, it's not advisable to use 'sudo conda'.
Thanks.
It was the conda permission problem and based of this post and its answers, I tried these commands:
so#so-Lenovo-ideapad-310-15IKB:~$ sudo chown -R so: /home/so/anaconda3
so#so-Lenovo-ideapad-310-15IKB:~$ sudo chown -R so: /home/so/.conda
And my problem as you can see below solved:
Thanks.

WEBP support not installed error with Pillow included in Anaconda

I have written a small code to open webp image in the Anaconda prompt.
from PIL import Image
im = Image.open('test.webp')
It causes the following error:
C:\ProgramData\Anaconda3\lib\site-packages\PIL\Image.py:2655: UserWarning: image file could not be identified because WEBP support not installed
warnings.warn(message)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\ProgramData\Anaconda3\lib\site-packages\PIL\Image.py", line 2657, in open
% (filename if filename else fp))
OSError: cannot identify image file 'test.webp'
The same code works fine in python-3.7.2-amd64 installed in another directory with Pillow 5.4.1.
Package Version
---------- -------
Pillow 5.4.1
pip 18.1
setuptools 40.6.2
The above code causes the same error in Anaconda prompt, Spyder and Jupyter Notebook. Still the same error even after reinstallation the Anaconda or trying on the different PC.
Anaconda or Miniconda version:
Anaconda 2018.12 for Windows Installer
Python 3.7 version 64-Bit Graphical Installer
Anaconda3-2018.12-Windows-x86_64.exe
Operating System:
Windows 10 Professional 64-Bit
The same issue was reported on GitHub #10737.
conda info
active environment : base
active env location : C:\ProgramData\Anaconda3
shell level : 1
user config file : C:\Users\chen\.condarc
populated config files : C:\Users\chen\.condarc
conda version : 4.5.12
conda-build version : 3.17.6
python version : 3.7.1.final.0
base environment : C:\ProgramData\Anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/win-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/win-64
https://repo.anaconda.com/pkgs/pro/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\ProgramData\Anaconda3\pkgs
C:\Users\chen\AppData\Local\conda\conda\pkgs
envs directories : C:\ProgramData\Anaconda3\envs
C:\Users\chen\AppData\Local\conda\conda\envs
C:\Users\chen\.conda\envs
platform : win-64
user-agent : conda/4.5.12 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.17763
administrator : True
netrc file : None
offline mode : False
conda list --show-channel-urls
# packages in environment at C:\ProgramData\Anaconda3:
#
# Name Version Build Channel
_ipyw_jlab_nb_ext_conf 0.1.0 py37_0 defaults
alabaster 0.7.12 py37_0 defaults
anaconda 2018.12 py37_0 defaults
anaconda-client 1.7.2 py37_0 defaults
anaconda-navigator 1.9.6 py37_0 defaults
anaconda-project 0.8.2 py37_0 defaults
asn1crypto 0.24.0 py37_0 defaults
astroid 2.1.0 py37_0 defaults
astropy 3.1 py37he774522_0 defaults
atomicwrites 1.2.1 py37_0 defaults
attrs 18.2.0 py37h28b3542_0 defaults
babel 2.6.0 py37_0 defaults
backcall 0.1.0 py37_0 defaults
backports 1.0 py37_1 defaults
backports.os 0.1.1 py37_0 defaults
backports.shutil_get_terminal_size 1.0.0 py37_2 defaults
beautifulsoup4 4.6.3 py37_0 defaults
bitarray 0.8.3 py37hfa6e2cd_0 defaults
bkcharts 0.2 py37_0 defaults
blas 1.0 mkl defaults
blaze 0.11.3 py37_0 defaults
bleach 3.0.2 py37_0 defaults
blosc 1.14.4 he51fdeb_0 defaults
bokeh 1.0.2 py37_0 defaults
boto 2.49.0 py37_0 defaults
bottleneck 1.2.1 py37h452e1ab_1 defaults
bzip2 1.0.6 hfa6e2cd_5 defaults
ca-certificates 2018.03.07 0 defaults
certifi 2018.11.29 py37_0 defaults
cffi 1.11.5 py37h74b6da3_1 defaults
chardet 3.0.4 py37_1 defaults
click 7.0 py37_0 defaults
cloudpickle 0.6.1 py37_0 defaults
clyent 1.2.2 py37_1 defaults
colorama 0.4.1 py37_0 defaults
comtypes 1.1.7 py37_0 defaults
conda 4.5.12 py37_0 defaults
conda-build 3.17.6 py37_0 defaults
conda-env 2.6.0 1 defaults
conda-verify 3.1.1 py37_0 defaults
console_shortcut 0.1.1 3 defaults
contextlib2 0.5.5 py37_0 defaults
cryptography 2.4.2 py37h7a1dbc1_0 defaults
curl 7.63.0 h2a8f88b_1000 defaults
cycler 0.10.0 py37_0 defaults
cython 0.29.2 py37ha925a31_0 defaults
cytoolz 0.9.0.1 py37hfa6e2cd_1 defaults
dask 1.0.0 py37_0 defaults
dask-core 1.0.0 py37_0 defaults
datashape 0.5.4 py37_1 defaults
decorator 4.3.0 py37_0 defaults
defusedxml 0.5.0 py37_1 defaults
distributed 1.25.1 py37_0 defaults
docutils 0.14 py37_0 defaults
entrypoints 0.2.3 py37_2 defaults
et_xmlfile 1.0.1 py37_0 defaults
fastcache 1.0.2 py37hfa6e2cd_2 defaults
filelock 3.0.10 py37_0 defaults
flask 1.0.2 py37_1 defaults
flask-cors 3.0.7 py37_0 defaults
freetype 2.9.1 ha9979f8_1 defaults
future 0.17.1 py37_0 defaults
get_terminal_size 1.0.0 h38e98db_0 defaults
gevent 1.3.7 py37he774522_1 defaults
glob2 0.6 py37_1 defaults
greenlet 0.4.15 py37hfa6e2cd_0 defaults
h5py 2.8.0 py37h3bdd7fb_2 defaults
hdf5 1.10.2 hac2f561_1 defaults
heapdict 1.0.0 py37_2 defaults
html5lib 1.0.1 py37_0 defaults
icc_rt 2019.0.0 h0cc432a_1 defaults
icu 58.2 ha66f8fd_1 defaults
idna 2.8 py37_0 defaults
imageio 2.4.1 py37_0 defaults
imagesize 1.1.0 py37_0 defaults
importlib_metadata 0.6 py37_0 defaults
intel-openmp 2019.1 144 defaults
ipykernel 5.1.0 py37h39e3cac_0 defaults
ipython 7.2.0 py37h39e3cac_0 defaults
ipython_genutils 0.2.0 py37_0 defaults
ipywidgets 7.4.2 py37_0 defaults
isort 4.3.4 py37_0 defaults
itsdangerous 1.1.0 py37_0 defaults
jdcal 1.4 py37_0 defaults
jedi 0.13.2 py37_0 defaults
jinja2 2.10 py37_0 defaults
jpeg 9b hb83a4c4_2 defaults
jsonschema 2.6.0 py37_0 defaults
jupyter 1.0.0 py37_7 defaults
jupyter_client 5.2.4 py37_0 defaults
jupyter_console 6.0.0 py37_0 defaults
jupyter_core 4.4.0 py37_0 defaults
jupyterlab 0.35.3 py37_0 defaults
jupyterlab_server 0.2.0 py37_0 defaults
keyring 17.0.0 py37_0 defaults
kiwisolver 1.0.1 py37h6538335_0 defaults
krb5 1.16.1 hc04afaa_7 defaults
lazy-object-proxy 1.3.1 py37hfa6e2cd_2 defaults
libarchive 3.3.3 h0643e63_5 defaults
libcurl 7.63.0 h2a8f88b_1000 defaults
libiconv 1.15 h1df5818_7 defaults
libpng 1.6.35 h2a8f88b_0 defaults
libsodium 1.0.16 h9d3ae62_0 defaults
libssh2 1.8.0 h7a1dbc1_4 defaults
libtiff 4.0.9 h36446d0_2 defaults
libxml2 2.9.8 hadb2253_1 defaults
libxslt 1.1.32 hf6f1972_0 defaults
llvmlite 0.26.0 py37ha925a31_0 defaults
locket 0.2.0 py37_1 defaults
lxml 4.2.5 py37hef2cd61_0 defaults
lz4-c 1.8.1.2 h2fa13f4_0 defaults
lzo 2.10 h6df0209_2 defaults
m2w64-gcc-libgfortran 5.3.0 6 defaults
m2w64-gcc-libs 5.3.0 7 defaults
m2w64-gcc-libs-core 5.3.0 7 defaults
m2w64-gmp 6.1.0 2 defaults
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 defaults
markupsafe 1.1.0 py37he774522_0 defaults
matplotlib 3.0.2 py37hc8f65d3_0 defaults
mccabe 0.6.1 py37_1 defaults
menuinst 1.4.14 py37hfa6e2cd_0 defaults
mistune 0.8.4 py37he774522_0 defaults
mkl 2019.1 144 defaults
mkl-service 1.1.2 py37hb782905_5 defaults
mkl_fft 1.0.6 py37h6288b17_0 defaults
mkl_random 1.0.2 py37h343c172_0 defaults
more-itertools 4.3.0 py37_0 defaults
mpmath 1.1.0 py37_0 defaults
msgpack-python 0.5.6 py37he980bc4_1 defaults
msys2-conda-epoch 20160418 1 defaults
multipledispatch 0.6.0 py37_0 defaults
navigator-updater 0.2.1 py37_0 defaults
nbconvert 5.4.0 py37_1 defaults
nbformat 4.4.0 py37_0 defaults
networkx 2.2 py37_1 defaults
nltk 3.4 py37_1 defaults
nose 1.3.7 py37_2 defaults
notebook 5.7.4 py37_0 defaults
numba 0.41.0 py37hf9181ef_0 defaults
numexpr 2.6.8 py37hdce8814_0 defaults
numpy 1.15.4 py37h19fb1c0_0 defaults
numpy-base 1.15.4 py37hc3f5095_0 defaults
numpydoc 0.8.0 py37_0 defaults
odo 0.5.1 py37_0 defaults
olefile 0.46 py37_0 defaults
openpyxl 2.5.12 py37_0 defaults
openssl 1.1.1a he774522_0 defaults
packaging 18.0 py37_0 defaults
pandas 0.23.4 py37h830ac7b_0 defaults
pandoc 1.19.2.1 hb2460c7_1 defaults
pandocfilters 1.4.2 py37_1 defaults
parso 0.3.1 py37_0 defaults
partd 0.3.9 py37_0 defaults
path.py 11.5.0 py37_0 defaults
pathlib2 2.3.3 py37_0 defaults
patsy 0.5.1 py37_0 defaults
pep8 1.7.1 py37_0 defaults
pickleshare 0.7.5 py37_0 defaults
pillow 5.3.0 py37hdc69c19_0 defaults
pip 18.1 py37_0 defaults
pkginfo 1.4.2 py37_1 defaults
pluggy 0.8.0 py37_0 defaults
ply 3.11 py37_0 defaults
prometheus_client 0.5.0 py37_0 defaults
prompt_toolkit 2.0.7 py37_0 defaults
psutil 5.4.8 py37he774522_0 defaults
py 1.7.0 py37_0 defaults
pycodestyle 2.4.0 py37_0 defaults
pycosat 0.6.3 py37hfa6e2cd_0 defaults
pycparser 2.19 py37_0 defaults
pycrypto 2.6.1 py37hfa6e2cd_9 defaults
pycurl 7.43.0.2 py37h7a1dbc1_0 defaults
pyflakes 2.0.0 py37_0 defaults
pygments 2.3.1 py37_0 defaults
pylint 2.2.2 py37_0 defaults
pyodbc 4.0.25 py37ha925a31_0 defaults
pyopenssl 18.0.0 py37_0 defaults
pyparsing 2.3.0 py37_0 defaults
pyqt 5.9.2 py37h6538335_2 defaults
pysocks 1.6.8 py37_0 defaults
pytables 3.4.4 py37he6f6034_0 defaults
pytest 4.0.2 py37_0 defaults
pytest-arraydiff 0.3 py37h39e3cac_0 defaults
pytest-astropy 0.5.0 py37_0 defaults
pytest-doctestplus 0.2.0 py37_0 defaults
pytest-openfiles 0.3.1 py37_0 defaults
pytest-remotedata 0.3.1 py37_0 defaults
python 3.7.1 h8c8aaf0_6 defaults
python-dateutil 2.7.5 py37_0 defaults
python-libarchive-c 2.8 py37_6 defaults
pytz 2018.7 py37_0 defaults
pywavelets 1.0.1 py37h8c2d366_0 defaults
pywin32 223 py37hfa6e2cd_1 defaults
pywinpty 0.5.5 py37_1000 defaults
pyyaml 3.13 py37hfa6e2cd_0 defaults
pyzmq 17.1.2 py37hfa6e2cd_0 defaults
qt 5.9.7 vc14h73c81de_0 [vc14] defaults
qtawesome 0.5.3 py37_0 defaults
qtconsole 4.4.3 py37_0 defaults
qtpy 1.5.2 py37_0 defaults
requests 2.21.0 py37_0 defaults
rope 0.11.0 py37_0 defaults
ruamel_yaml 0.15.46 py37hfa6e2cd_0 defaults
scikit-image 0.14.1 py37ha925a31_0 defaults
scikit-learn 0.20.1 py37h343c172_0 defaults
scipy 1.1.0 py37h29ff71c_2 defaults
seaborn 0.9.0 py37_0 defaults
send2trash 1.5.0 py37_0 defaults
setuptools 40.6.3 py37_0 defaults
simplegeneric 0.8.1 py37_2 defaults
singledispatch 3.4.0.3 py37_0 defaults
sip 4.19.8 py37h6538335_0 defaults
six 1.12.0 py37_0 defaults
snappy 1.1.7 h777316e_3 defaults
snowballstemmer 1.2.1 py37_0 defaults
sortedcollections 1.0.1 py37_0 defaults
sortedcontainers 2.1.0 py37_0 defaults
sphinx 1.8.2 py37_0 defaults
sphinxcontrib 1.0 py37_1 defaults
sphinxcontrib-websupport 1.1.0 py37_1 defaults
spyder 3.3.2 py37_0 defaults
spyder-kernels 0.3.0 py37_0 defaults
sqlalchemy 1.2.15 py37he774522_0 defaults
sqlite 3.26.0 he774522_0 defaults
statsmodels 0.9.0 py37h452e1ab_0 defaults
sympy 1.3 py37_0 defaults
tblib 1.3.2 py37_0 defaults
terminado 0.8.1 py37_1 defaults
testpath 0.4.2 py37_0 defaults
tk 8.6.8 hfa6e2cd_0 defaults
toolz 0.9.0 py37_0 defaults
tornado 5.1.1 py37hfa6e2cd_0 defaults
tqdm 4.28.1 py37h28b3542_0 defaults
traitlets 4.3.2 py37_0 defaults
unicodecsv 0.14.1 py37_0 defaults
urllib3 1.24.1 py37_0 defaults
vc 14.1 h0510ff6_4 defaults
vs2015_runtime 14.15.26706 h3a45250_0 defaults
wcwidth 0.1.7 py37_0 defaults
webencodings 0.5.1 py37_1 defaults
werkzeug 0.14.1 py37_0 defaults
wheel 0.32.3 py37_0 defaults
widgetsnbextension 3.4.2 py37_0 defaults
win_inet_pton 1.0.1 py37_1 defaults
win_unicode_console 0.5 py37_0 defaults
wincertstore 0.2 py37_0 defaults
winpty 0.4.3 4 defaults
wrapt 1.10.11 py37hfa6e2cd_2 defaults
xlrd 1.2.0 py37_0 defaults
xlsxwriter 1.1.2 py37_0 defaults
xlwings 0.15.1 py37_0 defaults
xlwt 1.3.0 py37_0 defaults
xz 5.2.4 h2fa13f4_4 defaults
yaml 0.1.7 hc54c509_2 defaults
zeromq 4.2.5 he025d50_1 defaults
zict 0.1.3 py37_0 defaults
zlib 1.2.11 h62dcd97_3 defaults
zstd 1.3.7 h508b16e_0 defaults
The pillow docs:
Many of Pillow’s features require external libraries:
[...]
libwebp provides the WebP format.
Pillow has been tested with version 0.1.3,
which does not read transparent WebP files. Versions 0.3.0 and above
support transparency.
I tried to fix this with the following command. It did not fix the issue for me. But it could be useful for others
conda install libwebp
This installs version 1.0.1.
Which results in no webp support
python
> from PIL import features
> print (features.check_module('webp'))
False
Same thing for conda install -c conda-forge libwebp.
It seems to still be an open issue for anaconda. That means perhaps the answer to your problem is to use pip instead of conda.
I downloaded all 5 of these.
conda install -c conda-forge libwebp
conda install -c conda-forge/label/gcc7 libwebp
conda install -c conda-forge/label/broken libwebp
conda install -c conda-forge/label/cf201901 libwebp
conda install -c conda-forge/label/cf202003 libwebp
Didn't get the error after this.
I have finally come up with this workaround, which assumes that dwebp from the libwebp library is available on the system:
import os
import subprocess
from PIL import Image, UnidentifiedImageError
from io import BytesIO
class dwebpException(Exception):
pass
def dwebp(file: str):
webp = subprocess.run(
f"dwebp {file} -quiet -o -", shell=True, capture_output=True
)
if webp.returncode != 0:
raise dwebpException(webp.stderr.decode())
else:
return Image.open(BytesIO(webp.stdout))
filename = 'test.webp'
try:
img = Image.open(filename)
except UnidentifiedImageError:
if os.path.splitext(filename)[1].lower() == ".webp":
img = dwebp(filename)
else:
raise

Categories