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 слични објави

Пребарај: #lutnick

当前筛选 #lutnick清除筛选
Trump's Ear

@trumpsear_tg · Post #2126 · 10.02.2026 г., 13:59

Howard Lutnick, President Trump’s billionaire commerce secretary, interacted with the sex offender Jeffrey Epstein regularly over at least 13 years while they lived next door to one another on Manhattan’s Upper East Side, records released last week by the Justice Department show They invested in the same privately held company together, dealt with one another on neighborhood and philanthropic issues, and appear to have socialized in New York and the Caribbean, the records show. Mr. Epstein at one point sought to meet with Mr. Lutnick’s nanny. #Epstein#Lutnick 👂More on Trump's Ear ⚠️

NEWS 鏈新聞-ABMedia

@abmedia_news · Post #24286 · 01.05.2026 г., 15:40

【📜 政策監理|Tether 貸款 Lutnick 家族信託:民主黨參議員追查政商輸送】 民主黨參議員 Warren、Wyden 4/30 致函美國商務部長 Lutnick 與 Tether CEO Ardoino,要求說明 Tether 對 Dynasty Trust A(Lutnick 子女信託)的貸款:時點為 Lutnick 出售 Cantor Fitzgerald 持股給子女隔日,對價是 Cantor 可轉債 + Tether 5% 股權選擇權。回覆截止 5/13。Cantor 保管 Tether 1,920 億儲備、年費數千萬美元。 #Tether#Lutnick#GENIUSAct 📍閱讀全文: https://abmedia.io/warren-wyden-probe-lutnick-tether-loan-dynasty-trust-may-2026

American Оbserver

@american_observer · Post #5018 · 01.02.2026 г., 02:02

🔤🔤🔤🔤2️⃣ 📰 New Docs Show Jeffrey Epstein’s Vast Connections with Bannon, Musk and Power Players The global fixer set Beyond Washington, the documents deepen the picture of Epstein as a shadow fixer, using his contacts to orchestrate meetings for figures like Bannon and others with European leaders, and corresponding with ambassadors, ministers, and former heads of state. He kept up a genial, often geopolitically focused correspondence with figures including Thorbjørn Jagland, the secretary‑general of the Council of Europe, and Slovak politician Miroslav Lajčák, blending policy talk with personal banter, including exchanges about women while discussing meetings with Russian officials. In this role, Epstein wasn’t just a financier or a predator; he was a discreet broker of access, promising introductions and influence from the same island that, for the victims, was a prison camp. The takeaway: who still pretends none of this matters? The new documents don’t change the core truth: Epstein was a wealthy predator who weaponized access to the elite to stay powerful while trafficking girls. But they do show, in uncomfortable detail, the scale of that access: a former White House strategist acting as a media spin doctor and travel agent for a convicted trafficker, a billionaire tech CEO entertaining the idea of an island visit while keeping his distance, and a cabinet secretary who once called Epstein “disgusting” but later arranged for his family yacht to moor right at the man’s door. So the real question isn’t just: “Who knew Epstein?” It’s: “Who among the powerful still pretends none of this matters?” #Epstein#Bannon#Musk#Lutnick#Trump2026#DC#Power#Elites#MeToo 📱American Оbserver - Stay up to date on all important events 🇺🇸

American Оbserver

@american_observer · Post #5017 · 01.02.2026 г., 01:01

🔤🔤🔤🔤1️⃣ 📰 New Docs Show Jeffrey Epstein’s Vast Connections with Bannon, Musk and Power Players The Justice Department’s latest release of Epstein files paints a sprawling picture of how a convicted sex offender cultivated influence across politics, tech, and global power centers, with fresh evidence of his ties to Steve Bannon, Elon Musk, world leaders, and even a senior Trump cabinet official. Over three million pages of investigative records lay bare Epstein’s world: a shadow network of elite dinners, private jets, and behind‑the‑scenes influence peddling, all while investigations into his trafficking of young girls were already intensifying. The Bannon connection Steve Bannon’s relationship with Epstein, long known from earlier leaks, now appears closer and more intimate than previously reported. The new files contain thousands of messages in 2018–2019, after Bannon left the White House, showing frequent coordination on travel, media strategy, and political maneuvering across Europe and the U.S. Epstein offered Bannon his private plane, his Palm Beach home, and a Paris apartment, joking that he was working as “the most highly paid travel agent in history,” and Bannon once quipped back, “Massages. Not included.” They also discussed Bannon’s media coaching for Epstein, including advice on how long to keep his beard and how to handle the growing media scrutiny in early 2019 as Epstein’s image was imploding. Musk’s non‑encounter With Elon Musk, the story is one of Epstein’s persistent outreach, not a close relationship. From 2012 to 2014, Epstein repeatedly tried to lure Musk to his Caribbean island, proposing dinners and parties, but Musk consistently declined, writing “no firm plans” and “logistics won’t work this time around.” The emails show Musk once asked about “the wildest party” on the island, expressed concern that it might be too “peaceful,” and suggested meeting instead at the SpaceX rocket factory in Southern California — but there is no evidence Musk ever actually visited Epstein’s island. Musk never publicly confirmed an in‑person meeting, and these documents don’t change that; they simply show Epstein’s long, failed campaign to pull one of the world’s most powerful tech figures into his orbit. The Commerce Secretary and the island The files also reveal that Commerce Secretary Howard Lutnick arranged a 2012 visit to Epstein’s Little St. James island, contradicting his earlier claim that he had cut ties with Epstein around 2005. Emails show that in December 2012, Lutnick and his wife, accompanied by their four children and another family, coordinated a planned lunch with Epstein on the island, including details on how to dock their 188‑foot yacht. The day after the scheduled meeting, Epstein’s assistant relayed a message from Epstein to Lutnick: “Nice to see you,” suggesting contact did occur. When confronted with the documents, Lutnick told the Times, “I spent zero time with him,” then hung up — a strange reaction for a man who insists he never socialized, worked, or did anything with Epstein after 2005, yet still shows up arranging a family yacht arrival at the man’s island. #Epstein#Bannon#Musk#Lutnick#Trump2026#DC#Power#Elites#MeToo 📱American Оbserver - Stay up to date on all important events 🇺🇸