Category "python-2.7"

Python Could not import class

After transfer zope2 app from ubuntu12 to centos7, i get some errors that indicate that the classes are not loaded. How to check if all required libs of python

How can I store a userid and password in SQLite database from my python application?

I'm not a pro in python, I just have a username and password stored statically in my python config file, the app use this credentials to FTP some files. I canno

How to reset cumulative sum every time there is a NaN in a pandas dataframe?

If I have a Pandas data frame like this: 1 2 3 4 5 6 7 1 NaN 1 1 1 NaN 1 1 2 NaN NaN 1 1 1 1 1 3 NaN NaN NaN 1 NaN

How to call class method in robot framework?

I am getting error "No keyword with name 'addition' found." py file class A: def addition(self,a,b): print(a+b) obj=A() obj.addition(4,5) robot code

Python2: multiprocessing.dummy.Pool vs multiprocessing.pool.ThreadPool

In python 2, is there any difference between multiprocessing.dummy.Pool and multiprocessing.pool.ThreadPool? The source code seems to imply they're the same.

use custom python module in script run from c#

I am trying to run a python script from a c# console application. This c# code works fine until I import our custom python module that in turn imports other mod

Getting the error Python.framework/Versions/2.7/Python probably after MacOS Monterey 12.3.1 update

All attempt of Git push fails probably after MacOS Monterey update 12.3.1 on MacBook with Apple silicon. % git push dyld[56684]: Library not loaded: /System/Lib

Switch between anaconda and miniconda (miniforge)

I have installed conda using miniforge. Since my mac has a m1 chip, i had to install conda using Miniforge3-MacOSX-arm64.sh, inorder to get tensorflow working.

How to convert a given ordinal number (from Excel) to a date

I have a Value 38142 I need to convert it into date format using python. if use this number in excel and do a right click and format cell at that time the value

how to install opencv 4.x with python 3 and opencv 3.x with python 2.7 in Linux?

I installed OpenCV 3.3.1 with python 2.7 (GPU), but I tried to install OpenCV4.x with Python3. I followed this post here Output find /usr/local/lib/ -type f

converting python 2 to python 3('PROCESS_ALL_ACCESS' is not defined)

Here is my code that isn't working. I do not know how to define it? ('PROCESS_ALL_ACCESS' is not defined) import sys from ctypes import * PAGE_READWRITE =

DF.topandas() - Failed to locate the winutils binary in the hadoop binary path

I am running a huge text file using PyCharm and PySpark. This is what I am trying to do: spark_home = os.environ.get('SPARK_HOME', None) os.environ["SPARK_HOM

Cannot uninstall numpy,

I'm trying to use pip to uninstall numpy(I also installed pandas, but I seem to have been able to uninstall that). In the case of `numpy, I get the following ou

Tkinter in python - not found

I wanted to use tkinter in python 2.7, but it says, it is not found. Neither I can install it using pip install. How to install it ? Python 2.7.5 (default, Nov

Installing lcm-python on ubuntu

So I need to install the python version of lcm, which is downloaded from here , but every time, I end up with this error photo of my terminal.1st attempt is wit

Pyton2.7 GTK webkit enable hardware acceleration

I'm working on some python2.7 widgets for a Digital signage using GTK and webkit and I was wondering How can I enable 2d hardware acceleration? I'm running Rasp

converting each element from string to int in nested list in python [duplicate]

I have data in python with nested lists, a part of which looks like: data = [['214', '205', '0', '14', '710', '1813494849', '0'], ['214', '204

Convert humanize time into UTC time using arrow python

I have time given in the following format. 'August 28, 2017 Mon 03:30 am - 04:00 am' I would like to convert it to the following utc format using arrow.

python 2.7 dateutil install in Ubuntu 21.04

My Ubuntu 21.04 came with preinstalled with python 3. I installed python 2.7 in parallel since all my programs are in python 2.7. In my modules, import dateutil

Inserting NaN value into MySQL Database

I have some data that contains NULLs, floats and the occasional Nan. I'm trying to insert this data into a MySQL database using python and MySqldb. Here's the