zc.lockfile.LockError in ZODB

I am trying to use ZODB 3.10.2 on my web server which is running Debian and Python 2.7.1. It seems like every time I try to access the same database from 2 different processes, I get a mysterious...

Django AttributeError: 'str' object has no attribute '_default_manager'

The following error seems to occur randomly on my live server (i.e. through apache mod_wsgi) but never in development (i.e. localhost python manage.py runserver). Note this happens infrequently...

How to color code a hostname from bash or python?

I am looking for a simple solution that would give me a RGB color for each hostname. I plan to use this for setting the tab-color in iTerm2, so I can easily spot the correct host based on the the...

python-dev installation error: ImportError: No module named apt_pkg

I am Debian user, and I want to install python-dev, but when I run the code in the shell as a root: # aptitude install python-dev I get the following error: Traceback (most recent call last): ...

How can I specify the version of Python that Perl's Inline::Python module is using?

I am running Debian squeeze and perl v5.10.1 and I have two versions of python installed: $ pyversions -i python2.5 python2.6 Python::Inline uses python2.5 obvoiusly: $ perl use...

ImportError: No module named lop.models

I know there are a lot of questions related to this, but those answers don't seem to work in my situation. I'm new to Django (I've done the tutorial), but I'm fixing someone else's code who I can...

python can not use .pgpass while connecting to PostgreSQL

I can not use .pgpass file while connecting to postgresql db using python script((( My python script to connect is without password: conn = psycopg2.connect("dbname='postgres' user='postgres'...

How to lookup debian package info with Python

I'd like to look up the latest available version of a debian package programmatically using python. I've looked around, but can't find the right keywords to cut through all of the noise "python"...

Python Requests - How to use system ca-certificates (debian/ubuntu)?

I've installed a self-signed root ca cert into debian's /usr/share/ca-certificates/local and installed them with sudo dpkg-reconfigure ca-certificates. At this point true | gnutls-cli mysite.local...

Django: ImportError: No module named 'scipy.sparse.base'

For my project I am using Scipy, but as it seems, my project has trouble in importing stuff from it. Unhandled exception in thread started by <function check_errors.<locals>.wrapper at...

Python 3 can't import PyGObject

I'm trying to use PyGObject with Python 3, (either on Debian or Linux Mint) so I can use Gtk3+ and Glade for creating GUIs. The problem is this: In Python 3: import gi says module 'gi' not...

pip3 install not working - No module named 'pip._vendor.pkg_resources'

When trying to install a package for Python 3 (in Ubuntu), using pip3 install packageName (or sudo pip3 install packageName), I get the following error message: Traceback (most recent call last): ...

/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found required by TensorFlow

I'm trying to deploy a flask app on a debian server using Machine Learning libs, i managed that so far with most ML libraries but i got this error thanks to TensorFlow which i researched a lot...

Bitbucket Pipelines apt-get stopped working

My Bitbucket Pipelines is configured for some time but today my builds started to fail on apt-get command: I use java 8 docker image: image: java:8 And I need to install python # Install...

ImportError: No module named 'tensorrt'

I installed TensorRT on my VM using the Debian Installation. If I run "dpkg -l | grep TensorRT" I get the expected result: ii graphsurgeon-tf ...

error in Crypto.Cipher.IDEA module in python

Hello there, i am writing a code for auto discovery of IP within the network and then data transfer using the socket programming in python. I have read the RSA and want to implement in the...

how to succesfully compile python 3.x

Upon attempting to compile python 3.7 I hit Could not import runpy module: [email protected]:$ wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz .... [email protected]:~/Python-3.7.3$...

ansible returns with "Failed to import the required Python library (Docker SDK for Python: docker (Python >= 2.7) or docker-py (Python 2.6))

I am running myserver in ubuntu: + sudo cat /etc/os-release NAME="Ubuntu" VERSION="16.04.6 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.6...

Failed to fetch packages from jonathonf repository while running Dockerfile from AzureDevOps

I have a Dockerfile which is getting the packages from a source called jonathonf but it's failing to download some packages from this repository. Could any one please help me with the solution? I...

08S01 FreeTDS SQL Server Unable to connect: Adaptive Server is unavailable or does not exist

For some reason I'm not able to establish a connection to MSSQL Server with FreeTDS in a python:3.7-slim-buster (debian) docker image. Code Also available on github .. Dockerfile FROM...

Getting SIGKILL when running study optimization with Optuna on PyCharm

I am trying to run a study, using the optimize function with the default sampler and Median pruner. every run crashes, sometimes after 1 succefull trial sometimes without completing any. The crash...

error when creating a pipenv virtual environment with python 3.7

My OS is ubuntu 20.04 and my default python is 3.8.2. I'm trying to create a virtual environment with pipenv and python 3.7. The following error occurs when I run pipenv install --python...

Activation (activate_this.py) of python venv wont work or throw error

Soo, I created a small Flask Website which I wanna deploy on my Debian 10 server with Apache 2.4 At first I followed a tutorial and created the apache2 conf file and the .wsgi file. Since that...

PyVISA not listing USB instrument on Linux

I am trying to communicate with a LeCroy WaveRunner 640Zi oscilloscope from a Raspberry Pi, they are connected with a USB cable. I have already done this under Windows, but now I am not able to...

Django/Python "django.core.exceptions.ImproperlyConfigured: Cannot import 'contact'. Check that '...apps.contact.apps.ContactConfig.name' is correct"

Hopefully you all can give me a hand with this... my work flow: |.vscode: |capstone_project_website: | -_pycache_: | -apps: | -_pycache_ | -accounts: | -contact: # app...

Could not find a version that satisfies the requirement mediapipe

Environment: Debian, Debian GNU/Linux, 10 (buster), amd64 built on 20210609, supports Shielded VM features. Platform: Google cloud compute engine Python version: Python 3.7.3 pip3 version: pip...

Sagemaker deploy model with inference code and requirements

I trained a TensorFlow model and now I would like to deploy it. The data needs to be processed thus I have to specify one inference.py script and one requirements.txt file. When I deploy the...

How can one fully replace distutils, which is deprecated in 3.10?

According to PEP 632, distutils will be formally marked as deprecated, and in Python 3.12, it will be removed. My product is soon going to support Python 3.10 and I don't want to put up with...

pycharm error happening at random time: Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

I am working with pycharm community on a tensorflow model with keras backend, sometimes this error appears in a random time, specially after I call pyplot and close the window: Exception ignored...

Decrypt aes-128-ccm on NodeJS without auth tag

I`m porting some crypto code from Python to NodeJS. I have Python example that works perfectly: from Cryptodome.Cipher import AES key = bytes.fromhex("befe6acee59a8d3d3c97eeea8cdb9e99"); nonce =...