I have next class (it was simplified): I have python boost module: Python script is called from dll library and uses container from pyd py_classes. When dll-library is called first time std_vector_value type is used without any problems. When I reload dll-library inside executable I get next warning: So, it m…
How to install pip for python3.7 only?
I have python3.7 and I want to install pip. However when I do the following: It seems to download python version 3.6 and pip for that. Is there a way to not download python3.6 and just download pip for python3.7? It seems rather strange that pip is download a whole other package. Answer if you check apt show …
ConvergenceWarning: Liblinear failed to converge, increase the number of iterations
Running the code of linear binary pattern for Adrian. This program runs but gives the following warning: I am running python2.7 with opencv3.7, what should I do? Answer Normally when an optimization algorithm does not converge, it is usually because the problem is not well-conditioned, perhaps due to a poor s…
Why Pandas gives AttributeError: ‘SeriesGroupBy’ object has no attribute ‘pct’?
I’m trying to pass a user defined function pct to Pandas agg method, and it works if I only pass that function but it doesn’t when I use the dictionary format for defining the functions. Does anyone know why? returns as expected But returns the following error: Answer There is string ‘pct…
BOTO3 – generate_presigned_url for `put_object` return `The request signature we calculated does not match the signature you provided`
I’m trying to create a presigned url that will help some customers to upload files . Here my test script that is currently working But if I’m adding: to Params (or add some metadata following the information in the put_object documentation I receive back from the server: I’ve open also a iss…
What is the official name of this title bar from matplotlib and how do I hide it?
I am new to matplotlib, and I don’t know what the name of the title bar arrowed in following image is. I googled and dug from matplotlib official documentation, but I didn’t get a clue. What is the official name of this title bar from matplotlib, and how do I to hide it? I don’t want to remo…
How to move a column in a pandas dataframe
I want to take a column indexed ‘length’ and make it my second column. It currently exists as the 5th column. I have tried: I see the following error: TypeError: must be str, not list I’m not sure how to interpret this error because it actually should be a list, right? Also, is there a gener…
How to solve the ModuleNotFoundError: No module named ‘prompt_toolkit.formatted_text’ in Jupyter Notebook inside the Pycharm IDE?
I am using Pycharm 2018.2 version in ubuntu 18.04 and I am trying to use the JupyterNoteBook inside the pycharm it’s been loading and creating a new notebook. But the cell in the Jupyter always shows busy and it throws some error like ModuleNotFoundError: No module named ‘prompt_toolkit.formatted_…
Python Convert Windows File path in a variable
Given is a variable that contains a windows file path. I have to then go and read this file. The problem here is that the path contains escape characters, and I can’t seem to get rid of it. I checked os.path and pathlib, but all expect the correct text formatting already, which I can’t seem to con…
Load Machine Learning sklearn models (RandomForestClassifier) through java and send as argument to a function in python file
I have a ML model which is trained as saved as pickle file, Randomforestclassifier.pkl. I want to load this one time using java and then execute my “prediction” part code which is written python. So my workflow is like: Read Randomforestclassifier.pkl file (one time) Send this model as input to fu…