Virtualenv setup with python3

Project setup with virtualenv. While working with a pyhon3 project, it is better to install project based dependencies inside a project wise virtualenv created. It helps to minimise the interference of different versions of python modules into different projects.

Ubuntu screen recorder with audio- Obs-Studio

Ubuntu 20 have inbuilt recorder which we can be triggered by alt+ctrl+shift+ r But it does not record the voice to overcome the limitation I am exploring “OBS Studio” its installation steps are given at which I have used. Step 1) To check if “OpenGL” is available or not as OBS Studio needs openGL

install sklearn for python3

I ran a python3 program and got error Traceback (most recent call last):File “”, line 1, infrom sklearn.metrics.pairwise import pairwise_distancesModuleNotFoundError: No module named ‘sklearn’ It clearly says sklearn module is not available and second point to consider is I am using python3 and I have pyhton2 as well on my devbox. To sort it out,

Pip3 Install pip for python3

I have Ubuntu20 and by default if I check pip version I get it is for python2 But I want to use pip for pyhon3 and if I check pip3 I get following: Therefore I executed above command to have pip3 for python3 at my system : It displays a bit general information and asks

read N lines at a time file python

Here requirement is that, I want to process a file from row number N to row number N+X One solution might be, use itertools.islice to get the lines from the file between the given range of start and end.e.g for row no 3 to 6 : For example purpose I have take a file with

UserWarning: Could not import the lzma module

Got following error after import turicreate /home/prod/anj/learn/ml/mlvenv/lib/python3.7/site-packages/pandas/compat/ UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError. warnings.warn(msg) Fix: I have ubuntu: For it sudo apt-get install liblzma-dev Reading package lists... Done Building dependency tree Reading state information... Done Now I will go to

Add python3.7 as alternate python along with default on Ubuntu

My default python is 2.7 and I want python 3.7 along with it: Go to opt directory $ cd /opt Create a directory $ mkdir python3 Download Python 3.7 $ wget Extract the python 3.7 tar file $ tar xzf Python-3.7.4.tgz To compile the source go to $ cd Python-3.7.4 To get release build with all

Create a Virtual environment for python 3

I have Ubuntu and it has python 2.7 as default. Along with it I have configured python3 as well. To create a virtual environment for a python 3 project I have executed following virtualenv -p /usr/bin/python3 mlvenv It created a virtual environment named mlvenv Now to activate it source mlvenv/bin/activate To confirm python --version

Explain the top command in linux

​Top command is used to check server processes in Linux. Top command shows all running processes in current host. It displays the current system information and the processes information which includes: host-up-time average load tasks running no. of users logged in no. of CPU processes RAM utilisation lists all the processes running/utilized by the users