Questions tagged [python-2.7]
Python 2.7 is the last major version in the 2.x series, and is no longer maintained since January 1st 2020. Use the generic [python] tag on all Python questions. Do not add this tag simply to convey the version of Python you're using, unless the question concerns an issue specific to Python 2.7.
python-2.7
95,142
questions
-3
votes
0
answers
20
views
how can I compute the striking force of a football player using python [closed]
in a football match between England and Spain Julius Fueke needs a decisive goal, write a Python program that can compute the striking force of each of the players
i tried using the import numpy but ...
0
votes
0
answers
23
views
how to make python 2.7 working in alma linux 9 with dnf
I have Alma Linux 9 in my VM, which is not compatible with python 2.7, but I need backward compatibility as well.
I had installed python2.7 from the source code and created a softlink between /usr/bin/...
0
votes
1
answer
17
views
How to avoid "UserWarning: Reading `.npy` or `.npz` file required additional header parsing..."
I'm creating .npz files in Python 2 (yes, Python 2, not 3 and I can't change it) full of .npy files. When reading those .npz files, I'm having the warning message: "UserWarning: Reading .npy or ....
-4
votes
0
answers
57
views
Unable to install BeautifulSoup4 on Red Hat Linux
When I try to install BeautifulSoup4.
I am getting this:
$ pip install beautifulsoup4
Collecting beautifulsoup4
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection ...
0
votes
1
answer
64
views
how to conver new key into old in python3 ndb
Here my code
new_key= ndb.Key(urlsafe = request.user_key)
this is written in python3 ndb
this will return us key and we change in urlsafe
key = new_key.urlsafe()
key.decode(encoding="utf-8&...
0
votes
0
answers
34
views
How to install pip for python 2.7 on ubuntu 23.10
There are some links such as here for instructions on how to install pip2 on ubuntu with python 2.7, however when I run
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo ...
0
votes
0
answers
61
views
can't find the libraries meta_lib and meta_log in pypi
I was trying to use a legacy script from a qualcomm flashing package (Packaged for QFIL)
examining the script I found that it is:
Python 2.7.18 (I'm have little or no experience with it.
It makes ...
1
vote
2
answers
30
views
TypeConversion of a string with float values to integer is throwing error
I have written the following code:
typConvInt = int('3.3')
print(typConvInt)
But compiler is throwing an error.
ErrorMessage:
Traceback (most recent call last):
File "E:\Trainings\...
0
votes
0
answers
22
views
Get actual with foreign key Web2py
I have a data table with three fields. All of these three (3) fields are foreign key of others table. But I want to display the actual data. How can I work it out? For now, I can only display their ID....
2
votes
2
answers
70
views
Change mantissa in scientific notation from 0-1 instead of 1-10
I want to format a number so that the mantissa is between 0 and 1 instead of 1 and 10 in scientific notation.
For example;
a=7.365
print("{:.6e}".format(a))
This will output 7.365000e+00, ...
0
votes
0
answers
39
views
How to change the python version of a virtual enviremnet?
I am writing a Django React web app and I am required to install Dlib for a specific component to work (to install face_recognition library). However I am unable to do so because I used Python 3.12 to ...
1
vote
0
answers
24
views
Runing a script written for python2.7 using subprocess.run in a script written in python3.11
In my company there is a script: install.py that is written in python2.7.
The issue
I'm writing a script to run this script from my own python script which I've written in python3.11.
In the beginning ...
0
votes
0
answers
9
views
Can processing of request/grequest responses be run concurrently in Python2?
I'm writing a Python2 program that pulls a large amount of JSON data from a remote CouchDB database. The data is indexed by timestamp: I pass a startkey and an endkey, and the database returns all ...
0
votes
2
answers
38
views
Converting python 3 to 2.7.5 F string to .formated
I learned all of my python on 3.0 and greater and come to find out the server that I need to put my script on is 2.7.5 which means no f strings. I am having issues converting my script from F strings ...
0
votes
1
answer
25
views
Can I set up autocomplete in VS Code for Revit API stubs without having Revit installed?
In my office, I have a PC that does not meet the minimum requirements to install Revit. I want to use it just for writing my API codes in VS Code, so I can use them later on another PC with Revit ...