Category : scipy

I’m playing with torch and kalman filter, and I’m importing it in a bit of a non-standard way with importlib, more or less like this: import importlib class Foo(): def __init__(self): pass def tst(self): torch = importlib.import_module("torch") kalman = importlib.import_module("filterpy.kalman") foo = Foo() foo.tst() My program is not spawning any thread (at least I’m not ..

Read more

DOCKER FROM python:3.8-alpine MAINTAINER ABC ENV PYTHONUNBUFFERED 1 COPY ./requirements.txt /requirements.txt RUN apk add gcc freetype-dev RUN apk add gfortran musl-dev g++ libgcc libquadmath musl libgfortran RUN apk add lapack-dev RUN apk add libffi-dev libxslt-dev mariadb-dev build-base –virtual –no-cache && pip install -U cffi pip setuptools && pip3 install –upgrade pip –no-cache-dir wheel -r requirements.txt ..

Read more

Environnement OS: Linux 20.04 Docker: v20.10.6 Docker-compose: v1.27.4 Python (in container): v3.6.13 Situation Hi, I’m trying to setup docker container for a flask application. I was developping my application and I needed to use openCV and scipy to make image processing. I tried to reproduce this tutorial : https://subscription.packtpub.com/book/application_development/9781785282690/1/ch01lvl1sec11/generating-a-warming-cooling-filter. Before install scipy : https://www.scipy.org/install.html#pip-install, all ..

Read more

Installing scipy on my host machine: ❯ pip install scipy Collecting scipy Downloading scipy-1.5.4-cp38-cp38-manylinux1_x86_64.whl (25.8 MB) |████████████████████████████████| 25.8 MB 2.4 MB/s Requirement already satisfied: numpy>=1.14.5 in /home/tomas/.pyenv/versions/3.8.2/envs/[email protected]/lib/python3.8/site-packages (from scipy) (1.19.4) Installing collected packages: scipy Successfully installed scipy-1.5.4 Trying to install scipy in my Docker container (acockburn/appdaemon:latest): /conf # pip install scipy Collecting scipy Downloading scipy-1.5.4.tar.gz ..

Read more

I have a Dockerfile like the following, app code is omitted: FROM python:3 # Binary dependencies RUN apt update && apt install -y gfortran libopenblas-dev liblapack-dev # Wanted Python packages RUN python3 -m pip install mysqlclient numpy scipy pandas matplotlib It works fine but produces an image of 1.75 GB in size (while code is ..

Read more

Having issues with scipy and numpy. This code, part of a Django app, runs perfectly when run on my windows 10 system: try: # sparse_load is a scipy.sparse.csr_matrix sparse_load = scipy.sparse.load_npz(cache) logger.info(‘Got sparse_load’) concept_alias_tfidfs = sparse_load.astype(numpy.float32) except: logger.exception(‘Something went wrong!’ ) # code continues here … It also runs perfectly when running inside a docker ..

Read more