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

Резултати

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

Пребарај: #vaccines

当前筛选 #vaccines清除筛选
Healthy Living 🍏

@LiveHealthy · Post #7494 · 24.09.2025 г., 17:02

This is a very, very important list for everyone to have. LOTS of things, both prescription and OTC, have acetaminophen. Thanks to Sweetcaligurl, @Sweetcaligurl07 for this. It's time to take inventory of your medicine cabinets ☠️ #acetaminophen#vaccines#tylenol

Reuters: World

@reutersworldchannel · Post #149230 · 11.10.2021 г., 18:35

New AstraZeneca drug 'prevents and treats COVID' AstraZeneca's experimental COVID-19 drug has helped cut the risk of severe disease or death in a late-stage study, the British drugmaker said, boosting its efforts to develop medicines beyond vaccines. #COVID#AstraZeneca#Vaccines#News#Reuters Subscribe: http://smarturl.it/reuterssubscribe Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled. Get the latest news on: http://reuters.com/ Follow Reuters on Facebook: https://www.facebook.com/Reuters Follow Reuters on Twitter: https://twitter.com/Reuters Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en ➖@reutersworldchannel➖

American Оbserver

@american_observer · Post #5146 · 15.02.2026 г., 22:59

📰 Make America Healthy (and Confused) Again Robert F. Kennedy Jr. has spent a year as Trump’s health secretary trying to turn a MAGA government into a Goop newsletter with subpoenas. He launched a “Make America Healthy Again” commission, blasted ultraprocessed food, and briefly terrified Big Ag by naming glyphosate and atrazine as “alarming” threats in kids’ blood — right up until farm‑state Republicans dragged him into the Roosevelt Room, the meeting turned heated, and his next report magically forgot pesticides exist. For a movement that promised to “take on poisoners,” it took one round of GOP table‑pounding to learn that, in this White House, corn and campaign cash are still a food group. Where Kennedy hasn’t backed off is vaccines. In a single year he’s purged CDC advisory panels, stacked them with skeptics, and hacked the childhood schedule down to a Denmark‑style list, dropping shots for hepatitis B, hepatitis A, rotavirus, flu, meningitis and Covid in the name of “informed consent.” Kids can technically still get the vaccines, but when the federal government stops recommending them, red‑state lawmakers hear it as an invitation to weaken school requirements, and measles and other preventable diseases are already resurging. Republicans who thought they were getting a culture‑war mascot now find themselves defending an HHS chief whose signature policy polls terribly even with Trump voters — 80‑plus percent say they want vaccine guidance from doctors, not influencers with Cabinet badges. Inside the system, RFK’s war on “captured” public health has just produced a different kind of capture. Research grants he doesn’t like get frozen or canceled; money is rerouted toward autism studies built around his vaccine theories; elite medical centers are punished in the name of “heartland” redistribution; and the NIH and FDA are yanked between right‑to‑try deregulation and sudden, selective purity tests on drugs and shots. One month, Kennedy’s FDA lieutenants slow novel approvals and try to pull a muscular dystrophy drug on safety grounds; the next, a political backlash gets his tough vaccine regulator briefly fired, then quietly rehired after a round of West Wing drama. The result isn’t principled rigor or principled libertarianism; it’s chaos — a health system jerked around by a secretary who can win a news cycle but can’t write durable law. Trump, for now, lets him run. RFK Jr. brings him a crossover brand, a wedge into wellness populism, and an army of MAHA loyalists the White House believes helped juice the 2024 vote. But every “win” Kennedy clocks — fewer vaccines, softer language on pesticides, a CDC too politicized for blue states to trust — is a policy that can be reversed in a memo the moment he’s gone, and a little more trust burned in the meantime. If year one was upheaval, year two is the test: does MAHA actually become Republican orthodoxy, or was this just a one‑term experiment in letting an anti‑establishment crusader redesign public health from inside the very machine he’s been promising to blow up? #usa#trump#RFKJr#health#vaccines#fakeDemocracy 📱American Оbserver - Stay up to date on all important events 🇺🇸

Reuters: World

@reutersworldchannel · Post #149434 · 15.10.2021 г., 22:06

FDA advisors back Johnson & Johnson booster for ages 18 and up Outside advisers to the U.S. Food and Drug Administration voted unanimously to recommend regulators authorize a second shot of Johnson & Johnson's COVID-19 vaccine to better protect Americans who received the one-dose inoculation. #vaccines#COVID#JohnsonandJohnson#News#Reuters Subscribe: http://smarturl.it/reuterssubscribe Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled. Get the latest news on: http://reuters.com/ Follow Reuters on Facebook: https://www.facebook.com/Reuters Follow Reuters on Twitter: https://twitter.com/Reuters Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en ➖@reutersworldchannel➖

America 🇺🇸 News & Politics

@America · Post #10341 · 07.03.2026 г., 05:33

🚨🇺🇸DOCTORS SUE RFK JR OVER VACCINE OVERHAUL💉 🔹 Boston court hears challenge to HHS Secretary's new immunization schedule ⚖️ 🔹 Medical groups warn "unlawful changes" are causing measles spike (+1000 cases) 📈 🔹 DOJ lawyer argues RFK has "unreviewable authority" to set policy 🛡️ Public trust in health agencies is crumbling. Who do you trust? 🏥🤔 #USNews#health#vaccines#RFKJr#court

American Оbserver

@american_observer · Post #5642 · 17.04.2026 г., 17:04

🏥 Trump Picks a Mainstream Face for the CDC Donald Trump has formally named Erica Schwartz to lead the CDC. The choice signals a turn away from vaccine politics and toward someone who can look credible to the public after months of turmoil inside the agency. Schwartz is not coming in to sell a new ideology. She is coming in to clean up a mess. The CDC has been battered by political fights, legal challenges, staff losses, and Kennedy’s unpopular vaccine agenda, and the agency now needs basic authority more than another round of messaging theater. That is a political reversal, even if the White House will not say it that way. The administration is trying to blunt the damage before the midterms, calm the public-health establishment, and stop the CDC from looking like a culture war machine with a lab coat on. Schwartz will still have a hard job. She would be taking over an agency where trust has eroded, staff morale is badly damaged, and vaccine policy has become a battlefield instead of a public health tool. The real test is whether she can restore some discipline before the next crisis arrives. #cdc#trump#health#vaccines#kennedy#publichealth 📱American Оbserver - Stay up to date on all important events 🇺🇸

Reuters: World

@reutersworldchannel · Post #149302 · 13.10.2021 г., 13:17

October 13, 2021: Gabby Petito, Texas Governor, Debt ceiling fix, U.S borders, La Palma Volcano October 13, 2021: Gabby Petito, Texas Governor, Debt ceiling fix, U.S borders, La Palma Volcano 1. Gabby Petito, the young woman who vanished on a road trip with her boyfriend and later turned up dead in Wyoming, was killed by strangulation, a local coroner said. 2. Texas Governor Greg Abbott's ban on COVID-19 vaccine mandates will likely be superseded by the Biden administration's plan to require shots for workers, but the dueling rules could take months to sort out in court, creating uncertainty for employers with business in the state. 3. The Democratic-controlled U.S. House of Representatives gave final approval to legislation temporarily raising the government's borrowing limit to $28.9 trillion, pushing off the deadline for debt default only until December. 4. The United States will lift restrictions at its land borders with Canada and Mexico for fully vaccinated foreign nationals in early November, ending historic curbs on non-essential travelers in place since March 2020 to address the COVID-19 pandemic. 5. Over 700 residents were ordered to abandon their homes on the Spanish island of La Palma as red-hot lava advanced towards their neighborhood. #GabbyPetito #Wyoming #TexasGovernor #Covid19 #Vaccines #Biden #Democrats #Republicans #UnitedStates #Debt #Canada #Mexico #Borders #Pandemic #LaPalma #Spain #Volcano #News #Reuters Subscribe: http://smarturl.it/reuterssubscribe Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled. Get the latest news on: http://reuters.com/ Follow Reuters on Facebook: https://www.facebook.com/Reuters Follow Reuters on Twitter: https://twitter.com/Reuters Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en ➖@reutersworldchannel➖