Categories
Mastering Development

Does Poetry install –no-dev need Rust to be installed?

I’m installing Poetry in a container in my Raspberry pi 3b+ (Lite buster February 2020). I use the image arm32v7/python:3.7-slim-buster. Here is the Dockerfile: FROM arm32v7/python:3.7-slim-buster RUN apt-get update RUN apt-get install libssl-dev -y RUN apt-get install libffi-dev RUN apt-get install build-essential -y RUN pip install poetry RUN pip install –upgrade pip COPY ./pyproject.toml /app/ […]

Categories
Mastering Development

Python: SqlAlchemy map existing view to ORM Object

I currently try to map an existing view within my postgreSQL DB to an SqlAlchemy ORM object in python. My view has the following name path_number_view and joins some tables together. It is wokring fine. But I am not able to map the view to an ORM object, when starting the application I get an […]

Categories
Linux Mastering Development

Bluetooth keeps changing from A2dp to headset and loses connection on Debian Buster with JBL 4 Speaker

since over a year I am having trouble with the bluetooth connection to my JBL 4 speaker. It looses connection again and again. I created a script according to what I found on the internet to reconnect via keyboard short cut. Sometimes it is connected with it within a view seconds sometimes I had to […]

Categories
Mastering Development

Python vestigial parameter and uncallable function

import numpy as np from scipy.optimize import fsolve from scipy.integrate import quad import matplotlib.pyplot as plt Rgas = 8.31446261815324 #Pa*m**3/mol*K def Peng_Robinson_EOS(P,V,T,Tc,Pc,ω): a = (1+(0.37464+1.54226*ω-0.26992*ω**2)*(1-(T/Tc)**(1/2)))**2*Rgas**2*Tc**2/Pc #Pa*m**3 b = 0.07780 * Rgas*Tc/Pc return P + a/((V+(1-np.sqrt(2))*b)*(V+(1+np.sqrt(2)))) – Rgas*T/(V-b) def PR_Psat(T,Tc,Pc,ω,V,Pguess = 100000): def integral_diff (Pguess,T,Tc,Pc,ω,V): def Psat_integrand (V,Pguess,T,Tc,Pc,ω): integrand1 = fsolve(Peng_Robinson_EOS(Pguess,V,T,Tc,Pc,ω),Pguess) integrand2 = Pguess integrand = […]

Categories
Development

Kivy Camera free resources issue

I want to use Camera to capture photos and scan barcode in my Android app. I added it in kv: <CameraForm>: FloatLayout: Camera: id: camera size_hint: (1, 0.8) pos_hint: {“center_x”: 0.5, “top”: 0.95} canvas.before: PushMatrix Rotate: angle: -90 if app.isAndroid() else 0 origin: self.center canvas.after: PopMatrix MDRaisedButton: text: “Capture” size_hint: (None, None) height: “40dp” pos_hint: […]

Categories
Development Linux Ubuntu

ImportError: cannot import name GUdev, introspection typelib not found

Can anyone suggest how I fix up the errors from standard application of Kazam screenshot app: alistair@alsE590:~$ kazam /usr/bin/kazam:77: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5 dist = platform.linux_distribution() Traceback (most recent call last): File “/usr/bin/kazam”, line 148, in <module> from kazam.app import KazamApp File “/usr/local/lib/python3.7/dist-packages/kazam/app.py”, line 36, in <module> from kazam.backend.prefs […]

Categories
Development

Installation of dlib with pip fails on Windows 10

I tried a lot to install pip install dlib but it always shows an error and I reinstalled cmake. I got the error: pip install dlib Collecting dlib Using cached https://files.pythonhosted.org/packages/1e/62/aacb236d21fbd08148b1d517d58a9d80ea31bdcd386d26f21f8b23b1eb28/dlib-19.18.0.tar.gz Building wheels for collected packages: dlib Building wheel for dlib (setup.py) … error ERROR: Command errored out with exit status 1: command: ‘c:\program files\python37\python.exe’ […]

Categories
Development

PYPY3 — Unable to install Pandas

I have been trying to install pandas in PYPY with out any success. Below is the complete log message. Windows 10 64 Bit OS. Have installed the Visual C++ 2015-2019 redistributable. Python 3.7 , pip 19.3.1 ( installed through Anaconda) pypy3.6-v7.2.0-win32 how to resolve this error? Collecting pandas Using cached https://files.pythonhosted.org/packages/b7/93/b544dd08092b457d88e10fc1e0989d9397fd32ca936fdfcbb2584178dd2b/pandas-0.25.3.tar.gz Complete output from command […]

Categories
Development

Error while installing Jupyter on Windows 10

I am getting the following error while Installing Jupyter through pip install jupyter Below is the error I am getting: ERROR: Command errored out with exit status 1: command: ‘c:\users\lenovo\appdata\local\programs\python\python38-32\python.exe’ -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘C:\\Users\\LENOVO\\AppData\\Local\\Temp\\pip-install-wxq2b1yw\\pywinpty\\setup.py'”‘”‘; __file__='”‘”‘C:\\Users\\LENOVO\\AppData\\Local\\Temp\\pip-install-wxq2b1yw\\pywinpty\\setup.py'”‘”‘;f=getattr(tokenize, ‘”‘”‘open'”‘”‘, open)(__file__);code=f.read().replace(‘”‘”‘\r\n'”‘”‘, ‘”‘”‘\n'”‘”‘);f.close();exec(compile(code, __file__, ‘”‘”‘exec'”‘”‘))’ egg_info –egg-base ‘C:\Users\LENOVO\AppData\Local\Temp\pip-install-wxq2b1yw\pywinpty\pip-egg-info’ cwd: C:\Users\LENOVO\AppData\Local\Temp\pip-install-wxq2b1yw\pywinpty\ Complete output (161 lines): Compiling C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Plex\Scanners.py […]

Categories
Development Windows

error installing pytorch using pip on windows 10

I am trying to install pytorch with pip using pip install torch or pip3 install torch===1.3.1 torchvision===0.4.2 -f https://download.pytorch.org/whl/torch_stable.html with python 3.7.4 and with python 3.8 (latest stable release) both on 32 and 64 bit. and getting Collecting torch Using cached https://files.pythonhosted.org/packages/f8/02/880b468bd382dc79896eaecbeb8ce95e9c4b99a24902874a2cef0b562cea/torch-0.1.2.post2.tar.gz Collecting pyyaml (from torch) Downloading https://files.pythonhosted.org/packages/bc/3f/4f733cd0b1b675f34beb290d465a65e0f06b492c00b111d1b75125062de1/PyYAML-5.1.2-cp37-cp37m-win_amd64.whl (215kB) 100% |████████████████████████████████| 225kB 1.2MB/s Installing collected […]