Что делать если нужно поставить какую-то 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
#Op_ed: Deluge, Defense, and Demolition: Themes in PM Abiy’s #AAU lecture
In this op-ed, Ezekiel Gebissa argues that Prime Minister Abiy Ahmed’s first address to Addis Ababa University, delivered during its 75th anniversary, fell far short of expectations for a vision grounded in “intellectual freedom and scholarly rigor.” Instead, he writes, “It became a political performance that redefined intellectual life in state-friendly terms, insulated executive power from criticism, and practically diminished the country’s most important academic institution.”
By narrowly defining intellectuals as rational, non-dissenting problem-solvers, the prime minister implicitly cast critics as “anti-intellectual.” This, Ezekiel contends, was “not a philosophical clarification; it was a normative directive” privileging compliance over critique.
https://addisstandard.com/?p=54802
#Op_ed: Silence of Scholars, Absence of Intellectual Freedom: Hypocrisy, moral vacuum in PM Abiy’s #AAU lecture
A few weeks ago, Prime Minister Abiy Ahmed delivered a lecture titled “Who Is an Intellectual?” at Addis Ababa University’s 75th anniversary. Jawar Mohammed argues the lecture must be assessed against #Ethiopia’s stark realities: “seven years of devastating conflict, eroded academic freedom, and a public discourse reshaped by war.”
He notes that “Intellectual life has been increasingly subordinated to the imperatives of conflict,” with dissenting scholars facing harassment, exile, or silence, while regime-aligned voices dominate media, framing war as “purification” or “historical destiny.”
The author emphasizes that “Absent a candid reckoning with the damage inflicted by years of conflict, appeals to intellectual responsibility, however eloquent, will remain symbolically significant yet substantively inadequate.”
https://addisstandard.com/?p=54676
#Commentary: Politics of Performance: #Ethiopia’s education crisis, PM Abiy’s ‘intellectual’ puzzle
In this commentary, Seife Tadelle analyzes Prime Minister Abiy Ahmed’s lecture delivered on 02 January 2026 to mark the 75th anniversary of Addis Ababa University (#AAU). While acknowledging its “ambitious scope and engaging tone,” he argues that “Who Is an Intellectual?” exposed “a notable methodological limitation.”
Seife notes, “Over the hour-long presentation, no sources, theoretical frameworks, or empirical references were cited,” a gap that weakens its academic credibility, “particularly within a university setting where scholarly rigor is foundational.”
More troubling, the author contends, was the marginalization of Ethiopia’s own intellectual heritage. “The omission of figures such as Zera Yacob, Gebrehiwot Baykedagn, Saint Yared, and Kebede Mikael risks erasing historical continuity,” thereby weakening the cumulative nature of scholarship.
https://addisstandard.com/?p=54522
MRI machine at #Ethiopia’s largest referral hospital Tikur Anbessa out of service for over five years, #AAU says
Addis Ababa University’s College of Health Sciences has disclosed that the Magnetic Resonance Imaging (#MRI) machine at #Tikur_Anbessa Specialized Hospital has been nonfunctional for more than five years, placing significant strain on patients seeking advanced diagnostic services.
The College’s Chief Executive Director, Dr. Abdurazaq Ahmed, told state media the prolonged shutdown has created a heavy burden on patients referred to the hospital for specialized care, particularly those requiring advanced imaging as part of diagnosis and treatment.
According to Dr. Abdurazaq, the high cost of procuring and installing an MRI machine has limited the hospital’s ability to address the problem using its own resources. However, he noted that efforts are underway to resolve the issue...
https://web.facebook.com/AddisstandardEng/posts/pfbid0MCKkrSrm9AWaqkk1U2r365Sc9dRR7CPpYdNFP5WbPktZVDUv2nVKLaAVw1Y1Eee1l
CVMA Student Wins Top Prize in Human Rights Essay Competition
December 10, 2025 – Addis Ababa, Ethiopia
In celebration of International Human Rights Day 2025, the Center for Human Rights, in collaboration with the UN Human Rights Office (OHCHR), has announced the winners of its essay competition titled “Our Everyday Essentials: Reclaiming Human Rights in the 21st Century.”
We are proud to announce that Yared Ermiyas, a student from the College of Veterinary Medicine and Agriculture at Addis Ababa University, emerged as the first-place winner. His powerful essay, “Remove the Shadow,” eloquently argued that access to education must be a fundamental necessity for every child, not a matter of luck, highlighting the deep emotional and practical connection between education and a dignified life.
Yared was awarded a mobile phone prize presented by H.E. Berhanu Adello, Chief Commissioner of the Ethiopian Human Rights Commission (EHRC). Commissioner Adello also extended an offer for Yared to begin an internship attachment at the National Bureau of the Human Rights Commission, providing a valuable opportunity for practical experience in the field.
The awards ceremony featured a dynamic panel discussion where Yared and the other winners presented their essays and engaged with fellow students and audience members on critical issues related to freedom of expression and the right to education.
The competition, which invited undergraduate students to reflect on the core human rights that shape our daily lives, successfully inspired thoughtful dialogue and showcased the intellectual talent within our university community.
Congratulations to Yared Ermiyas and all the participants for raising your voices, sharing your vision, and helping to shape the future of human rights!
Via Hailu Beyene
CVMA Student President
@campus_Voice_2016
#OurEverydayEssentials#HumanRightsDay2025#StudentVoice#AAU#CVM#Congratulations