Wildcard targets in a Makefile

How can I compact the folllowing Makefile targets? $(GRAPHDIR)/Complex.png: $(GRAPHDIR)/Complex.dot dot $(GRAPHDIR)/Complex.dot -Tpng -o $(GRAPHDIR)/Complex.png $(GRAPHDIR)/Simple.png:...

flake8/pylint fails in Tox testing environment, raises InvocationError

I've been learning about how to do testing in tox for my python project. I have (what should be) a fairly standard tox initialization file that looks like the...

vim-flake8 started showing D and H errors

I have a problem with pyflake8 in vim, he started displaying some errors that he didn't show at all, like this: models.py|1 col 1| D100 Missing docstring in public module models.py|2 col 1| H306 ...

Flask python app crashes on heroku

I tried pushing my code directly to Heroku for hosting but I got so many errors. Now, what I did was host the code on Github, and then link the git repo with Heroku. Now, the Heroku app was...

Heroku fails to install pywin32 library

I'm trying to push my Python application to Heroku but it looks like pywin32 isn't being installed: Counting objects: 519, done. Delta compression using up to 4 threads. Compressing objects: 100%...

Avoid multiple IF to ensure Mccabe complexity

I want to ask you your different points of view for the following scenario: imagine that we have several lists and something should be executed for those that are not empty: if l1 or l2 or l3 or...

Cuda Runtime Error cudaErrorNoDevice: no CUDA-capable device is detected

I am using Chainer, Cupy for CUDA 8.0 . I am trying to train machine learning model using python3.5 script, but I got this error: cupy.cuda.runtime.CUDARuntimeError: cudaErrorNoDevice: no...

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...

Django, Docker, Python - Unable to install Pillow on python-alpine

I have a dockerized django app that I want to put in production. But ever since I added an Imagefield Pillow is required and I struggle to install Pillow in the Docker container. As far as I...

"AssertionError: Torch not compiled with CUDA enabled" in spite upgrading to CUDA version

I figured out this is a popular question, but still I couldn't find a solution for that. I'm trying to run a simple repo Here which uses PyTorch. Although I just upgraded my Pytorch to the latest...

HDF5 library version error - HDF5 ver 1.10.4

I'm trying to import some packages with spyder (OS x64), Anaconda and pyton 3.x The error is pretty famous in the internet. The solution proposed is to match the version of the library 1.10.5 with...

ERROR: You must give at least one requirement to install -- when running: pip install --upgrade --no-binary hdbscan

I am trying to install hdbscan in my PC which runs Windows 10 and has installed Python 3.6. My first attempt failed: (base) C:\WINDOWS\system32>pip install hdbscan --user Collecting hdbscan ...

What is the intended way do avoid flake8-bugbear's B006, i.e. mutable-default warning, in a wrapper?

I have a function wrapper like this def fun(arg, kwarg=None): # in my code the function is imported from a package return None def mywrap(myarg, funkwargs={"kwarg": "default"}): return...

Python application cant deploy to Heroku

I find this error whiledeploying it to heroku. cp: cannot create regular file '/app/tmp/cache/.heroku/requirements.txt': No such file or directory Project's procfile: web: python...

(Beginner) Error when loading 'python manage.py runserver' on Visual Studio Code part of Django project

I'm fairly new to this and am currently learning Django on Visual Studio Code using a Mac. I'm getting a few errors and was wondering if someone could help. File structure and activating...

DjangoCMS TypeError: from_db_value() missing 1 required positional argument: 'context' after upgrade to 3.7.2 w/ Django 3.0.1

I had a working DjangoCMS application running DjangoCMS 3.7.1 and Django 2.2, however after I just bumped the DjangoCMS version to 3.7.2 and with it, Django to 3.0.1, I am now getting a render...

Programmatically determine pip 'user install' location Scripts directory

As explained in pip's documentation a user can install packages in his personal account using pip install --user <pkg>. How can I programmatically determine the user install location for scripts...

mognoengine and bson package not work together

I have one project which is depend on mongoengine and I am using one library which was using bson library. It structure like below. bsNotify/ ├── setup.cfg ├── setup.py └── src ...

AttributeError: module 'tensorflow' has no attribute 'compat' when loading tf.compat.v1.train.SessionRunHook

I can see that this question has been asked before here tensorflow-has-no-attribute-compat but the answer given was to Microsoft Visual C++ 2015-2019 Redistributable (x64) It did not work for the...

virtualenv: pre-installed with packages on creating virtual environment

I created a virtual environment using command virtualenv env on my terminal. On using pip freeze > requirements.txt after activating the virtual environment, I was a bunch of packages...

Why does `conda list cudnn` have no output after `conda install pytorch torchvision cudatoolkit=10.2 -c pytorch` installation

*Please feel free to vote "Reopen" at the bottom of this question. The reason is that I have marked this as a duplicate although the answers there are not clear enough for this question.* As soon...

Python, Error while installing matplotlib

OS: Windows 10 Python ver: 3.9.0 Error code: ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. I tried: python -m pip install -U...

Python Django Web application not able to deploy on Heroku using Waitress server

I have tried to deployed my django application several times on Heroku and then i finally succeeded . It is working fine on localhost ,however, when i use the link provided by heroku, the page...

Stable Baselines: DQN Not performing properly?

I have problem in using DQN for a diagonal line and sin wave as price fluctuation. When the price goes up, there will be a reward and it is colored as green in the chart. When the price goes down...

Running through an environmental error during deploying django app on heroku

I have created virtual env with anaconda prompt and created my django project in that env. I have created repository on github and push my code there and also create app on heroku but when i am...

Trouble installing turbodbc

I am attempting to install turbodbc on my Ubuntu 20.10 machine. My specs are as follows: pip 20.2.4, Python 3.8.5 , gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0 I have attempted the solutions provided in...

This version of ChromeDriver only supports Chrome version 87 Current browser version is 90.0.4430.93

ChromeDriver is giving an error about its version being too low: This version of ChromeDriver only supports Chrome version 87 Current browser version is 90.0.4430.93. I've updated pip's packages...

NameError: name '_mysql' is not defined -- On airflow start in MacOSX

There are numbers of articles on the titled question but none of them worked for me. The detailed error is as follows: Traceback (most recent call last): File...

How to correctly install PyICU on Heroku?

I am trying to deploy my Python app on Heroku, but have been unsuccessful. It seems that a problem is occurring with the PyICU package, which I'm unsure how to correct. I've confirmed that this is...

Python3 Import Error: undefined symbol: aes_hw_encrypt

I am trying to use DialogFlow to make a small talk chatbot on Raspberry Pi 4, and I am getting this error: ImportError:...