Questions tagged [python]

Python is an interpreted, general, high-level programming language. Programming questions are off topic. Questions about the use of Python should be asked at Stack Overflow (https://www.stackoverflow.com) instead.

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

how to specify a full date in rrdtool.xport [migrated]

I am writing 3 values every 5 seconds into a RRD that stores 1 year of data. RRD is created by rrdtool.create(rrd_filename, '--step', '5', # one sample every 5 sec ...
user avatar
0 votes
0 answers
25 views

Can't run python command

I wanted to run python on my mac, but I get zsh: command not found: python Python3 is installed. I googled it. People usually solve this issue by running this command sudo ln -s /usr/bin/python3 /usr/...
user avatar
0 votes
0 answers
31 views

Pip3 not working on Ubuntu Jammy

I'm trying to install a pip3 package. When it run "pip3 install mitype", I get the following error in the terminal: $ pip3 install mitype Traceback (most recent call last): File "/...
user avatar
0 votes
0 answers
19 views

How do I create bot farms using Python? [closed]

I'm interested in learning how bots/bot farms are created using Python, specifically Instagram and TikTok bots. It's strictly for the purposes of knowing how it's done, and not for spamming/monetizing ...
user avatar
0 votes
0 answers
21 views

PermissionError 'Access is denied.' when writing firmware to ESP32 via esptool.py

I'm having problems with a particular computer when trying to flash firmware to an ESP32 built under the Arduino framework from PlatformIO, which uses esptool.py to do that write operation. This is ...
user avatar
  • 21
0 votes
0 answers
13 views

Weird Python log error while trying to reinstall Python on Windows 11 [closed]

I installed Python on Windows 11 normally after getting the setup from python.org but, by mistake, I deleted the partition Python was installed in (it was E drive). So now, when I rerun the setup, it ...
user avatar
  • 1
1 vote
0 answers
48 views

why don't multiple cameras work on windows

I'm trying to connect two cameras both with two lenses that are connected to two separate USB ports. the problem is that only one cam works at the time. Is that even possible? my goal is to connect ...
user avatar
0 votes
0 answers
43 views

Is there a way I can make my discord bot run 24/7 on Pycharm for free or run ffmpeg on Replit?

I recently made a discord bot and want to know if there is a way to run a Pycharm project 24/7 for free. Previously I used Replit and UpTimerobot but added music features which don't work on Replit (...
user avatar
  • 1
0 votes
0 answers
5 views

Python: Converting non conventional csv into a compatible csv [migrated]

I got this "kind" if csv which is not an CSV :). Let me explain it. The output has column_name,value. e.g. created_at,2022-02-10T16:53:49+01:00 updated_at,2022-04-28T00:35:30+02:00 timezone,...
user avatar
0 votes
0 answers
49 views

Why does this python script run normally when started manually but give an error when run on boot as a service on Ubuntu 20.04?

I made a bot for cryptocurrency trading which works normally when I start it manually, but when you automate the operation of the Ubuntu service it starts with the following error: end at Sun 2022-04-...
user avatar
0 votes
1 answer
55 views

Pip isn't working because some random process is running

So basically... I installed the python-certifi-win32 to solve another problem I was having, but then it was giving me a separate error. So I tried to uninstall it with pip, but I got this error: ...
user avatar
0 votes
2 answers
36 views

Web scraping with python + selenium + multiprocessing in a docker container becomes slower over time

I have built a web crawling solution with python, selenium and multiprocessing which is deployed in a docker container in an EC2 instance (m4.2xlarge type). Whenever I run it with a large input, it ...
user avatar
0 votes
0 answers
18 views

Open a custom file in Python [migrated]

could I know how I could open a custom file that has the extension of .x, in Python? I know this: open(). However, I want it to do it the way the Document Editors open the .docx files. I mean that ...
user avatar
  • 1
0 votes
0 answers
8 views

Multipage tiff to a combined hocr output [migrated]

Iam looking for the option to process multipage tiff image to single HOCR file. A combined output of multipage tiff. At present Iam getting HOCR as different hocr pages. from PIL import Image ...
user avatar
1 vote
1 answer
57 views

How to properly make a SSH-call LOCALLY async/background/independent/...?

Use-case I have a backup software able to read data to be backed up from named pipes. I want to use that feature to backup database dumps of e.g. MySQL and PostgreSQL which are hosted within multiple ...
user avatar
-3 votes
1 answer
38 views

cannot install python numpy on kali

I am trying to install python-numpy (for Python 2.7) on my linux VM. The problem I am facing is that when I run sudo apt-get install python-numpy I get this Reading package lists... Done Building ...
user avatar
-2 votes
0 answers
76 views

My hdd making power on spin up noise after python install

A few days back my hdd was making power on and spin noise after python 37 install like it makes on power it was making this noise repeatedly on and showing a blank window named pbn i restarted my pc ...
user avatar
  • 1
0 votes
0 answers
40 views

Jupyter Kernel Dies when Attempting Plot with large set of data

I have a numpy array res. res[0] contains x values and res[1] contains y values. There is in total 1000000 points. I am trying to plot it using matplotlib; however, after running the plot, it tells me ...
user avatar
0 votes
0 answers
24 views

RE: host pip server on cloud

we are moving from on premises to a cloud. we currently host some of our custom build python packages on on premises pip server. but as we move to cloud we would like to have these custom pip packages ...
user avatar
0 votes
1 answer
101 views

Executing a python script via SSH on remote and scp on localhost

I am new to this and need some advice on resolving my problem. I have a python script on a remote server. I want to execute that script from my local system and then transfer the result file generated ...
user avatar
  • 101
-1 votes
4 answers
100 views

How to delete all files (or the entire content of all files) with less than 250 words with Regex?

Is it possible to delete all files (or the entire content of all files) with less than 250 words? I try this regex, but needs to be improved a little bit. Can anyone help me? Find: (?s)(.*?(\w+\s?){1,...
user avatar
0 votes
0 answers
27 views

Windows 10 becomes slow after trying to open Pycharm or VSCode with Anaconda and does not recover unless restarted

I have been having trouble debugging this for a long time and do not know where to write the question. I am using Windows 10 and have the latest version of Anaconda, Pycharm and an older version of ...
user avatar
  • 101
0 votes
0 answers
23 views

I have named my user folder with an apostrophe and it is causing me issues when trying to run a python program

I have named my user folder with an apostrophe in the name and it is causing me issues when trying to run a python program. I am getting the error "No such file or directory" Is there a way ...
user avatar
  • 1
0 votes
0 answers
11 views

Issues while automating browser using selenium for displaying differences in two text files

I have two text files and I want to see the differences on the website: https://text-compare.com/ Now this is my python code. //chk.py path = r"C:\Users\1kusp\OneDrive\Documents\CP\testing" ...
user avatar
  • 1
0 votes
0 answers
44 views

How to stream .ts audio and video chunk to a rtmp server?

I am using youtube_stream_capture, to download an ongoing live stream from youtube. youtube_stream_capture downloads chunks something like this IMAGE I was wondering if there is any way to stream ...
user avatar
0 votes
0 answers
19 views

Conda suddenly doesn't work, it gives "unsupported 16 bit application" error when I try to run it. How do I fix that?

I installed a seperate python version to run on VSCode for seperate project. Conda used to still work, but now suddenly conda doesn't run. What is not running is the python.exe placed on the Anaconda ...
user avatar
  • 1,073
0 votes
0 answers
30 views

Execute Python script in Windows Task Scheduler

I have a Python script which is running in Windows Task Scheduler. The script contains some print commands so that when it run from PyCharm, I can see the print in the console. However, I can't see ...
user avatar
0 votes
0 answers
26 views

RHEL 8 and import MySQLdb

I have a .py-file saying import MySQLdb. pip3 install MySQL-python says ModuleNotFoundError: No module named 'ConfigParser' even when pip3 install ConfigParser says "Requirement already satisfied:...
user avatar
0 votes
0 answers
17 views

How to format Python in Jupyter Notebook on macOS?

Sometimes I want to format Python in Jupyter Notebook in macOS, but it's very difficult because I need to format it myself. Do they have shortcuts? I would appreciate any help.
user avatar
  • 133
0 votes
1 answer
43 views

How to put colors in terminal?

I would like to use rgb(a) hex codes to display colors on the terminal. I intend to make some kind of program that can render colors inside brackets, like: [#FFFFFF]this is white text
user avatar
0 votes
0 answers
24 views

Remove/Update Python3-dev

I am trying to install a wireless driver on Kali; however, when I try to update certain files I get the following error: └─$ sudo apt-get purge --auto-remove python3.9-dev ...
user avatar
0 votes
0 answers
40 views

How do I edit the rc.local file on my Raspberry using another PC?

I edited my rc.local file to start 2 python scripts and a flutter app on boot and I set it up to boot in console mode. But now I can't close the flutter app. I already tried pressing CTRL + Z or CTRL +...
user avatar
1 vote
1 answer
46 views

Windows 11 command prompt printing characters instead of coloured text

When I run my Python program from the Visual Studio Code integrated terminal everything goes fine, and I have my colors as they are supposed to be, like in this screenshot: But if I run exactly the ...
user avatar
  • 113
1 vote
2 answers
937 views

Pip install doesn't work on m1 Mac

My pip isn't working. I tried installing it with ensurepip as well as with the official get-pip.py script. With the official installation script I get a warning: WARNING: The scripts pip, pip3 and ...
user avatar
0 votes
0 answers
26 views

How do I fix the IDLE window colour on MacOS?

For some reason, my IDLE window is black with (presumably) black text - I can't see anything. Frustratingly, this problem extends to the Settings, so I can't try to sort it out there. Curiously, ...
user avatar
  • 101
0 votes
0 answers
11 views

notebook difference web utility issue

I have installed the notebook difference utility and tried to use it like this... # nbdiff-web Untitled1.ipynb datagy_svm.ipynb [I nbdimeserver:422] Listening on 127.0.0.1, port 44477 [W webutil:18] ...
user avatar
  • 2,593
2 votes
0 answers
422 views

Cannot install packages with pip - error with inconsistent version but version matches metadata

I recently have an issue trying to install anything with pip. It keeps trying older versions complaining that each one has a version mismatch, when it matches perfectly fine. This following log is ...
user avatar
0 votes
0 answers
22 views

FFmpeg: Trying to convert .smi to .srt but getting a decoding error

I'm using FFmpeg inside a Python script: for filename in os.listdir(): if (filename.endswith(".smi")): #or .avi, .mpeg, whatever. name_only = re.sub(r'(.*).smi', r'\1', filename) ...
user avatar
0 votes
1 answer
60 views

Kill specific started process in Windows

How can I kill a process of which I don't know the PID or imagename? So in my Powershell or CMD terminal I can start a process using this command I've botched togheter. cmd.exe /c start /min python .\...
user avatar
0 votes
0 answers
21 views

How to start bash script which is activating screen with the python program via cron?

I'm trying to start this bash script via cron which activate python virtual enviroment and then put python program in the screen to work while the server is running since it's a bot This is a bash ...
user avatar
  • 1
0 votes
0 answers
26 views

How to connect to Neo4j database hosted on Virtual Machine

I have a virtual machine that i can access via SSH with ssh username@ipv4. I installed neo4j there and can access localhost on the machine, but I wasn't able to connect it to my machine through SSH ...
user avatar
0 votes
0 answers
57 views

Pylance consuming too much memory, how to enable Jedi to get around this issue?

My Pylance when I leave my VSCode running a Python file, every few minutes the number of ram memory used increases, reaching 100% usage on the pc. I've seen some people indicating activating Jedi to ...
user avatar
0 votes
0 answers
184 views

NodeJS can't find python: gyp ERR! find Python

I'm trying to run a script but nodejs can't find python for some reason. I have tried reinstalling python, reinstalling nodejs, reinstalling my OS, running (and rebooting afterwards): export PYTHON=&...
user avatar
  • 1
0 votes
1 answer
50 views

Disabling bracketed paste mode in Anaconda-Python REPL on Mac

There is one thing I can no longer do on my Mac: Type a bunch of Python in my text editor, launch the Python environment from the command line, and paste a few quick commands into the interpreter. ...
user avatar
  • 113
0 votes
0 answers
118 views

Tensorflow GPU not working on Ubuntu 20.04 (error message)

So, I tried to go through several tutorials (the latest being this one) to set up GPU support for TensorFlow on Ubuntu 20.04 and I always get the following message: joris@joris-N751JK:~$ python3.9 ...
user avatar
0 votes
2 answers
38 views

symlink points to correct binary, but still another is executed?

I'm a bit confused here on how this is possible. I installed a new version of Python, removed the old symlinks and replaced them with the new ones. For some reason though, the old binary still gets ...
user avatar
  • 105
0 votes
1 answer
134 views

Getting output only from 1st page TIFF to hocr extract

[Sample Image] I seek your guidance in the code given below. Iam running this code to extract text from multipage TIFF to hocr format. Iam getting an output from the 1st page of TIFF but rest of the ...
user avatar
0 votes
0 answers
14 views

Messed up trying to install backports, ending killing dnf and yum

so everything is in the title, im working on fedora28 os, on a django project, and for no reason i couldnt start another one with django-admin startproject. 1 - i got a message telling me backports ...
user avatar
1 vote
1 answer
148 views

Call a python package from powershell script

I have a conda environment activated in the powershell command prompt. I have a python package that has been installed with pip: pip install -e . which installs my package with an entry point ...
user avatar
  • 21
1 vote
1 answer
51 views

How to run scrapy splash on a Virtual Machine

How do I run scrapy splash on a virtual machine with linux? Essentially, I have a lua script that requires me to send keys onto a site to log in and then scrape it. I have installed docker however I ...
user avatar

1
2 3 4 5
60