TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #210 · 3 фев.

Что делать если нужно поставить какую-то 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

Резултати

Пронајдени 5 слични објави

Пребарај: #ethiopianpride

当前筛选 #ethiopianpride清除筛选

## 🏔️ ETHIOPIAN HIGHLANDS VS SWISS ALPS: THE MOUNTAIN SHOWDOWN ## 🏔️ የኢትዮጵያ ተራሮች VS የስዊስ አልፕስ ⛰️ Time to settle this once and for all! --- ## 🇨🇭 SWISS ALPS PROS: Pretty postcards, chocolate, fancy resorts CONS: ❌ $300+/night hotels ❌ $8 coffee ❌ Overrun with tourists ❌ Zero human history --- ## 🇪🇹 ETHIOPIAN HIGHLANDS PROS: ✅ Where humanity learned to WALK! ✅ Gelada monkeys, Ethiopian wolves ✅ UNESCO Simien Mountains ✅ $20-50/night hotels ✅ $1 coffee ceremony ✅ Cliff monasteries ✅ 3.2 million years of history *ከሰው ልጅ መነሻ ተራሮች!* --- ## 📊 HEAD-TO-HEAD HISTORY: Cheese vs HUMAN EVOLUTION ✅ WILDLIFE: Cows vs Geladas & wolves ✅ HOTEL: $300 vs $20 ✅ COFFEE: $8 vs $1 ✅ CROWDS: Packed vs Undiscovered ✅ SCORE: Ethiopia 9 - Switzerland 2🏆 --- ## 💰 VACATION COST (1 week) SWISS ALPS: $3,356 💸 ETHIOPIAN HIGHLANDS: $557 🎉 SAVINGS: $2,799 (buy a car!) --- ## 🤔 THE VERDICT SWISS ALPS: "Look at our expensive hotels!" ETHIOPIAN HIGHLANDS: "We invented WALKING." 🚶‍♂️ --- ## 🏆 WINNER: ETHIOPIAN HIGHLANDS! 🇪🇹 Why? ✅ Witnessed human evolution ✅ 20x cheaper ✅ Unique wildlife ✅ Less crowded ✅ REAL coffee ✅ Marathon legends train here ✅ Gelada monkeys > cows *Switzerland is cool. Ethiopia is LEGENDARY.* 🔥 --- VISIT SIMIEN MOUNTAINS!🇪🇹⛰️ *Why be a tourist when you can be an EXPLORER?* ✨ #SimienMountains#EthiopianHighlands#SwissAlps#VisitEthiopia#BudgetTravel#UNESCO#EthiopianPride

⚡ ETHIOPIA: AFRICA'S ENERGY POWERHOUSE ኢትዮጵያ፡ የአፍሪካ የኃይል ማዕከል Not just surviving - POWERING the future! 🌍💪 ━━━━━━━━━━━━━━━━ ⚡ GRAND ETHIOPIAN RENAISSANCE DAM (GERD) ታላቁ የኢትዮጵያ ህዳሴ ግድብ 🏗️AFRICA'S LARGEST DAM: • 74 BILLION m³ capacity • 5,150 MW power • 175m high (57 floors!) • $5 billion - 100% Ethiopian-funded! 🇪🇹 • Status: OPERATIONAL ⚡ "የኢትዮጵያ ህዳሴ በኢትዮጵያውያን" (Ethiopian Renaissance by Ethiopians) ━━━━━━━━━━━━━━━━ 💡 WHAT IT MEANS ✅ Powers all Ethiopia + exports ✅ Sudan: flood control + steady flow ✅ Egypt: regulated water supply ✅ 100% renewable - ZERO emissions ✅ Lights millions of homes across East Africa "One dam lighting half of Africa"⚡🌍 ━━━━━━━━━━━━━━━ 🌱 100% GREEN ENERGY NATION Ethiopia's mix: • Hydropower: 95%+ • Wind: Growing fast • Solar: Huge potential • Coal & gas: ZERO ✅ World's cleanest energy grid!🌿 ━━━━━━━━━━━━━━━ 🔌 ENERGY EXPORT - "AFRICA'S BATTERY" Currently powering: • 🇸🇩 Sudan: 100+ MW • 🇩🇯 Djibouti: 60+ MW • 🇰🇪 Kenya: Ready! Future: South Sudan, Somalia, Eritrea, Egypt 💰 Billions in export income + regional peace "የኢትዮጵያ ኃይል የአፍሪካን ያበራል" (Ethiopian power lights Africa) ━━━━━━━━━━━━━━━ 👷 OPPORTUNITIES FOR YOUTH ⚡CAREERS: • የኤሌክትሪክ ምህንዲሶች (Engineers) • Dam operators • Renewable specialists • Grid managers 🎓 Training at Ethiopian Electric Power, universities, GERD site 💼 Thousands of jobs, high salaries, build the future! ━━━━━━━━━━━━━━━ 💚💛❤️ FUNDED BY ETHIOPIANS Every citizen contributed: • Salary donations • Diaspora bonds • Personal savings More than infrastructure - это символ единства и гордости! "ህዳሴ - የኢትዮጵያውያን ኩራት" (Renaissance - Ethiopian Pride) ━━━━━━━━━━━━━━━ 🌍 GLOBAL IMPACT Ethiopia proves: ✅ Renewable energy works at scale ✅ Africa can self-fund development ✅ Green growth possible ✅ Cooperation beats conflict The world watches - Ethiopia delivers!🌟 ━━━━━━━━━━━━━━━ ⚡ MORE COMING 🚀 Next projects: • Koysha Dam (2,160 MW) • Wind & solar expansion • Geothermal (Rift Valley) Ethiopia's energy future = UNLIMITED!💡 ━━━━━━━━━━━━━━━ 💡 MIND-BLOWING FACTS: 🤯 Reservoir takes 3 years to fill 🤯 Could power 300+ million people 🤯 12,000+ workers built it 🤯 10+ million m³ concrete 🤯 Already generating power! ━━━━━━━━━━━━━━━ ⚡ FROM WATER TO POWER 🌊 Part 1: Water = Life source ⚡ Part 2: Power = Future engine Ethiopian Renaissance by Ethiopians, for Africa!🇪🇹💪 The future is POWERED BY ETHIOPIA! 💡🌟 ━━━━━━━━━━━━━━━ 🌍 ETHIOPIA | ЭФИОПИЯ | ኢትዮጵያ 📱@ethiopia telegram #GERD#EthiopiaEnergy#GreenEnergy#AfricaPower#EthiopianPride#RenewableEnergy#PoweringAfrica

## 🦴 LUCY: MEETING HUMANITY'S 3.2 MILLION YEAR OLD GRANDMOTHER ## 🦴 ሉሲ - የሰው ዘር እናት 🌍 Where human history began - literally! In Addis Ababa lies a treasure that connects every person on Earth - Lucy (Dinknesh), the 3.2 million year old fossil that rewrote human history! 💫 ## 🏛️ NATIONAL MUSEUM OF ETHIOPIA 📍LOCATION: King George VI Street, Addis Ababa 🕐HOURS: Tuesday-Sunday, 8:30 AM - 5:30 PM (Closed Mondays) 💵ENTRY FEE: - Foreigners: 100 ETB (~$1.80) - Ethiopians: 10 ETB - Photography: +50 ETB 📸PRO TIP: Visit weekday mornings (9-11 AM) for fewer crowds! ## 🦴 LUCY - DINKNESH (ድንቅነሽ) *"You are wonderful" in Amharic* ✨DISCOVERED: November 24, 1974, Afar Region ✨AGE: 3.2 million years old ✨SPECIES: Australopithecus afarensis ✨SIGNIFICANCE: 40% complete - most complete early human ancestor ever found! ✨HEIGHT: 1.1 meters - small but mighty! ## 🌟 WHY LUCY CHANGED EVERYTHING Lucy proved our ancestors walked upright BEFORE developing large brains! She literally rewrote anthropology textbooks! 📚 ## 🏛️ MUSEUM HIGHLIGHTS ✨ Lucy's iconic skeleton display ✨ Ancient royal crowns and thrones ✨ Emperor Haile Selassie's throne ✨ Traditional Orthodox Christian art ✨ Artifacts spanning 3 million years ## 💡 HOW TO GET THERE 📍 Taxi from Meskel Square: 15-20 min, ~150-200 ETB 📍 Walking from Piazza: 25 minutes 📍 Blue taxi: 10 ETB (ask for "National Museum") ## 🌍 LUCY'S STORY 🇷🇺 Soviet paleontologists collaborated with Ethiopian researchers in 1970s-80s, helping establish Ethiopia's paleontological research! 🌎 Lucy traveled to USA (2007-2013) where 3 million people visited! She safely returned home to Ethiopia! 🇪🇹 ## 🌟 FOR YOUNG ETHIOPIANS This is YOUR heritage! Lucy proves human history STARTED in Ethiopia! Let this inspire you to: ✨ Study paleontology & archaeology ✨ Become museum professionals ✨ Share Ethiopia's story globally ## 💫 THE MESSAGE Ethiopia isn't just beautiful landscapes - it's where HUMANITY began! Every person on Earth can trace ancestry back to Ethiopia! --- Visit Lucy. Know your heritage. Share your pride!🇪🇹❤️ *Where humanity's journey began, Ethiopia's future shines brightest!* ✨ #LucyEthiopia#ሉሲ#NationalMuseumEthiopia#AddisAbaba#CradleOfHumanity#EthiopianHeritage#Dinknesh#VisitEthiopia#EthiopianPride

Red Nile

@rednile12 · Post #11124 · 01.03.2026 г., 15:25

🇪🇹Adwa at 130: A Victory That Shaped a Continent By: Alexander Yoh. / @rednile12 On March 1, 1896, Ethiopia achieved the impossible—defeating Italy and sending shockwaves through colonial powers. Adwa wasn’t just a battle; it was a statement: Africa can defend its sovereignty. Today, Adwa’s legacy is a blueprint for the future—unity across diversity, strategic independence, and self-reliance. From Menelik II’s brilliant leadership to Ethiopia’s modern projects like the Grand Renaissance Dam, the message is clear: our strength is in standing together and shaping our destiny. 📖 Read the full story here: Adwa’s 130-Year Legacy #የጥቁር_ህዝብ_ኩራት#ዓድዋ_130 #የኢትዮጵያውያን_ድል#Adwa130#EthiopianPride#AfricanUnity#Sovereignty#MenelikII#TaytuBetul#RedNileMedia#AfricanResilience#AdwaLegacy#SelfReliance

Red Nile

@rednile12 · Post #11074 · 27.02.2026 г., 12:30

🎙️WEEK 17 | LIVE DISCUSSION ⚔🛡My Generation & Adwa Reflecting on the 130th Anniversary of the Victory of Adwa In honor of the 130th Anniversary of the Victory of Adwa, celebrated on Yekatit 23, 2018 (E.C.), we invite you to a powerful and timely conversation on legacy, identity, and national consciousness. Tonight, on the Ethiopia First Telegram Channel, we will discuss, reflect, and critically engage on what Adwa means for our generation — and why it still matters today. Be part of this historic dialogue. 📅February 27, 2026 🕗8:00–10:00 PM (EST) | 2:00–4:00 PM (Ethiopia Time) 🎙️Host: Ethiopia First 🗣️Guest: Alexander Yohannes — Red Nile Media 🔗Join Live:https://t.me/+AAE_Pc8aWTczYTA0 — #Adwa130#VictoryOfAdwa#AdwaAnniversary#MyGenerationAndAdwa #EthiopiaFirst#RedNileMedia#EthiopianHistory#AfricanVictory #PanAfricanLegacy#Yekatit23#EthiopianPride#AdwaSpirit#EthiopiaRising