Что делать если нужно поставить какую-то Python-библиотеку а root-прав нет? То есть в систему библиотеку никак и ничего не поставить.
Есть как минимум два способа это решить правильно!
🔸 Сделать виртуальное окружение и ставить там что угодно.
Это позволит создать полностью независимое исполняемое окружение для ваших приложений.
Все библиотеки будут храниться в домашней директории юзера а значит доступ на запись имеется.
Создать очень просто:
python3 -m venv ~/venvs/myenvname
Теперь активируем окружение
# Linux
source ~/venvs/myenvname/bin/activate
# Windows
%userprofile%\venvs\myenvname\Scripts\activate.bat
Можно ставить любые библиотеки и запускать приложение.
Это стандартный метод работы с любым проектом. Если еще не используете его, то пора начинать. Даже при наличии root доступа!
🔸 Бывает, что нет возможности запустить приложение из своего виртуального окружения. Например, его запускает какой-то сервис от вашего юзера и вставить активацию окружения вы не можете.
В этом случае можно установить библиотеки для Python не глобально в систему, а только для юзера.
Выполните этот код в консоли:
python3 -m site
Вы получите что-то такое:
sys.path = [
'/home/user',
'/usr/lib/python37.zip',
'/usr/lib/python3.7',
'/usr/lib/python3.7/lib-dynload',
'/home/user/.local/lib/python3.7/site-packages',
...
]
USER_BASE: '/home/user/.local'
USER_SITE: '/home/user/.local/lib/python3.7/site-packages'
ENABLE_USER_SITE: True
Нас интересует параметр USER_SITE. Это путь к пользовательским библиотекам, которые доступны по умолчанию, если они есть.
Именно сюда будут устанавливаться модули если добавить флаг --user при установке чего-либо через pip
pip install --user requests
Для этой команды не нужны root-права.
После неё можно запускать системный интерпретатор без виртуальных окружений и установленная библиотека будет доступна для текущего юзера.
Параметр USER_BASE показывает корневую директорию для хранения user-библиотек. Её можно изменить с помощью переменной окружения PYTHONUSERBASE
export PYTHONUSERBASE=~/pylibs
python3 -m site
...
USER_BASE: '/home/user/pylibs'
USER_SITE: '/home/user/pylibs/lib/python3.7/site-packages'
Получается некоторое подобие виртуального окружения для бедных 😁 которое можно менять через эту переменную (не делайте так!Лучше venv!)
🔸 Дописывание пути в PYTHONPATH
Этот способ не входит в список "двух правильных", но тоже рабочий. Здесь придётся сделать всё несколько сложней.
Сначала ставим библиотеку в любое место указывая путь установки
pip3 install -t ~/mylibs modulename
Библиотека установится без привязки к какому-либо интерпретатору. То есть по умолчанию не будет видна. Теперь в нужный момент добавляем этот путь в sys.path или в PYTHONPATH.
Не буду советовать так делать. Единственный раз когда этот способ мне пригодился и решил поставленную задачу, это при создании общей библиотеки для кластера компьютеров.
Модули лежат в сети и подгружаются для всех из одного и того же места. То есть обновлять файлы требуется только один раз а не на всех хосты отдельно.
Минусы такого подхода:
▫️Нужно всем хостам пробить нужный путь в .bashrc или ещё куда-то чтобы он сетапился на старте.
▫️Чем больше хостов тем больше нагрузка на сеть. Иногда такой способ не подходит именно по этой причине. Тогда Ansible вам в помощь.
▫️Не очень подходит если хосты с разными операционками. Некоторые библиотеки различаются для Linux и Windows (там, где есть бинарники) и приходится мудрить более сложные схемы.
#tricks#basic
We already have a list of open-source alternatives to mainstream social media platforms like Twitter.
Take a look 🕵️♀️
https://itsfoss.com/mainstream-social-media-alternaives/
@itsfoss_official
#alternatives#social
Here are some links about #systemd#alternatives for #Linux in no particular order.
Which are your favorite alternatives and distros?
https://wiki.gentoo.org/wiki/Comparison_of_init_systems
https://suckless.org/sucks/systemd/
https://unixsheikh.com/articles/the-real-motivation-behind-systemd.html
https://sysdfree.wordpress.com/
https://nosystemd.org/
https://skarnet.org/software/systemd.html
https://the-world-after-systemd.ungleich.ch/
https://ewontfix.com/14/
https://forums.debian.net/viewtopic.php?t=120652
https://www.devuan.org/os/announce/
https://www.devuan.org/os/init-freedom
https://thehackernews.com/2019/01/linux-systemd-exploit.html
https://judecnelson.blogspot.com/2014/09/systemd-biggest-fallacies.html
https://chiefio.wordpress.com/2016/05/18/systemd-it-keeps-getting-worse/
https://systemd-free.artixlinux.org/why.php
Some more added here too: https://start.me/p/Kg8keE/priv-sec
#systemd#Linux
NewPipe Releases (unofficial) - NewPipe's GitHub releases
The APK sent here cannot be installed over F-Droid's one because they use different signing keys (details)
This pull request adds an experimental SponsorBlock integration, the fork's apk is linked there
👉🏼https://t.me/newpipe_releases👈🏼
💡 read this as well: YouTube video hosting alternatives
https://t.me/NoGoolag/2284
#newpipe#youtube#alternatives
📡@libreware📡@nogoolag
@NoGoolag#browser#alternatives with mitigations, patches etc.
Alpha version release March 6, 2025
FireFox browser options
- Tor Browser (all)
- Mullvad Browser (Desktop)
- IronFox (Android) Read the Known Issues section on the gitlab.
- LibreWolf (mentally ill devs)
Make your own #Firefox with mitigations etc...
- Phoenix / wiki
- Arkenfox user.js / wiki / gui / user-tool / mobile
- Narsil / Narsil Mobile
- Betterfox / Betterfox Mobile
- pyllyukko
- Compare some of the user.js files
Chromium based browser Options
- Ungoogled Chromium (all)
- Cromite (Android, Linux, Windows)
Browser extensions
- uBlacklist
- uBlock Origin or uMatrix (never both)
- LibRedirect (setup your instances for each service in the settings)
Links to block lists...
- Yokoffing
- Celenity/Phoenix
- FilterLists
Set your default search engine to a search proxy
- 4get instances
- Searx instances
Why your favorite browser is not recommended
- Celenity Firefox browser comparisons
- How to choose a browser for everyday use?
- is your browser spyware?
- Choose your browser carefully
- Browsers and the connections they make compared
- Fake Privacy and security
Additional reading...
- Wiki about extensions
- Multiple Extension Conflicts
- uMatrix for beginners
- Firefox user.js install guide
- Arch Linux Firefox Privacy wiki
- Bromite (for knowledge purposes)
Testing your browser
- Fingerprint.com
- How to test browsers for spyware
- Privacytests browser comparison
- Mullvad check
- Bromite fingerprint testing
- IP Leak
- List of test sites A
- List of test sites B
* Thunderbird users should consider taking a look at Dove - Phoenix's sister project.
A list of software #alternatives and resources for professional #audio#video and live events production on #Linux
https://gitlab.com/nodiscc/awesome-linuxaudio
https://github.com/nodiscc/awesome-linuxaudio/releases/tag/1.0.0
Keeweb : Free Cross-Platform Password Manager Compatible With KeePass.
Keeweb webapp is a browser and desktop password manager compatible with KeePass databases. It doesn’t require any server or additional resources. The app can run either in browser, or as a desktop app.
The app is quite stable now. Basic stuff, as well as more advanced operations, should be rather reliable.
https://github.com/keeweb
#keepass#passwords#alternatives
📡@cRyPtHoN_INFOSEC_EN
The best free Audacity Alternatives
https://www.ghacks.net/2021/07/04/the-best-free-audacity-alternatives/
All alternatives listed below lack at least one of the main characteristics of Audacity. They are either only available for one operating system, e.g. Windows, not open source, don't offer the same set of core features, or lack in other departments.
Audacity Forks
Audacity is an open source project, and developers started to fork the application as soon as the announcement hit the Internet that the project team changed.
Forks match all main characteristics of Audacity, but there is no "main" fork yet that all disgruntled developers and users switched to.
Here is a link to a promising forks (because it is updated regularly)
https://github.com/cookiengineer/audacity
Another
https://github.com/SartoxOnlyGNU/audacium
📡@nogoolag📡@libreware
#alternatives#audacity#audio#editor
This is the best search engine for current events and history
Clip Genie - Grand Theft World
https://grandtheftworld.com/clip-genie
https://gtw.clipgenie.com
Another search engine:
https://corbettreport.com
#Google#search#engines#alternatives
Adobe just announced new terms that say they will do whatever they want with your content, so here are some alternatives to consider.
3DS Max
Blender
Acrobat
Evince (read)
Inkscape (edit multi page)
LibreOffice_Draw (create, edit, sign)
LibreOffice_Writer (create)
Nextcloud LibreSign (sign)
Okular (read, annotate, sign)
OnlyOffice (read, edit)
PDF-Shuffler (merge, arrange, delete)
XReader (read)
AdobeXD
Akira
Figma
Lunacy
Pencil
Penpot
After Effects
Astrofox (audio responsive animations)
BlackMagicDesign Fusion (proprietary)
HitFilm (proprietary)
Natron
Animate
Blender (3D)
Friction
Glaxnimate (2D)
Synfig (2D)
Audition
Tenacity
Audor
LMMS
Cinema 4D
Blender
Fresco
Krita
Illustrator
Inkscape
Krita
sK1
InDesign
Lyx
Scribus
Lightroom
Darktable
Raw Therapee
Paint
Krita
MyPaint
Photoshop
GIMP
Krita
PremierePro
DavinciResolve (proprietary)
Kdenlive
Olive Video
OpenShot
Pitivi
Shotcut
⚡️Follow Freedom Tech on NOSTR
https://t.me/LinuxTechIndex
#graphic#editor#Adobe#Alternatives