Featured

TechBytes on Linux

This is a growing list of Linux commands which might come handy for the of Linux users. 1. Found out i had to set the date like this: ...

Monday, July 20, 2020

Installing pip with get-pip.py in a Python virtual environment on Windows MacOS & Linux

  • To create a Python virtual environment type below commands on the required console prompt:

On Windows
    python -m venv ./venv
    .\venv\Scripts\activate
On Ubuntu
    python3 -m venv ./venv
     source ./venv/bin/activate    
There are some exceptional cases where vent creation might fail. Here are some workarounds -
https://askubuntu.com/questions/1268833/error-command-path-to-env-bin-python3-7-im-ensurepip-upgrade
123

To exit a Python virtual environment, you can use the deactivate command. This command is available in most Unix-like systems and Windows.

Example

$ deactivate

Steps to Exit Virtual Environment

1. Using deactivate Command

The most common way to exit a virtual environment is by using the deactivate command1.

Example:

$ deactivate

2. Using source deactivate

In some cases, especially with certain virtual environment management tools like virtualenvwrapper, you might need to use the source deactivate command2.

Example:

source deactivate

  • To install pip, securely download get-pip.py by following this link: get-pip.py. Alternatively, use curl:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Then run the following command in the folder where you have downloaded get-pip.py:

python get-pip.py

Warning

 

Be cautious if you are using a Python install that is managed by your operating system or another p

ackage manager. get-pip.py does not coordinate with those tools, and may leave your system in an inconsistent state. Hence it is recommended to use venv (Python Virtual Environment) to isolate the working environment with the Python environment at the system level.
Found this article to be a gem to troubleshoot pip errors on Windows -- https://jhooq.com/pip-install-connection-error/

To install python3 & virtualenv on MacOS

Python3 Virtualenv Setup

Requirements:

  • Python3
  • Pip3
$ brew install python3 #upgrade

Pip3 is installed with Python3

Installation

To install virtualenv via pip run:

$ pip3 install virtualenv

Usage

Creation of virtualenv:

$ virtualenv -p python3 <desired-path>

Activate the virtualenv:

$ source <desired-path>/bin/activate

Deactivate the virtualenv:

$ deactivate

You can see more about the Homebrew on the official page.


Saturday, June 6, 2020

About my iPad Pro & Zoom h1 voice recorder





Watch my long term usage review of the iPad Pro 2018 model with Apple Pencil. Also, check out the Zoom h1 audio recorder & the mic stand.

About my MacBook Pro Touchbar edition & gadget updates





Watch my long term review of my Macbook Pro touchbar 2018 model !!

Wednesday, May 13, 2020

How to resolve VT-X is not available error in Oracle VM VirtualBox when tried to start a VM

  1. In the Administrator elevated command prompt, paste the following command to disable Microsoft Hyper V and press Enter:
    dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
  2. Once the command runs successfully, close the elevated Command Prompt and restart your computer.
  3. At the next startup, open a Virtualbox machine again and see if you’re still getting the same error message.

Tuesday, May 5, 2020

Go lang debugger delve installation error on Mac OS: xcrun: error: invalid active developer path, missing xcrun

Today I installed Go lang on my macbook Pro and installed VS Code and the Go lang extension for it.
When I tried to Run the first hello.go program from the VSCode Run menu got a prompt that Delve which is the debugger extension for Go lang to be installed.
When I tried to install Delve got this strange error:


Mac OS: xcrun: error: invalid active developer path, missing xcrun

On looking up the internet found that running the below command on the terminal will solve the issue:

Install the Xcode toolkit! Even if you had it installed before, you might have to re-register it or update it to the latest version.
$ xcode-select --install
If that doesn’t work, force it to reset. You’ll need sudo access for this one.
$ sudo xcode-select --reset
And voila, Delve got installed successfully using the 
go get -V github.com/go-delve/delve/cmd/dlv command and all was well. Now I am able to neatly run the Go lang programs from the Run menu of VS Code editor.

Alternatively using the below commands was always working without installing Delve as well which is the default option for you to build & run the Go programs.
go build hello.go 
./hello

Enjoy coding Go!!

Tuesday, July 31, 2018

Sunday, November 5, 2017

How to record your computer screen with Audio using Apps you might already have

If you would rather not download any additional software, there’s a good chance that some of the apps you have laying around can indeed record your screen, even if that’s not their primary purpose. Here are several apps that you probably have access to right now, and how they can record for you.

PowerPoint

Didn’t know you can record your screen with PowerPoint, the presentation software included with Microsoft Office 365? It’s true! The latest versions of PowerPoint include the capability. Start by heading over to the Insert tab, and select Screen Recording, with an icon of a recorder and a screen. You can then select the specific area of your screen you want to record, and start the recording process whenever you want. When you’re done you can save the video as a separate file to access or embed as you see fit. Editing and control options are very limited after that, but it’s a great option for quick-and-dirty recording — especially if you’re doing it for a looming presentation.

YouTube Live Streaming

If you don’t want to spend a ton of time recording but still want a video for your YouTube channel, or any other social media platform, then YouTube can help out. Sign into your account as you would normally, go to Upload, click Get Started under Live Streaming, and choose Events. Afterward, select New live event, fill out the required information, and click Go Live Now. A Google Hangouts page will open — keep in mind that you are now recording audio and video — and on the left you should see a button that says Screenshare. Select it, and choose a desktop window for recording. Then, click Start Screenshare, followed by Start Broadcast. You should now be recording! Select Stop Broadcast when finished, and save your Event as you wish.

QuickTime Player

If you’re on a Mac, you may prefer using QuickTime. Launch QuickTime, select File, and choose New Screen Recording. This will open up a small recording window that you can start, which will automatically encourage you to select either a part of your screen or the full screen for recording. Click Start Recording when you are ready. However, note that QuickTime recordings aren’t easy to edit in post, so be careful.Quicktime screen recording

Thursday, October 19, 2017

Tuesday, September 23, 2014

JSONLint - The JSON Validator

http://jsonlint.com/

You can use this online JSONlint tool to validate & correct your JSON strings.
Found this to be a very useful resource in my day to day work.

Popular Posts