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

Резултати

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

Пребарај: #edps

当前筛选 #edps清除筛选
AI & Law

@ai_and_law · Post #670 · 02.10.2025 г., 07:04

🇪🇺Human Oversight in Automated Decision-Making: EDPS Weighs In The European Data Protection Supervisor (EDPS) has released a new TechDispatch examining the role and limits of human oversight in automated decision-making technologies (ADMT). The report highlights both the necessity of human involvement and the risks of overestimating its effectiveness. While oversight is often seen as a safeguard against bias, misclassification, and opacity in ADM systems, the EDPS warns that inserting humans into the process does not automatically guarantee fairer or safer outcomes. The paper underscores that flawed assumptions about human involvement can lead to weak or symbolic oversight, risking harm to individuals and undermining fundamental rights such as privacy, non-discrimination, and due process. For oversight to be meaningful, it must be carefully designed, accounting for the complexities of human-machine interaction and ensuring accountability remains with system providers and deployers. The EDPS calls for structured approaches that align oversight practices with ethical standards, societal values, and democratic principles. #AIRegulation#FundamentalRights#EDPS

AI & Law

@ai_and_law · Post #704 · 18.11.2025 г., 08:04

🇪🇺EDPS Releases New Guidance on AI Risk Management for EU Institutions The European Data Protection Supervisor has issued guidance designed to help data controllers assess risks when developing, procuring, or deploying AI systems. Although targeted at EU institutions, offices, and agencies, the document also serves as a practical reference for private organizations aiming to align AI practices with existing data protection obligations. The guidance outlines a structured approach to risk management methodology, emphasizes AI life cycle oversight, and integrates interoperability considerations. It also examines specific categories of risk and pairs them with corresponding technical mitigation measures — offering a clearer operational pathway for organizations working to embed data protection into AI governance. #AI#Law#AIGovernance#EDPS#DataProtection

AI & Law

@ai_and_law · Post #326 · 10.06.2024 г., 07:04

EDPS Issues Guidance on Data Protection for Generative AI Systems The European Data Protection Supervisor (EDPS) has released new guidance on ensuring data protection compliance when using generative AI systems. This guidance is pivotal, given the EDPS's crucial role in the AI Act. According to the AI Act, the EDPS will: ✅ Establish AI regulatory sandboxes for EUIs ✅ Participate as an observer in the European AI Board ✅ Supervise EUIs under the AIA ✅ Act as a market surveillance authority for EUIs ✅ Impose administrative fines on EUIs. These roles mean that the EDPS's interpretations and guidance on AI development and use will significantly impact other AI operators. Despite lack of specificity in some areas, the guidance provides a good initial overview of key challenges in generative AI. #AI#DataProtection#EDPS#AIAct#GenerativeAI

AI & Law

@ai_and_law · Post #792 · 25.03.2026 г., 08:04

🇪🇺EDPS Defines Role Under the EU AI Act The European Data Protection Supervisor (EDPS) published a report outlining its responsibilities as the AI Act market authority for AI systems used by EU institutions. The document sets out priority areas for the next two years as the EDPS assumes its new supervisory role. The report details the EDPS’s tasks under the AI Act mandate, the operational context for exercising its authority, and four strategic pillars that will guide its work as a market authority. #AIRegulation#EUAIAct#DataProtection#AIgovernance#EDPS

AI & Law

@ai_and_law · Post #745 · 19.01.2026 г., 08:04

🇪🇺EDPS Launches Podcast Series on Emerging AI Trends The European Data Protection Supervisor has launched a new podcast series examining key AI trends identified in its TechSonar 2025–26 report. The six-part series focuses on how emerging AI technologies intersect with data protection, security, and fundamental rights. The first episode discusses agentic AI, with EDPS officials addressing risks for personal data protection and potential impacts on individuals’ decision-making autonomy. Upcoming episodes will cover AI companions, automated proctoring, AI-driven personalized learning, coding assistants, and confidential computing. #AIRegulation#DataProtection#EDPS#AITrends#ResponsibleAI

AI & Law

@ai_and_law · Post #142 · 19.10.2023 г., 07:04

European Data Protection Supervisor Weighs In on AI Liability Rules Hello, everyone! The European Data Protection Supervisor (EDPS) provided valuable insights into the European Commission's two proposals, addressing liability rules for artificial intelligence products. These proposals focus on establishing liability for AI developers producing "defective products" and defining civil liability regulations for individuals negatively affected by AI systems. The EDPS presented several key recommendations. Notably, they emphasized the need for uniform protection levels, ensuring that individuals harmed by defective AI systems employed by EU institutions receive the same protection as those impacted by a private entity's use of such systems. These recommendations highlight the ongoing efforts to shape comprehensive AI liability frameworks in the European Union, aiming to balance innovation and safeguard individual rights. #AIandLaw#EDPS#AILiability#EURegulations