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,157
questions
0
votes
0
answers
26
views
SSL Error and InsecurePlatformWarning when installing packages using pip on Python 2.7
I'm encountering a problem when installing packages on Python 2.7 using pip. Despite repeated attempts, the installation fails with SSL errors and warnings about an insecure platform. For example here'...
-5
votes
2
answers
43
views
Unable to execute Python Script directly [closed]
I am unable to execute Python Script directly.
enter image description here
enter image description here
whereas path to Python Environemnt is as follows:
root@UbuntuDockerGuest-1:~# python -c "...
0
votes
0
answers
54
views
Pip from Python 2.7.10 installed via pyenv-win cannot install any packages
I installed pyenv-win to create virtual environments in windows. One of the environments I need requires Python 2.7.10. To create virtual environments for Python versions below 3.3 I need to install ...
0
votes
0
answers
22
views
Arcpy: Python stops ExportToPDF through list after some iterations
I am having the same issue mentioned here, where it gives the exact same error after the file loops through 3 iterations. there has been no solution to that post and hence asking it again.
I am ...
0
votes
0
answers
14
views
Python2 unable to pickle string
This link says that both normal and unicode strings can be pickled. But when I try following,
def __del__ (self):
with open(self._pkl, 'wb') as f:
pickle.dump(dict(self._rec), ...
-1
votes
1
answer
38
views
Reading Excelsheets using openpyxl and Python
I have a folder with >1000 .xlsx-files containing data. I want to merge all that data into one sheet to process it further. Every .xlsx-file has 4 sheets called (Sheet 1, Sheet 2, Sheet 3 and Data)....
0
votes
2
answers
101
views
How can I store a function in an array in python?
I am trying to to store a function in an array and store that array in a dictionary so I can later call values from that array through the dictionary.
I created a zeros array and created a loop that ...
0
votes
1
answer
25
views
" 'Word2Vec' object has no attribute 'load_parent_word2vec_format' " error
I am trying to run an old code which uses python 2.7, and since it runs on the slow version of Word2Vec I want to update it to Python3 and when I did so I got this error:
'Word2Vec' object has no ...
0
votes
0
answers
65
views
How to execute a nodejs function from the python code?
Our application uses python and serverside nodejs.
There is python code which sends notifications to users. When a notification is send we need to send that info to a third part tool for analytics. We ...
0
votes
0
answers
42
views
How can I use psutil to Show Values which are Comparable to the Task Manager's Values?
I need your help with a psutil script. I want to log memory and CPU usage of a python 2 script in percent. For that I use something similar to the following loop:
while True:
for process in psutil....
1
vote
2
answers
77
views
Large number in python gives infinity
I dealing with data with very large numbers this error appears
for example if I am trying to calculate for example:
import random
import numpy as np
import cmath
import math
import mpmath
from scipy....
0
votes
0
answers
9
views
Getting wrong output while using Monotonic stack to find previous Greater Index in array
I am using Monotonic Stack for finding previous greater indexes for the elements in the list arr. I want to return a list with all the indexes that shows indexes of previous greater element. But for ...
0
votes
0
answers
38
views
Decorator Classes and Application in Inherited Programming
I am trying to implement a logger with Decorator classes with something like this -
import sys
import traceback
class ConsoleLogger:
def __init__(self):
pass
def info(self, message):
...
0
votes
1
answer
205
views
how to install Pyqt4 currently on raspberry pi 3 in python 2.7?
I just installed a raspberry pi operating system on a micro sd memory to migrate to this a system that works with pyqt4, but I have the problem that now I cannot install PyQt4 on this new operating ...
2
votes
3
answers
88
views
Pylint syntax error not suppressing despite the `disable` comment
I'm writing scripts for Ansys Mechanical, which are written in IronPython 2.7.0.40. In my script, I need to assign a property to ContactTimeStepControls.None. Note that the None here is NOT the None ...