Install a python library in python virtual environment venv: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified

Error: When running pip install in venv, on Windows 10, the following error is displayed:

WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: 'C:\Python311\Scripts\google-oauthlib-tool.exe' -> 'C:\Python311\Scripts\google-oauthlib-tool.exe.deleteme'

Solution: run

py -m pip install [the package you want to install]

Script cannot be loaded because running scripts is disabled on this system. For moreinformation, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.

Error: when running the activation script for my python virtual environment, the I had the following error on Win10

Activate.ps1 cannot be loaded because running scripts is disabled on this system. For more
information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.

Solution: Open a powershell as admin and run the following command

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

hit Y and press the Enter key.

tensorflow error: internal: libdevice not found at ./libdevice.10.bc Ubuntu – Solved

Context: I got this error when running tensorflow with python on Ubuntu 20.04, after installing the cuda toolkit by choosing the local deb installation file.

Solution: the solution was to download and install the deb network file instead

https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04

Google Cloud Vision Set Up on Windows. google module not found in virutalenv

Issue:
The following error is displayed when trying to import google vision in the virtualenv after following the installation process.

Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'google'

Google cloud installation instruction:

https://cloud.google.com/python/docs/reference/vision/latest#installation

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-vision

Solution:

To run python in the virtual environment, use the python command instead of python3

git returns ” is a merge but no -m option was given.”

Error:

git revert 75a690a642b71768dad36ade65839a6da62d8d6a
error: commit 75a690a642b71768dad36ade65839a6da62d8d6a is a merge but no -m option was given.
fatal: revert failed

Solution:

run the following command in the terminal:

git cat-file -p 75a690a642b71768dad36ade65839a6da62d8d6a

Output:

git cat-file -p 75a690a642b71768dad36ade65839a6da62d8d6a
tree 6ee9397d91ed42ad3d130b93c5c5587d1ad6c67c
parent 95beda2bfbfa1523cb14c1285d80a5faa9b7f6f0
parent a3e9ddabca322e52b141a001dc5eb9c2c789ff22

run

git revert 75a690a642b71768dad36ade65839a6da62d8d6a -m 1 

if you want to use the first parent as mainline, choose 1, else choose 2

Test site through VPN or local on browserstack

Browserstack resources:

https://www.browserstack.com/docs/live/local-testing

1 – Install the browserstack local binary

https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip

2 – cd in the directory where the binary is located and run:

./BrowserStackLocal --key t9guUg6zxQ5Y9MBfciaZ

3- in your browser access borwserstack and tick “Resolve all URLs through my network

you can also do that throught cli when running the binary:

./BrowserStackLocal --key t9guUg6zxQ5Y9MBfciaZ --force-local

For local testing, ensure that localhost is served on bs-local.com

see https://www.browserstack.com/docs/live/local-testing/test-using-local-testing