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

Резултати

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

Пребарај: #silver

当前筛选 #silver清除筛选
Wolf of Trading®

@wolfoftrading · Post #6029 · 13.03.2026 г., 19:28

Silver just dropped below $80! The largest on-chain#silver short, 0x007d, holds 148,359 xyz:SILVER ($11.88M) and is now up $2.23M.

Hashtags

🔅SILVER Is Very Bearish! Sell!📉 - - - - - - - - Please, check our technical outlook for 📊SILVER. The price is testing a key resistance 5,871.4. Taking into consideration the current market trend & overbought RSI, chances will be high to see a bearish movement to the downside at least to 5,754.1 level. - - - - - - - - #freesignal#silver - - - - - - - - 🌐Free Copy Trading: Link 📲Join VIP via Bot:Link ❓Official Contact:@signalprovidercontact

🔅SILVER Will Move Higher! Long!📈 - - - - - - - Please, check our technical outlook for 📊SILVER. The market is trading around a solid horizontal structure 5,642.3. The above observations make me that the market will inevitably achieve 6,175.7 level. - - - - - - - - #freesignal#silver - - - - - - - - 🌐Free Copy Trading: Link 📲Join VIP via Bot:Link ❓Official Contact:@signalprovidercontact

🔅SILVER Will Grow! Long!📈 - - - - - - - Here is our detailed technical review for 📊SILVER. The market is testing a major horizontal structure 5,240.5. Taking into consideration the structure & trend analysis, I believe that the market will reach 5,614.1 level soon. - - - - - - - - #freesignal#silver - - - - - - - - 🌐Free Copy Trading: Link 📲Join VIP via Bot:Link ❓Official Contact:@signalprovidercontact

PRICE ACTION EXPERT

@priceactionexpert · Post #8861 · 23.03.2026 г., 11:27

https://x.com/priceactiongann/status/2036042034608509042?s=20 #silver Silver one of the major prices encoded holds 63.00 to 62.00 intermarket cycles can range in between and if price further breaks down only will take it down deeper #gold one market cycle is one way and finding cycles in both and relating them can give further confirmations 1.speed is very fast and volatile in one direction almost risk is on sentiment 2. gold also reaches 4090 and 4320 which coincides with silver 63 which is 9x7 3.both bounces and forms low which gives further delay on this current sell trend 4.more downsides should break this low further and gold current low near 4090 5.when end of intermediate cycles it forms such levels and we use them and combine to deduce more than what to do and what not to do 6. in this case what should not be done is clear as one part is done, we cannot keep looking for further down unless low is broken again 7.knoweldge with proper understanding of cycles is key to all when in slight doubt in one direction i avoid and be cautious Always study and confirm it never trade on hope and fear when not clear avoid and study further there is opportunity always save your capital is your first rule.

Hashtags

PRICE ACTION EXPERT

@priceactionexpert · Post #8853 · 19.03.2026 г., 14:28

#gold Massive drop can happen! Gold dropped and broken 4631 and went down and again comes back to retest So there would be a high and massive drop can come from here if this level holds #silver retest should be at 69.5 which is current price both Drop can take to 63 to 64 if this high holds Watch out here ! Just follow the intensity until the price goes up as within the above region of 4675. https://x.com/priceactiongann/status/2034636669102735711?s=20

Hashtags

PRICE ACTION EXPERT

@priceactionexpert · Post #8841 · 13.03.2026 г., 15:49

https://x.com/priceactiongann/status/2032484028490948913?s=20 #Gold Gold from 5225 top cycle it's been anchored to drop from there dropping nicely so far next drop was hinted at 5120 and it's where exactly it formed high and retest also accurate to the point there only 5121.00 drops on top to 5080 and next 5050 done with slight bounce confirming the levels breaking further lows next can to 5000 and 4949 only use studies and analysis and combine with yours use multiple confluences side by side and combine with silver cycle #silver levels are key, use that too and check both instruments where the levels meet and use those for our advantage always Its all-pure maths and geometry only! Do share and repost max so many can benefit. thanks.

Hashtags

123•••78
ПретходнаСтраница 1 од 8Следна