no such option --with-allure when running nosetests allure plugin

I am trying to get the nose allure plugin to work with nosetests for a simple test. I can get it working on my local machine but after having installed all the necessary python packages on my...

pytest-xdist: LookupError: setuptools-scm was unable to detect version

When installing pytest-xdist, I'm getting this error: Collecting pytest-xdist>=1.15.0 Downloading...

How can I combine coverage results with tox?

For my mpu package I have execution-environment dependend code like if sys.version_info < (3, 0): pass # do something else: pass # do something else and a tox file [tox] envlist =...

How to pass multiple arguments in pytest using command line?

I want to pass inputs to my pytest file as a command line option. This question https://stackoverflow.com/a/42145604/8031479 was helpful but I don't know to add multiple parser adoptions. I have...

PyTest fixture not found while using with another fixture

I am new to python. I have declared one fixture configure_loggers() with scope as 'session'. Now, I want to use this fixture before another fixture setup_app(), which is also scoped as...

Activating conda environment during gitlab CI

My .gitlab-ci.yml file looks like this: anomalydetector: image: continuumio/miniconda:4.7.10 stage: build tags: - docker script: - conda env create -f environment.yml - conda...

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

No module named 'matplotlib.artist'

I faced with this error No module named 'matplotlib.artist' here is the complete error: --------------------------------------------------------------------------- ModuleNotFoundError ...

poetry change python version to 3.x

According to poetry's docs, the proper way to setup a new project is with poetry new poetry-demo, however this creates a project based on the now deprecated python2.7 by creating the following...

conda install psycopg2 errors

New mackbookpro running Catalina. Installed anaconda using homebrew. Tried to install psycopg2 using the command conda install -c anaconda psycopg2 but failed due to package conflicts. Here's some...

error H13 on heroku on an dash application

import requests from bs4 import BeautifulSoup import pandas as pd import dash import dash_core_components as dcc import dash_html_components as html import...

Msys2: Maintaining two python installations

I am using Msys2 portable under Win 10. I have 2 python 3.8 installations. The original question asked if that is so. I am now certain it is, so for the time being I want to deal with their...

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

I cannot use opencv2 and received ImportError: libgl.so.1 cannot open shared object file no such file or directory

env:ubuntu16.04 anaconda3 python3.7.8 cuda10.0 gcc5.5 command: conda activate myenv python import cv2 error: Traceback (most recent call last): File "", line 1, in File...

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

It seems that scikit-learn has not been built correctly

I have been using Jupyter Notebook for my machine learning project. Before scikit-learn was working fine but eventually I installed pip install imblearn and pip install -U imbalanced-learn after...

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

conda build ERROR: No matching distribution found for pytest-runner

I have my code here. I upload it regularly to both PIP and anaconda. However, since I added this line to the setup.py conda is not compiling. So PIP works great, as usual, I do python setup.py...

How can I wrap pytest.mark decorator in another decorator and maintain all properties?

Pytest has a decorator that allows you to pass metadata to tests. You can apply the decorator to a class, which will apply it to all tests within that class. You can also apply the decorator to...

pytest-dependency is not working in my test

There are 2 files, the code in the first one is: import pytest class TestXdist2(): @pytest.mark.dependency(name="aa") def test_t1(self): print("\ntest_1") assert True the...

Updating packages in conda

I have a problem with updating packages in conda. The list of my installed packages is: # # Name Version Build Channel _anaconda_depends 2020.07 ...

How to use patch decorator while using mark.parametrize decorator?

I have a test function that patches a few things. Once I reached more than 2 or 3 patches, the function started looking very bad def test_bla(): with patch(...): with patch(...): ...

Re-create postgresql database to do pytest

I am working on a proyect that works with these libraries (among others) postgresql 10.5 pandas 1.1.1 psycopg2 2.7.5 pytest ...

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

Using pytest-mock to mock objects and object methods

I'm trying to use pytest-mock for mocking. This library is essentially a plugin/wrapper for mock and patch. My problem is defined as: I have an application (mymodule.py) that uses SQL Alchemy....

Sudden Tensorflow / Keras Google Colab dependency problems `AttributeError: module 'tensorflow._api.v1.compat.v2' has no attribute '__internal__'`

I have running a machine learning model (Matterport's Mask R-CNN) in google colab for a couple of weeks. All of a sudden today I am unable to run any of my notebooks due to I think some kind of...

Using SQLAlchemy 1.4 classical / imperative mapping style?

I am using the clean architecture & TDD development method in my Python project. Updating from SQLAlchemy 1.3 to SQLAlchemy 1.4 broke the ability to test against an in-memory Postgres DB, and I...

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

Bokeh/panel won't render in-line with Jupyter Lab

I'm trying to visualize Bokeh plots and panels with a Bokeh backend in a notebook in JupyterLab. Things were running fine until I updated. Current packages and versions are below I have tried the...