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

Резултати

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

Пребарај: #sei

当前筛选 #sei清除筛选
American Crypto©

@americancryptotrading · Post #27568 · 25.03.2026 г., 11:03

🇺🇸#SEI/USDT has found support at the lowerborder of the descendingchannel on the 3D timeframe👀 Looks good for the midterm✈️ American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27532 · 12.02.2026 г., 09:45

🇺🇸#SEI/USDT is currently consolidating inside the descendingchannel formation on the 3D timeframe👨‍💻 Accumulate before the rocket takes off📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27495 · 07.01.2026 г., 11:51

🇺🇸#SEI/USDT is holding above the lowerboundary of the descendingchannel formation on the 3D timeframe💁‍♂️ Strong upside potential on a bounce🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27414 · 22.10.2025 г., 08:58

🇺🇸#SEI/USDT is consolidating inside the descendingchannel pattern on the 3D chart🧐 A breakout will bring a huge rally🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27360 · 30.08.2025 г., 08:46

🇺🇸#SEI/USDT has retested the s/rzone on the 2D timeframe👀 Time to bounce and rally🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27163 · 22.02.2025 г., 12:16

🇺🇸#SEI/USDT is facing the upperborder of the fallingwedge formation on the daily chart🔍 Bullish case if we break above the one🚀 American Crypto©

Hashtags

Bitcoin Bullets®

@bitcoinbuliets · Post #14217 · 10.05.2026 г., 20:05

#SEI Market Analysis SEI/USDT showing strong bullish momentum with price near the upper Bollinger Band and MACD confirming upward trend. RSI above 76 signals overbought conditions but doesn't negate short-term strength. Holding above 0.0591 supports continuation toward resistance at 0.0620. Bear case triggers below 0.0585, risking a deeper pullback to key supports near 0.0579. Watch 0.0591 as the pivot for bulls and bears. --- ➖➖➖➖➖➖➖ Bitcoin Bullets® Trading

Hashtags

Bitcoin Bullets®

@bitcoinbuliets · Post #14146 · 09.05.2026 г., 20:05

#SEI Market Analysis SEI/USDT showing strong bullish momentum with MACD confirming upside and RSI stretched near 74 signaling overbought conditions. Price hugging the upper Bollinger Band suggests continuation but warns of a short-term pullback. Bull case: Hold above 0.0586 to target 0.0620 and beyond. Bear case: Break below 0.0575 risks deeper correction toward 0.0550. Key level to watch: 0.0586 support. --- ➖➖➖➖➖➖➖ Bitcoin Bullets® Trading

Hashtags

Bitcoin Bullets®

@bitcoinbuliets · Post #13522 · 22.04.2026 г., 20:03

#SEI Market Analysis SEI/USDT holding a strong bullish structure with MACD confirming momentum and RSI pushing into overbought territory near the upper Bollinger Band. Price is well above key supports, showing solid demand on dips. Bull case: Hold above 0.055, targeting a test of 0.059 resistance. Bear case: Lose 0.054 support, risk deeper pullback toward 0.05385. Watch 0.055 closely for trade direction. --- ➖➖➖➖➖➖➖ Bitcoin Bullets® Trading

Hashtags

Bitcoin Bullets®

@bitcoinbuliets · Post #13511 · 22.04.2026 г., 04:03

#SEI Market Analysis SEI/USDT is in a weak bearish trend but shows short-term bullish signals with MACD turning positive and RSI near 61. Price is testing resistance near 0.056 and trading close to the upper Bollinger Band, indicating potential exhaustion. Bull case: hold above 0.056, targeting 0.059 for a relief bounce. Bear case: lose 0.055 and risk a deeper pullback toward the 0.053 support zone. Key level to watch: 0.056. --- ➖➖➖➖➖➖➖ Bitcoin Bullets® Trading

Hashtags

Bitcoin Bullets®

@bitcoinbuliets · Post #13219 · 04.04.2026 г., 04:09

#SEI Market Analysis SEI/USDT shows a weak bearish structure with price hovering near resistance at 0.05496 and RSI steady around 54. MACD is bullish and price trades in the upper half of the Bollinger Bands, signaling potential short-term strength. Bull case: hold above 0.05375 to target 0.05558 resistance. Bear case: lose 0.0509 support and risk a deeper pullback toward 0.0486. Key level to watch: 0.05375. --- ➖➖➖➖➖➖➖ Bitcoin Bullets® Trading

Hashtags

Bitcoin Bullets®

@bitcoinbuliets · Post #13215 · 03.04.2026 г., 20:09

#SEI Market Analysis SEI/USDT shows a weak bearish structure but MACD is turning bullish, signaling potential short-term strength. Price is near the upper Bollinger Band with RSI around 59, indicating room to run but also caution for a squeeze. Bull case: hold above 0.05496 for a push to 0.05595 resistance. Bear case: lose 0.0509 support and risk a deeper drop to 0.0486. Key level to watch: 0.05496. --- ➖➖➖➖➖➖➖ Bitcoin Bullets® Trading

Hashtags

ПретходнаСтраница 1 од 3Следна