Что делать если нужно поставить какую-то 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
Our ecological partner @LumozOrg will start trading today on
@Bybit_Official. Let's look forward to it!
In the last month, three projects invested by us have successfully completed #TGE@PinGoAI@KIPprotocol and @LumozOrg.
We are growing rapidly, Long $UXLINK🚀
✨ DDAI Airdrop for all & Secrets will unfurl. Prepare your DDAI Requests The convergence is near,hurry up today
🥳#TGE this July
👉 Register here :- https://app.ddai.space/register?ref=Wcqav3n9
➖ Use your Google/Email
➖ Connect Sol wallet
➖ Complete task
➖ Add Extension ( use mises browser )
➖ Check in Daily
#Note :- Earn exclusive $DDAI airdrops by completing tasks. The more active you are, the greater your rewards!
✨ Airdrop MeyLand (Listed)
Reward :- Point & Token & NFT
Market :- MEXC, Coinmarketcap
Distribution date :- Q3, 2025 #TGE
👉 Airdrop Link :- https://meyland.mey.network/register?ref=YR5LJX
➖ Scroll down
➖ Connect wallet or Twitter
➖ Submit email and verify
➖ Register and Mint NFT Passport
➖ Complete Tour
➖ Click Hub and Get referral Code
#Note :- Click Sign in and register by your email then Mint Base Passport & MEY token already listed on MEXC, Uniswap and Coinmarketcap
✨ Official WizoLayer Airdrop is NOW LIVE! For All ( 6 Million raised )
🏆 Rewards :- $WIZO at #TGE
👉 Join Airdrop :- https://wizolayer.xyz?ref=4654980838
➖ Sign up with Google
➖ Connect Wallet ( Trust or Metamask wallets )
➖ Complete All Tasksm
➖ Start Mining
➖ If you need 2X mining rewards click on verify
➖ Deposit a small amount like 0.000045 (which will be refunded) of base ETH to the following address then click on the "Verify" button & Done
#Note :- Don't skip alredy $6 Million fund raised so join before end this opportunity hurry up 🥳🥳🥳
📦UXLINK PROJECT — MINT IS LIVE ✅
🖥Guess what's finally happening? After months of keeping tabs on it, UXLINK is gearing up for some major airdrops! Plus, mark your calendar, the Minting of their NFTs, the golden tickets for this event, just live!
=============================
❓Why should you care?
🔘TGE is right around the corner, so grab the chance to join in and maybe even get ahead!
🔘The next super social platform is about to emerge, are you following?
🔘 Based on the latest insights from the whitepaper, The maximum supply of $UXLINK governance tokens is 1 billion, 40% of which will be distributed to community users.
🔘 Data analysis, compared to similar social projects, $Cyber's current market capitalization is about $1 billion, #Farcaster's last round valuation has already reached $1 billion, UXLINK is projected to skyrocket past $1.5 billion, possibly even hitting $2 billion post #TGE📈 Which mean UXLINK >= 1-1.5USDT
=============================
🌐Website || ✈️Telegram || ✖️Twitter
=============================
💎Go to mint your NFT and get airdrop:
Update : Uxuy × Okx
✅Login : https://dapp.uxlink.io/uxtask/okx
✅ My Account > Withdraw Uxuy
✅ Fee ETH Arb
✅ Mint NFT With UXUY Token : https://dapp.uxlink.io/uxnft
=============================
💎Giveaway 5 WL for 5 people
➡️Join our Tg :https://t.me/uxlinkofficial2
🔴Note:Please do your own research (DYOR) before joining to any project, also projects are 100% free. Don't send any fee or penny for receiving any token.
To our incredible UXLINK community
We’ve received countless warm messages from you all—especially our Korean 🇰🇷 and Japanese 🇯🇵 family—following the news that #UXLINK wasn’t selected in Binance’s second batch vote-to-list campaign. While we share your disappointment, we’re deeply moved by your unwavering support.
🌐 In this world—especially in #Web3 are countless ways to measure success, and no single vote or outcome can capture the heart and hard work of what we’re building together. Different communities will always have different preferences, and that’s okay. Our focus remains unchanged: to stay true to our vision, grow stronger alongside the partners and supporters who believe in us, and keep pushing toward a more inclusive, innovative Web3.
🙏 To every community member, BNB holder, investor, partner, group leader, and KOL—THANK YOU❤️. Whether you cast a vote, shared our story, or simply stood by us: your belief in UXLINK fuels everything we do.
From day one of our nomination (yes, we found out with you via the official announcement), we’ve emphasized that milestones like #TGE or a @binance listing are just steps on our journey—not the destination. If a Binance listing comes later, we’ll welcome it when the time is right. For now, we’re more focused than ever on delivering the promises we’ve made: building infrastructure, growing our user base, and creating value for $UXLINK holders.
💪 Together, we’re far bigger than any single campaign or platform. Let’s keep moving forward—for each other, for Web3, and for the future we’re shaping.
Thank you for being part of this journey. Wishing you a wonderful weekend with your loved ones.
With gratitude,
UXLINK Community Lead & UXLINK DAO Committee member
🥳We are thrilled to announce that UXLINK has made strategic partnership with @LumozOrg
to build Social Growth Layer(SGL) together!
Our ecosystem fund @UFLY_Labs
will invest @LumozOrg and we will empower Lumoz social growth & business development globally especially in Japan and Korea market & community.
💰Lumoz native token $MOZ will be #TGE on CEXs soon and we will make ONE MILLION dollar value #Airdrops to qualified $UXLINK holders and stakers!
Lumoz is the leading Modular Compute Layer for ZK & AI. Lumoz uses PoW mining mechanism to provide computing power for Rollup, ZK-ML and ZKP verification.
Please stay tuned for our updates!❤️
🫡We're thrilled to announce our strategic partner @SonicSVM
- $SONIC #TGE is coming and spot listing will begin at 12:00 PM on January 7 (UTC) on @okx , @Bybit_Official , @Backpack and more CEXs.
👉SonicSVM is the first SVM network extension to launch on @solana
, for games and applications. It is powering the #Web3 TikTok application layer, working to attract the next billion users to web3. By establishing in-depth cooperation with SonicSVM, we look forward to jointly supporting a wider range of #TikTok users onboarding web3.
Stay tuned for more updates!💃
Set your alarm and look forward to it!⏰
Big thanks to OKX for the swift migration announcement! 🙌 Props to the team for their professionalism, transparent communication, and community-first approach with clear, structured suggestions. 🙏
All old UXLINK held by OKX exchange users will be swapped 1:1(deposit snapshot time: 2:55 pm UTC on September 22, 2025), while illegal tokens are being returned. More exciting events are on the way — stay tuned! 🚀
https://okx.com/en-sg/help/okx-to-support-uxlink-crypto-migration
#OKX#UXLINK#TGE
A big thank you to MessariCrypto for featuring #UXLINK in their report to mark our TGE Anniversary! 🎉
As the leading crypto market intelligence provider trusted by professionals worldwide, this shoutout means a lot.
Dive into the report here: https://messari.io/report/uxlink-tge-anniversary-and-token-performance?utm_source=twitter&utm_medium=organic_social&utm_campaign=pulse&destination=protocol_services_research
Grateful for the recognition—here’s to more growth ahead! #UXLINK#TGE#CryptoNews