miércoles, 13 de noviembre de 2024

Install python and pip on windows

Download python and install it from here.

https://www.python.org/


Python comes with an ensurepip module[1], which can install pip in a Python environment.

C:\Users\user>py -m ensurepip --upgrade

Defaulting to user installation because normal site-packages is not writeable

Looking in links: c:\Users\Dani\AppData\Local\Temp\tmpcbaxu26c

Requirement already satisfied: pip in c:\users\dani\appdata\roaming\python\python313\site-packages (24.3.1)



If doesn't work, download the script

C:\Users\Dani>curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100 2222k  100 2222k    0     0  4207k      0 --:--:-- --:--:-- --:--:-- 4241k


And run the script

C:\Users\user>py get-pip.py

Defaulting to user installation because normal site-packages is not writeable

Collecting pip

  Using cached pip-24.3.1-py3-none-any.whl.metadata (3.7 kB)

Using cached pip-24.3.1-py3-none-any.whl (1.8 MB)

Installing collected packages: pip

  Attempting uninstall: pip

    Found existing installation: pip 24.3.1

    Uninstalling pip-24.3.1:

      Successfully uninstalled pip-24.3.1

  WARNING: The scripts pip.exe, pip3.13.exe and pip3.exe are installed in



 'C:\Users\user\AppData\Roaming\Python\Python313\Scripts' which is not on PATH.

  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Successfully installed pip-24.3.1


Add the enviroment variable to path section with the yellow path marked:

C:\Users\user\AppData\Roaming\Python\Python313\Scripts


https://pip.pypa.io/en/stable/installation/

Solaar config for Logitech MX Master 3S and MX Keys Mini

First add the repositories and install solaar

 

alejandro@minipc:~$ sudo add-apt-repository ppa:solaar-unifying/stable
[sudo] password for alejandro:
Repository: 'Types: deb
URIs: https://ppa.launchpadcontent.net/solaar-unifying/stable/ubuntu/
Suites: noble
Components: main
'
Description:
PPA with stable versions of Solaar.
More info: https://launchpad.net/~solaar-unifying/+archive/ubuntu/stable
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Hit:1 http://uy.archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://uy.archive.ubuntu.com/ubuntu noble-updates InRelease                                                                                 
Hit:3 http://uy.archive.ubuntu.com/ubuntu noble-backports InRelease                                                                                                     
Hit:4 http://security.ubuntu.com/ubuntu noble-security InRelease                                                                                                        
Get:5 https://pkgs.tailscale.com/stable/ubuntu noble InRelease                                                      
Get:6 https://ppa.launchpadcontent.net/solaar-unifying/stable/ubuntu noble InRelease [17.8 kB]                 
Get:7 https://ppa.launchpadcontent.net/solaar-unifying/stable/ubuntu noble/main amd64 Packages [604 B]
Get:8 https://ppa.launchpadcontent.net/solaar-unifying/stable/ubuntu noble/main Translation-en [284 B]
Fetched 25.3 kB in 2s (12.0 kB/s)       
Reading package lists... Done


alejandro@minipc:~$ sudo apt update
Hit:1 http://uy.archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://uy.archive.ubuntu.com/ubuntu noble-updates InRelease                                                                                                  
Hit:3 http://uy.archive.ubuntu.com/ubuntu noble-backports InRelease                                                                                                                    
Hit:4 http://security.ubuntu.com/ubuntu noble-security InRelease                                                                                                                       
Get:5 https://pkgs.tailscale.com/stable/ubuntu noble InRelease                                                                      
Hit:6 https://ppa.launchpadcontent.net/solaar-unifying/stable/ubuntu noble InRelease
Fetched 6,578 B in 1s (5,849 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.

alejandro@minipc:~$ apt list --upgradable
Listing... Done
 

Install Solaar

alejandro@minipc:~$ sudo apt install solaar
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  solaar
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 364 kB of archives.
After this operation, 1,884 kB of additional disk space will be used.
Get:1 https://ppa.launchpadcontent.net/solaar-unifying/stable/ubuntu noble/main amd64 solaar all 1.1.13~ubuntu24.04.1 [364 kB]
Fetched 364 kB in 4s (89.3 kB/s)
Preconfiguring packages ...
Selecting previously unselected package solaar.
(Reading database ... 149310 files and directories currently installed.)
Preparing to unpack .../solaar_1.1.13~ubuntu24.04.1_all.deb ...
Unpacking solaar (1.1.13~ubuntu24.04.1) ...
Setting up solaar (1.1.13~ubuntu24.04.1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1ubuntu3) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for desktop-file-utils (0.27-2build1) ...

Then add the rules for Solaar

alejandro@minipc:~$ curl -O https://raw.githubusercontent.com/pwr-Solaar/Solaar/master/rules.d-uinput/42-logitech-unify-permissions.rules
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   937  100   937    0     0  12071      0 --:--:-- --:--:-- --:--:-- 12168

alejandro@minipc:~$ sudo cp 42-logitech-unify-permissions.rules /etc/udev/rules.d

 

Config the rules.yaml to add some rules

alejandro@minipc:~$ vim .config/solaar/rules.yaml

 

%YAML 1.3
---
- Test: [thumb_wheel_up, 15]
- KeyPress:
  - [Control_L, Alt_L, Right]
  - click
...
---
- Test: [thumb_wheel_down, 15]
- KeyPress:
  - [Control_L, Alt_L, Left]
  - click
...

 


Reopen Solaar just in case. Done!

Links:

https://pwr-solaar.github.io/Solaar/rules/