Python scripts on DD-WRT embedded router

I've written two Python (2.x) scripts to perform the following: Custom Proxy server (imports optparse, ConfigParser, TLDextract, SocketServer...) Web admin for proxy (imports flask, ConfigParser,...

How can I get the IP address from NIC in Python?

When an error occurs in a Python script on Unix , an email is sent. I have been asked to add {Testing Environment} to the subject line of the email if the IP address is 192.168.100.37 which is the...

Django issue with argon2 hasher in live production

So I have just setup my Digital Ocean droplet (server) and have been working to get this site to work, however I have been coming across error after error. I finally got the site to load the login...

python3 requirements.txt file shows unwanted packages

I created a virtual environment using : python3 -m venv . I then used the command pip freeze requirements.txt to get the list of packages. Below is the content of the file...

Get most recent global ipv6 address of interface

I'm trying to get the current public ipv6 address of an interface in python. By searching, I discovered the netifaces package, which can give me a list of all ipv6 addresses of the device. This...

During deploying Django blog on heroku showes me errors

When I deploy app in heroku show me this error remote: ERROR: Could not find a version that satisfies the requirement apturl==0.5.2 (from -r...

no django file in the site packages

**Traceback (most recent call last): File "manage.py", line 15, in <module> execute_from_command_line(sys.argv) File...

While instaling Buildozer for kivy i had an error saing "zipp is missing"

It's been several times that I try to install Buildozer to convert my kivy application to APK. I use a version of Linux from the Window Store. After downloading all the dependencies, I launch the...

Could not find a version that satysfies the requirement pytz

i have Linux Ubuntu 18.04. I need to install Django offline on this machine. I had some problems with pip and python, but i guess i solved it. So, i download asgiref, sqlparse and pytz for...

Installation of hpbandster and ConfigSpace failed

I created a virtual environment using virtualenv venv -p python3 and source venv/bin/activate under Ubuntu 18.04. Then I tried to install hpbandster which installes ConfigSpace as requirement. The...

ImportError: The 'pyparsing' package is required

ImportError: The 'pyparsing' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution. I can't seem to find the...

ConnectionRefusedError when trying to host python socket server on raspberry pi

I'm trying to make a basic python networking program. All I'm trying to do is send strings of text back and forth between the server and the client. I'm trying to host the server on my Raspberry...

Installing socketio module on python3 seems to be corrupting pip

While installing the socketio package for python using pip3 install socketio, I got the following results: ERROR: launchpadlib 1.10.13 requires testresources, which is not installed. WARNING: The...

AttributeError for netifaces

I am using a fully updated installation of Manjaro (as of 15/08/2020). Using python 3.8.3 for this project. I would like to use the python module netifaces to determine the IP address of one of my...

Python: TypeError: required field "type_ignores" missing from Module in Jupyter notebook

I have been having issues with my jupyter notebook for a few days. I didn't fix them at the time but have decided to now. Earlier whenever I executed anything in the jupyter notebook, It showed a...

How to fix a problem that "apt-get install" doesn't work because of python issue

I'm using Ubuntu 16.04.I'd like to install a ROS related package with "apt-get install", but it doesn't work. Terminal said like following. $ sudo apt-get install ros-kinetic-libuvc Reading...

gcc cant find Python.h

As the title says, Im trying to install netifaces library in Fedora Distribution, using pip3 install netifaces and I keep getting the following error. 1 | #include <Python.h> | ...

Python3 (pip): find which package provides a particular module

Without getting confused, there are tons of questions about installing packages, how to import the resulting modules, and listing what packages are available. But there doesn't seem to be the...

Python DHCP enabled disabled check

I'm using Python 3.8.5 currently on windows, but the script should run also on linux and on macOS. I'm creating UDP server and a client and have establish communication between them via...

Uploading a PDF file to a CKAN Dataset as a resource fails with "{file} is not json serializable"

My simple python script to create a dataset and to that dataset add a single PDF file as a resource is failing with "{file} is not json serializable". # coding=utf-8 # import base64 import...

How to run JupyterHub/JupyterLab entirely on a prefix url behind traefik

I have access to a single subdomain, subdomain.domain.com, on which I run several services behind traefik. In order to route the requests to the right server, I am setting the traefik router rules...

Ansible ansible.builtin.url module "Name does not resolve" error

I am trying to use the ansible.builtin.url module to fetch the contents of a remote file on my remote server. I am using one of the examples in the official documentation page of the module, but...

Why is 'pip3 install netifaces' failing on Debian 10 Buster?

I setup a new Debian 10 (Buster) instance on AWS EC2, and was able to install a pip3 package that depended on netifaces, but when I came back to it the next day the package is breaking reporting...

Why is my pip install not installing netifaces

I am working with python 3.8.6 but for some reason it cant build a wheel for netifaces error: C:\Users\cuerv>pip install --upgrade netifaces Collecting netifaces Using cached...

netplan not working after change default python

in ubuntu 18.04, when i change default python from python 3.6 to other version by this command: sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1 sudo...

Segmentation fault (core dumped) on training the deep neural network /torch/cuda/__init__.py", line 172 in _lazy_init

python3 -q -X faulthandler test.py --model.backbone=resnet18 2021-02-07 20:14:21.198583: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library...

using PySimpleGUI import script without running it

I'm building a custom network testing application. I have different aspects of the test in their respected scripts. However every time I run the script the import of the script causes the script...

How to fix ModuleNotFoundError: No module named '_mysql'?

Environment: Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-45-generic x86_64) Server version: Apache/2.4.29 (Ubuntu) Python 3.7.5 Flask 1.1.2 Werkzeug 1.0.1 We deployed a flask application on our VPS...

Error when running executable generated by pyinstaller [pyvisa-py]

I'm trying to build an executable from a simple python script using pyvisa-py but I'm running into error after I run the executable generated by pyinstaller. Here what my small python code looks...

psycopg2.errors.ActiveSqlTransaction: CREATE TABLESPACE cannot run inside a transaction block

I am quite new to Python, we have an app container & a DB container. App container collects values like DB_HOST,PORT etc from CLI & try to create Tablespace on containerized Postgres DB running on...