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

Резултати

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

Пребарај: #interview

当前筛选 #interview清除筛选
StartupBase

@startupbaseuz · Post #6742 · 23.01.2026 г., 11:40

#interview Lutfullo Tagoev, Smart Hub asoschisi va bosh direktori, post-COVID davrida paydo bo‘lgan g‘oyadan AI asosidagi onlayn ta’lim platformasi qanday tez rivojlanganini aytib beradi. Smart Hub odamlar va kompaniyalarga moslashtirilgan o‘quv dasturlarini yaratishda qanday yordam berishini, biznesni tez o‘stirish va O‘zbekiston bozoriga akseleratsiya dasturi orqali kirish tajribasini bo‘lishadi. DSA asosida IT Park Ventures tomonidan $50,000 miqdorida investitsiya taqdim etildi. — Lutfullo Tagoev, Founder & CEO of Smart Hub, shares how an AI-powered e-learning marketplace evolved from a post-COVID idea into a fast-growing international startup. He explains how Smart Hub helps individuals and companies build custom training programs, scale revenue, and enter new markets, including Uzbekistan, through acceleration support. An investment of $50,000 was provided under the DSA by IT Park Ventures. Telegram | Instagram | Facebook | Youtube | LinkedIn

Hashtags

StartupBase

@startupbaseuz · Post #6686 · 19.01.2026 г., 08:17

#interview Oneplace.HRasoschisi Xurelbaatar Bat-Orshix sun’iy intellekt va geymifikatsiya ishga qabul qilish va moslashishni qanday o‘zgartirayotgani, an’anaviy testlarni almashtirayotgani, HR vazifalarini avtomatlashtirayotgani va xodimlarni ushlab turishni kuchaytirayotganini gapirib berdi. 🏆 Xurelbaatar Bat-Orshix «Digital Startup Awards» dasturining “Akseleratsiya” trekida ishtirok etgan. Bugungi kunda u O‘zbekistonda ofis ochib, DSA dasturimiz orqali mamlakat bozoriga kirib kelgan loyiha sifatida faol rivojlanmoqda. 🚀 Shuningdek startap O’zbekistonda kengayish uchun IT Park Ventures fondidan 50 000 dollar sarmoya jalb qildi. — Oneplace.HRfounder Khurelbaatar Bat-Orshix spoke about how artificial intelligence and gamification are changing recruitment and adaptation, replacing traditional tests, automating HR tasks, and strengthening employee retention. 🏆 Khurelbaatar Bat-Orshix participated in the "Acceleration" track of the "Digital Startup Awards" program. Today, it is actively developing as a project that has opened an office in Uzbekistan and entered the country's market through our DSA program. 🚀The startup also attracted $50,000 from the IT Park Ventures Fund to expand in Uzbekistan. Telegram | Instagram | Facebook | Youtube | LinkedIn

Hashtags

StartupBase

@startupbaseuz · Post #6420 · 25.11.2025 г., 09:17

#interview Born in Samarkand and educated in South Korea and the United States, Sanjar Atamuradov is now building one of Silicon Valley’s most ambitious humanoid robotics platforms — Humanola. The startup uses telepresence to enable real-time robot control and transform human interactions into the training data required for physical AI. In his interview with IT Park Uzbekistan and The Tech, Sanjar discusses his journey from Samarkand to KAIST and Georgia Tech, the launch of Humanola after raising $2.5 million, and how the company addresses critical challenges in robotics by providing unified infrastructure for teleoperation and large-scale data generation. 📖 Read the full article to learn more: outsource.gov.uz Telegram | Instagram | Facebook | Youtube | LinkedIn

Hashtags

StartupBase

@startupbaseuz · Post #6412 · 25.11.2025 г., 09:17

#interview Samarqandda tug‘ilib, Janubiy Koreya va AQSHda ta’lim olgan Sanjar Atamuradov bugun Kremniy vodiysidagi eng ambitsiyali gumanoid robototexnika platformalaridan biri — Humanola’ni yaratmoqda. Startap teleishtirok texnologiyasi orqali robotlarni real vaqt rejimida boshqarish va inson harakatlarini jismoniy sun’iy intellekt uchun zarur o‘quv ma’lumotlariga aylantirish imkonini beradi. IT Park Uzbekistan va “The Tech” bilan intervyuda Sanjar o‘zining Samarqanddagi bolalikdan boshlab KAIST va “Georgia Tech”gacha bo‘lgan yo‘li, $2,5 mln investitsiyadan so‘ng “Humanola”ning ishga tushirilishi, shuningdek kompaniyaning teleoperatsiya va katta hajmli ma’lumotlar ishlab chiqarish uchun yagona infratuzilma taqdim etish orqali robototexnikadagi muhim muammolarni qanday hal qilayotgani haqida so‘zlab berdi. 📖 Batafsil ma’lumot uchun to‘liq maqolani o‘qing: it-park.uz Telegram | Instagram | Facebook | Youtube | LinkedIn

Hashtags

Press TV Shows

@PresstvPrograms · Post #5611 · 07.02.2026 г., 06:59

🔺 “This is the naivete of our European leaders” Former Italian ambassador Elena Basile expresses concern that Europe is backing violations of international law and regime changes, highlighting the naivety of its leaders. Watch in full #Interview @PresstvPrograms

Hashtags

Press TV Shows

@PresstvPrograms · Post #5606 · 06.02.2026 г., 18:29

🔺"European Parliament is far away from the European people" Elena Basile highlights the gap between the European Parliament and its citizens while criticizing its stance on regime changes in Iran and Russia. Watch in full #Interview @PresstvPrograms

Hashtags

Press TV Shows

@PresstvPrograms · Post #5601 · 04.02.2026 г., 04:40

🔺According to Former Italian ambassador Elena Basile, while Western diplomats are aware of the reality of Western hegemonic policies, they apply a form of self-censorship, because, as members of the diplomatic corps, they cannot contradict their governments. Watch in full #Interview @PresstvPrograms

Hashtags

Press TV Shows

@PresstvPrograms · Post #5596 · 03.02.2026 г., 10:20

🔺“We face a Western hubris without limits.” Former Italian ambassador Elena Basile says the wars from Iraq to Ukraine and Gaza reflect a long-running US-led imperial policy backed by Europe. Watch in full #Interview @PresstvPrograms

Hashtags

Press TV Shows

@PresstvPrograms · Post #5389 · 16.12.2025 г., 20:15

🔺“We should restore confidence and respect international law.” Belarusian deputy foreign minister Igor Sekreta says the international order is damaged but not destroyed, arguing that restoring trust, respect for international law, and new confidence-building mechanisms is the only path forward. #Interview @PresstvPrograms

Hashtags

Press TV Shows

@PresstvPrograms · Post #5388 · 16.12.2025 г., 18:42

🔺“Illegal migration is a problem that we could combat only together.” Belarusian deputy foreign minister Igor Sekreta says Belarus does not use migrants as leverage, stressing that illegal migration stems from hardship in countries of origin and must be addressed jointly through humane procedures and cooperation. #Interview @PresstvPrograms

Hashtags

Press TV Shows

@PresstvPrograms · Post #5387 · 16.12.2025 г., 17:33

🔺Minsk conference promotes Eurasian security dialogue Igor Sekreta says that continuous dialogue through inclusive formats, such as the Minsk conference, helps reduce misunderstandings, build awareness, and support Eurasian security without replacing existing international organizations. #Interview @PresstvPrograms

Hashtags

Press TV Shows

@PresstvPrograms · Post #5386 · 16.12.2025 г., 16:14

🔺Igor Sekreta says that the erosion of the Helsinki spirit, NATO expansion, and the collapse of the post–Cold War security architecture have weakened trust, which diplomacy must now restore. #Interview @PresstvPrograms

Hashtags

123•••10•••1314
ПретходнаСтраница 1 од 14Следна