4,097 questions
1 vote
2 answers
149 views
How to make a copy of stdout that does not close?
I would want to copy sys.stdout such that it will not be closed. There is some generic code that does: def dosomething(fd: IO[bytes], input): with fd as f: for buf in input: f.write(...
0 votes
0 answers
31 views
Why can't I implement ENERGYM?
I am trying to implement the ENERGYM library in Python as per the following paper: https://www.mdpi.com/2076-3417/11/8/3518 and https://bsl546.github.io/energym-pages/sources/install_min.html After ...
-3 votes
2 answers
81 views
How to sum values across dicts?
I'm using python 3.7. I have a list of dicts that and I want to create a concatenated dict where that concatenated dicts sums over values (grouped by keys) per key in the initial list of dicts. So e.g....
1 vote
0 answers
108 views
Failed Building Wheel for Scikit-fmm
noob here. I am currently trying to run this project: https://github.com/katsuma-inoue/soft_skeleton_solver I was able to install all the listed packages, except scikit-fmm which keeps failing, with ...
0 votes
2 answers
134 views
Selenium - AttributeError: 'Service' object has no attribute 'get'
With this code below: import requests, os from selenium import webdriver from selenium.webdriver.chrome.service import Service as ChromeService from webdriver_manager.chrome import ChromeDriverManager ...
1 vote
3 answers
3k views
I cannot install bpy using pip
I'm trying to install bpy using pip install bpy. According to their website: https://pypi.org/project/bpy/, version 4.3.0 is the latest (and was released in November 2024). Is there any way of using ...
0 votes
1 answer
57 views
Rect() TypeError while converting from Python 2 to Python 3
I'm getting the weirdest error while converting an application from Python 2 to Python 3. Briefly this application uses wxPython to create an interface where the user can draw different objects on a ...
-1 votes
1 answer
81 views
Dynamic type instantiation of Local class in Python 3.7
I'm trying to do some custom serialization/deserialization and must be able to handle custom data-classes, even local ones within functions. I found a question about this with a proper solution, but ...
1 vote
0 answers
47 views
Differences between pyenv and repo install for Python versions
If I install Python via pyenv, will there be conflicts if I previosuly used sudo apt-get install python3? I have used pyenv to get a specific version (3.7.5) to revive an old project running in a ...
0 votes
0 answers
86 views
Python input() Function Not Accepting Keyboard Input or Returning on Enter
I'm running into an issue with the input() function in python 3.7.9. Under certain conditions, all keyboard input is no longer being reflected on screen and [ENTER/RETURN] key no longer submits the ...
1 vote
0 answers
45 views
Depth Search between CFGs in BFS algorithm using python with LLVM IR
Context: I am trying to find out the depth between two CFGs using BFS but the code is not properly working as it's only showing the results up to depth 0 and 1 but it's not showing the other depths ...
0 votes
1 answer
103 views
Can't install picos in Python 3.7
I am trying to solve a mathematical problem using python 3.7.0 . For this I've installed CPLEX 12.10 and I decided to install some dependencies, like numpy, prettytable and picos. Numpy and ...
1 vote
0 answers
356 views
session Crashing: while installing python version 3.7 and transformers version 4.6.0 in Google Colab
I am working on a project for Meta Review Generation. I have picked my base paper as "MReD: A Meta-Review Dataset for Structure-Controllable Text Generation", the code and the data are give ...
1 vote
0 answers
217 views
Cannot install required version of tensorflow-gpu
I am trying to install this Python package as per the instructions, resulting in this error: ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==2.5.0 (from rascore) (from ...
-1 votes
1 answer
71 views
App Route with two parameters quit working with updated dependencies
I recently updated to a new version of flask/python/google app engine. I have the controller below. @app.route('/area/entity/<int:video_id>/subentity/<int:collection_id>/', methods=['POST']...