Что делать если нужно поставить какую-то 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
The Week We've All Been Waiting For🔥
You’ve waited. We’ve been building.
The road to the Forge is opening
25.07.25 — remember the date
We’ve been working hard behind the scenes:
🔵 Finalizing the Closed Beta build
🔵 Preparing the first wave of player missions
🎁 And yes — there will be rewards
You’ll get your first real look inside DeckForge very soon.
Eyes open. Cards ready.
Stay forged.
#DeckForge#ClosedBeta
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements👉DeckForge
From the Forge #09:🛠️ | Into the Forge
Our team is hard at work crafting the world of DeckForge.
🔵 Building the first 3D Adventure Map
🔵 Designing new Jokers
🔵 Creating Bonus Cards that add real strategic depth
🔵 Testing unique combinations and gameplay balance
🔵 Fine-tuning the in-game economy for long-term progression
📆 On July 10, we’ll present the first Alpha Build at a major game dev conference — and right after that, we’ll begin launching the first wave of players into the Forge.
🔥 We’re also rolling out new community features:
Soon, you’ll be able to share gameplay screenshots, connect with other early players and experience what’s coming firsthand.
You’re the first generation of Forgers — and we’re preparing exclusive rewards and bonuses for everyone joining us on the road to Open Beta.
Stay Forged.
#DeckForge#ClosedBeta
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements👉DeckForge
DeckForge Meme Contest: Community Voting Begins
Over the past two weeks, you’ve shown incredible creativity, humor, and passion.
Today, we’re excited to reveal the Top 10 meme finalists — selected by the DeckForge team after reviewing hundreds of submissions.
Each of these entries captured the spirit of our community and the world of DeckForge in a unique way.
Now it’s your turn to decide.
Community voting is open for the next 48 hours.
📅 After the voting ends:
🔵We’ll publish the full leaderboard of the Top 250 participants
🔵Distribute all rewards based on the final results
And prepare for the next phase of community events
Thank you to everyone who participated, shared their work, and supported others.
We’re just getting started — and the best is yet to come.
➡️Pick your champion below. Decide who takes the crown.
Stay Forged.
#DeckForge#ClosedBeta
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements👉DeckForge
Meme Contest: Final Call!
The community brought the heat — and now it’s our turn.
This weekend, our team will begin selecting the best entries.
But it’s not over yet:
You can still submit your memes until Monday (June 30) 23:59 UTC.
If you haven’t joined — this is your last chance to enter the Top-250 leaderboard and win rewards!
On July 1, we’ll publish our Top-10 favorite memes, and let the community vote to decide the ultimate winners.
After that, we’ll:
🔵Drop the full leaderboard of the Top-250
🔵Distribute all prizes next week
🔵Announce new contests and events
And most importantly…
🔥 Launch the Closed Beta of DeckForge — our main mission ahead
Massive thanks to everyone who submitted, tagged, laughed and memed with us.
Let’s finish this chapter strong — and get ready for what’s next.
Stay Forged.
#DeckForge#ClosedBeta
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements👉DeckForge
DeckForge: What You Can Do Right Now
While the Forge is heating up behind the scenes, there are 3 key things every community member can do to prepare for the Beta:
🎟1. Claim Your Beta Ticket
Pre-register through our Telegram Mini App and secure your place before the gates close.
🛡️2. Get Your Discord Role = Founder Pass
Verified role = guaranteed Founder status and early access privileges.
Don’t miss this one — only available before Wave 1 launch.
🎭3. Submit a Meme for the DeckForge Meme Contest
Make us laugh. Win rewards. Get featured.
Top 250 memes will be rewarded, and the best will be immortalized in our socials.
Beta is closer than you think.
Tick these off now — because once the first wave starts, it’s game on.
Stay Forged.
#DeckForge#ClosedBeta
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements👉DeckForge
From the Forge #06: The Adventure Map is Ready🗺
We’ve finished the full logic behind the DeckForge adventure map — and it’s shaping up to be one of the key parts of the game.
🔵 Multiple paths
🔵 Shops, challenges, bosses
🔵 Rewards at every stage
Every route you take will offer something different — whether it’s a quick win or a riskier run for rare loot.
The map will be fully 3D, with animated effects and dynamic progression — you’ll actually feel like you’re moving through the world.
We’re now integrating it into the game.
More reveals coming soon.
Stay Forged.
#DeckForge#ClosedBeta
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements👉DeckForge
Community Update: Today’s the Day!
Big news, Forgers
🌟 Today we’ll announce the winners of our Telegram Giveaway!
100 lucky players will receive their share of 10,000 Telegram Stars
And that’s not all… – keep an eye on our announcements 👀
🔵 10,000+ players have now pre-registered for DeckForge!
You are officially part of something big.
🎮 Don’t forget to verify in Discord and claim your Pioneer role – this guarantees access to the Founder Pass and early game benefits.
💬 New social channels are coming this week, so stay close — more rewards, more quests, more chaos.
Let’s build this world together.
➡️Claim your ticket
Stay Forged.
#DeckForge#ClosedBeta
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements👉DeckForge
What’s Coming Before Launch?
Before you step into DeckForge, here’s what’s brewing behind the scenes
🔵 3D Adventure Map – explore your own route, gather resources, and shape your destiny
🔵 Collection UI – organize, enhance, and admire your evolving deck
🔵 Faction System – align with one of two core forces in DeckForge’s universe
🔵 NFT Mechanics – own, upgrade, and trade your cards across seasons
🔵 Metagame – refine materials, break down old cards, and craft powerful upgrades
🔵 Achievements – complete challenges and milestones for rare rewards
🔵 Base Joker Collection – a first look at unique Joker cards and visuals
🎁Community Quests & Giveaways – get ready for new ways to earn rewards before the official launch.
You’re still early — and early means advantage.
➡️Collect your ticket
➡️Grab the Pioneer role
Stay Forged.
#DeckForge#ClosedBeta
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements👉DeckForge
5,000+ Players Registered for the Closed Beta
DeckForge is heating up.
Over 5k players have already secured their spots — and the first wave is just around the corner.
Behind the scenes, our devs are pushing hard to bring the world of DeckForge to life.
The first wave of testers will be the pioneers — with real influence and real rewards.
🎁 Early access comes with perks:
🔵Exclusive rewards
🔵Founder-only items
🔵A head start before the public rush
🔵Long-term advantages in progression
We’re building something special — and you're part of it.
➡️Get your early access
Stay Forged.
#DeckForge#ClosedBeta
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements👉DeckForge
Beta Access Update — 4,000+ Players Registered
Over 4k players have already claimed their Tickets — and this is just the beginning.
More than 800 community members have joined our Discord and get the Pioneer role, giving them priority for the first wave of closed beta (and valuable rewards)
We’re launching a mini giveaway today to reward our most active Forgers.
🎁 Stay tuned — it’s going to be fast and simple.
Haven’t joined yet?
Claim your ticket in the bot & Get your Pioneer role on Discord — it takes less than a minute.
Tickets are limited. No second chances once the first wave goes live
Stay Forged.
#DeckForge#ClosedBeta
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements👉DeckForge
🚨Closed Beta Pre-Registration is LIVE
You asked for it — now it’s real.
DeckForge is opening its gates to the first wave of Beta testers.
Spots are limited. Rewards are real. Progress carries over.
🎁 Beta perks:
🔵 Early access
🔵 Exclusive cosmetics
🔵 Meta progression advantages
🔵 Special rewards for all players
Open the bot. Secure your spot.
Stay Forged.
➡️DeckForge Game
#DeckForge#ClosedBeta
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements