Что делать если нужно поставить какую-то 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
🎙Address by Aleksandr Pankin at G20 Development Working Group Ministerial Meeting on illicit financial flows (IFFs) and social protection
📍Skukuza, July 25, 2025
💬Aleksandr Pankin: We extend our gratitude to South African friends for a well-thought choice of topical issues. Illicit financial flows and social protection represent major present-day challenges.
As part of the implementation of the #SDGs we promised to focus the efforts on human needs, “make sure nobody is left behind”. A task was set to eradicate the inequality in development level between the countries. In this context, partnership between the donors and recipients and the reform of world economic institutions in favour of developing states are in our focus.
We acknowledge with regret that strategic targets have not been implemented into practical results. Certain positive developments of recent years, by that I mean the rise of the multipolar world and emergence of new centres of growth such as #BRICS, faced the confrontational position from the West.
Dominating elites leave fair economic competition in the past. Instead world’s economic system turns into an arena for confrontation, blackmailing, dictate and political pressure. <...>
Achieving SDGs benchmarks by 2030 apparently stumbles, progress forecasts are most discouraging. African countries are among the most vulnerable. Former colonizers are trying to restore their dominance on the continent with new methods – through deepening dependence on donor aid and enslaving loans.
The volumes of so-called “aid” that reach the states in need are significantly lower than the losses caused by illicit financial flows (IFF). According to UNCTAD, in Africa the IFFs reach 50-90 billion USD yearly, while donor funding is no more than 60-65 billion USD. <...>
☝️We consider combatting the IFFs as key element of world economic stability. <...>
The IFFs can only be successfully countered through fair and open international cooperation, including in the areas of taxation and anti-corruption. A particular impetus should be given to the retrieval of assets.
❌ However, the West is persistently politicizing relevant multilateral formats, thus undermining cooperation. Biased anti-Russian steps of suspending Russia’s membership in FATF and Egmont Group disrupted the integrity of global network of combatting the money laundering and rendered a number of international financial investigations impossible. The EU is ready for plain pillage – seizing foreign sovereign financial assets frozen in their jurisdiction.
The world majority needs to bolster its financial independence, establish control over capital circulation by reducing the dependence on unreliable Westcentric financial architecture.
Promising initiatives are being discussed in BRICS, including those on cross-border payments and joint depository, payment and clearing infrastructure (BRICS Clear). We shall continue to strengthen the sovereignty of Global South in all aspects. <...>
Due to lack of a system of equal access to benefits, dependence of Global South on Western donor aid is increasing, while the volumes of external assistance are dwindling – they are reallocated for military spending, under the pretext of imagined threats, and for fuelling the conflicts. This is also the case for international development banks: while during the pandemic the World Bank allocated 12.5 billion USD as emergency funds for social welfare, at the same time, since February 2022, it granted astronomical 81 billion USD to Ukraine.
❗️Development aid must be depoliticized, predictable and based on national priorities of the recipients. Setting out various pre-conditions for recipients of funds, including questionable climate and gender aims, is unacceptable. Social protection is a long-term investment into the future.
🇷🇺 Russia is ready to share with all partners its expertise in building the national social welfare system and mobilizing tax revenues, including advanced digital solutions.
Read in full
#G20SouthAfrica
Green University Students Awarded UAEU–Green University SDGs Research Grants
👏Yesterday, Green University recognized its students who were awarded grants under the UAEU–Green University SDGs Research Program.
🎓As a result of their outstanding research proposals, five joint projects received funding in the following priority areas:
🟢Sustainable food innovation
Climate resilience
🔵AI-based education on climate and food systems
🔴Food waste reduction
Residential energy efficiency
🏆Grant winners from Green University:
Komila Khamraeva, Adelina Kalandarova, Rustambek Elmurodov, Jamoliddin Ko’ziboev, Kamronbek Mirzaev, Nasiba Negmatullaeva, Saodatxon Baxtiyorova, and Farzona Danayeva.
#GreenUniversity#SDGs#StudentAchievement#ResearchGrants#Sustainability
✉️[email protected]
☎️ +998 55 512 00 77
📍Location
🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube
🇦🇪Green University Strengthens Partnership with UAE
🗓On November 26, Green University welcomed a delegation from the UAE led by Khalid Alhabi. The meeting focused on expanding cooperation in ecology, climate change, scientific research and international projects.
✔️Within the UAE–Green University SDGs Research Program, our students and professors actively took part in the 2025 grant competition — and several Green University projects successfully secured funding!
Funded projects include:
⏺Sustainable food innovation through microbial nanocellulose
⏺Drone-based terrain analysis for SDG monitoring
⏺AI-powered climate and food systems education
⏺Reducing food waste in commercial sectors
⏺Improving thermal efficiency of housing
#GreenUniversity#UAEU#SDGs#ClimateAction#Sustainability#InternationalCooperation
✉️[email protected]
☎️ +998 55 512 00 77
📍Location
🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube
Toshkent Kimyo Xalqaro Universiteti rasmiy ravishda Birlashgan Millatlar Tashkilotining Akademik Hamkorlik Tashabbusi (UNAI) a’zosi bo‘ldi! 🎓🌐
🟨 Shuni faxr bilan ta’kidlaymizki, biz ushbu nufuzli global tashabbusga qo‘shilgan O‘zbekistondagi birinchi xususiy oliy ta’lim muassasasi hisoblanamiz!
Bu global tashabbusga qo‘shilish orqali universitetimiz endilikda dunyo bo‘yicha oliy ta’lim muassasalarining nufuzli tarmog‘ida o'rin egalladi. Ushbu tarmoq BMTning Barqaror Rivojlanish Maqsadlari (SDG), global fuqarolik, inson huquqlari va barqaror rivojlanishga sodiqligini qo‘llab-quvvatlaydi.
🤝 Bu yutuq bilan biz quyidagi ustuvor yo‘nalishlarga sodiqligimizni namoyon qilamiz:
✅ Ilmiy-texnik rivojlanish
✅ Innovatsiyalar va tadqiqotlar
✅ Jamiyat oldidagi mas’uliyat
✅ Ta’lim orqali adolatli va barqaror kelajak barpo etish
UNAI jamoasiga va universitetimiz rahbariyatiga ushbu yutuq uchun chuqur minnatdorchilik bildiramiz! 🚀
#UNAI#KIUT#UNAcademicImpact#GlobalEducation#SDGs
☀️ “Ziyo Forum” yoshlar markazida BMT kuni munosabati bilan “Youth United for the UN Day: Empowering Sustainable Future” sessiyasi bo‘lib o‘tdi!
🇺🇳27-oktabr kuni “Ziyo Forum” yoshlar markazida yoshlar uchun ilhomlantiruvchi sessiya tashkil etildi. Tadbir davomida Alisher Asrorov— UNODC Youth Network Leader in Uzbekistan, Webster Universitetining Career & Business Development menejeri va sobiq BMT Yoshlar Kengashi raisi — BMTning O‘zbekistondagi faoliyati, Barqaror Rivojlanish Maqsadlari (SDGs) hamda yoshlarning global tashabbuslardagi o‘rni haqida o‘z tajribasi asosida so‘zlab berdi.
📌Ishtirokchilar ochiq muloqotda faol qatnashib, “Kahoot” viktorinasida o‘z bilimlarini sinovdan o‘tkazishdi. Tadbir yakunida eng faol yoshlarga maxsus sovg‘alar topshirildi va umumiy suratga tushildi.
🌍Sessiya iliq va ilhomlantiruvchi muhitda o‘tib, yoshlarni global fikrlash va barqaror kelajak sari ilhomlantirdi.
📸 Barcha suratlarni quyidagi havola orqali ko‘rishingiz mumkin:
👉https://disk.yandex.ru/d/1A8GU1Uc6bujhg
☀️ “Youth United for the UN Day: Empowering Sustainable Future” session was successfully held at Ziyo Forum Youth Center!
🇺🇳On October 27, a special and inspiring session took place at the Ziyo Forum Youth Center. Alisher Asrorov— UNODC Youth Network Leader in Uzbekistan, Career & Business Development Manager at Webster University, and former Chair of the UN Youth Advisory Board — shared his insights on the UN’s role in Uzbekistan, the Sustainable Development Goals (SDGs), and the importance of youth participation in global initiatives.
📌Participants actively engaged in open discussions and tested their knowledge through the interactive Kahoot quiz. The most active attendees received special gifts, and the event concluded with a group photo.
🌍The session took place in a warm and inspiring atmosphere, motivating young people to think globally and contribute to a sustainable future.
📸 Check out all the event photos at the link below:
👉https://disk.yandex.ru/d/1A8GU1Uc6bujhg
#ZiyoForum#UNDay#YouthEmpowerment#SustainableFuture#UNUzbekistan#SDGs#YouthCenter