Что делать если нужно поставить какую-то 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
🪂The Scroll Airdrop Claim page is live on TokenPocket.
Check your $SCR Airdrop Eligibility on TokenPocket with ease!
How to access it?
📱 Wallet > Discover > Airdrop Zone
💻https://tokenpocket.pro/en/dappstore?category_id=99998&category=Trend
#Scroll
🆕 Scroll Mainnet is Now Live on TokenPocket!
#Scroll seamlessly extends Ethereum’s capabilities through zero knowledge tech and EVM equivalence. The L2 blockchain built by #Ethereum devs for Ethereum devs.
▶️Supported by TokenPocket Mobile Wallet and Chrome Extension Wallet!
TokenPocket now supports users to
✅ Create & Import #Scroll wallets.
✅ Store, send, and receive #Scroll assets. $ETH
✅ Bridge $ETH by using the #bridges on TokenPocket!
🚀Create your first #Scroll wallet on TokenPocket!
Use Guide👉https://help.tokenpocket.pro/en/wallet-operation/how-to-create-a-wallet/scroll
👉https://tokenpocket.pro/en/download/app
👉https://extension.tokenpocket.pro/#/
#DAppListing This week we've listed 9 DApps on Scroll_ZKP Ecosystem, including the DApps launched on #ScrollMainnet and those will launch on Scroll Mainnet in the upcoming days!
🔵 Users can swap, bridge $ETH, and enjoy #Scroll Eco in a snap within TokenPocket. Scroll_ZKP Owlto_Finance rhinofi Orbiter_Finance symbiosis_fi TransitFinance CelerNetwork syncswap izumi_Finance
👉https://tokenpocket.pro
👉https://help.tokenpocket.pro/en/wallet-operation/how-to-create-a-wallet/scroll
【Details】https://twitter.com/TokenPocket_TP/status/1714579606798291016
【Powered By】Crypto Box
Scroll: рост числа экспертов-дилетантов и экспертов-селебрити: как социальные сети изменили способ получения знаний
Интернет - неисчерпаемый источник знаний, но насколько эти знания качественны? Задумайтесь о том, откуда вы чаще черпаете информацию: из роликов и постов в Instagram любимых селебрити или из научных статей? Всё больше известных людей начинают транслировать своё мнение в сеть в тех областях, в которых они не имеют даже базового образования: киноактрисы становятся диетологами, шоумены - политиками, а поп-певицы - модельерами. Вы можете верить или не верить им, но они оказывают всё большее влияние на мнение «народных масс», которые охотнее верят им, а не признанным в экспертном сообществе специалистам.
«Spice Girl Виктория Бекхэм сейчас, например, модельер, а актриса Гвинет Пэлтроу — гуру в области образа жизни и «здоровья». Когда Бекхэм впервые запустила свою линию одежды в 2008 году, модные редакторы отнеслись к этому скептически, но такие влиятельные журналы, как Harper’s Bazaar и Vogue, оказались под впечатлением. Несмотря на отсутствие очевидного образования в дизайне — ее первоначальный «опыт» в этом вопросе возник из ее личного интереса к стилю и съёмках в модной одежде — Бекхэм недавно отпраздновала десятилетие деятельности в качестве модельера. Точно так же «бренд современного образа жизни» GOOP актрисы Гвинет Пэлтроу продает кремы для лица и другие продукты, посвященные здоровью и красоте. Они одобрены самой Пэлтроу, а участвующие в проекте врачи помогают отстаивать так называемые лечебные аспекты некоторых из ее продуктов. Несмотря на хор критики в адрес актрисы и «псевдонауки» её компании GOOP, в настоящее время фирму оценивают в 250 миллионов долларов».
https://theidealist.ru/celebxperts/
#Scroll#общество#селебрити#знания#соцсети#Пэлтроу#Трамп
❤️Vanilla Finance Closes Pre-Seed Investment Round ✔️
Singapore, November 26, 2024 – Vanilla Finance, the leading exchange by trading volume on #Telegram, has announced the successful closure of its Pre-Seed investment round. Spearheaded by industry giants like Paper Ventures, UOB Ventures, and ABCDE Labs, the round also attracted notable participants such as #HTX Ventures, #Ocular, #Openspace, #Y2 Ventures, and angel investors from #STEPN, #Scroll, #XAI, and more.
🔫A Game-Changer in the Digital Asset Space
Since its launch, #VanillaFinance has made waves, amassing over $8 billion in USDT trading volume within just 60 days. This meteoric rise is further validated by winning the prestigious #Binance MVB Season 8, a recognition of the platform’s cutting-edge solutions and market leadership.
👏Visionary Growth and User-Centric Innovation
With fresh funding and institutional backing, Vanilla Finance is on a mission to redefine crypto trading by:
• Simplifying User Experience: Introducing intuitive, secure features tailored for both novices and experts.
• Expanding Offerings: Launching a spot market, with a focus on meme trading pairs, and rolling out features like a meme creator platform, staking products, and futures trading.
• Regional Focus: Targeting Southeast Asia and APAC with localized services, multilingual support, and integration with regional payment systems.
💰Institutional Confidence in a Bright Future
The involvement of strategic investors highlights Vanilla Finance’s potential. A UOB Ventures spokesperson praised the platform’s innovative approach, while Danish Chaudhry of Paper Ventures noted, “Vanilla Finance’s expansion aligns perfectly with the Southeast Asia and APAC markets’ untapped opportunities in digital finance.”
📖Building a Next-Generation Ecosystem
Beyond trading, Vanilla Finance is creating an ecosystem that prioritizes community engagement and innovation. With its unique approach to meme trading and user-focused features, the platform is poised to set a new benchmark in digital asset trading.
✈️The Future Starts Here: Vanilla Finance is committed to serving the next 100 million users, shaping a more inclusive, engaging, and forward-thinking crypto landscape.
❤️ Join Vanilla mini-app now and get as much $CONE as you can before the airdrop!
🚀 Ethereum Layer 2 Network Scroll Faces Overcharging Issue
Ethereum Layer 2 network Scroll has reportedly overcharged users by more than $50,000 in transaction fees over approximately four days. According to ChainCatcher, this occurred after the Scroll team manually increased two rate multipliers in their gas price oracle six times within six days, each time raising them by 2 to 10 times. This adjustment cumulatively increased the L1 data cost parameter to 1,280 times its original benchmark.
Approximately 139,000 transactions were affected, with the total cost originally estimated at around $280, but users were charged over $50,000. The majority of these transactions were automated by bots. L2BEAT clarified that the overcharging was not due to a sequencer issue but resulted from multiplier adjustments executed through a multi-signature wallet by the team. This incident has raised questions about whether Scroll previously subsidized users with below-cost rates to maintain activity.
Data from DeFiLlama indicates that Scroll's total value locked (TVL) currently stands at $24 million, a significant decline of 96% from its peak of $585 million in October 2024. As of the time of reporting, Scroll has not publicly responded to the issue.
#Ethereum#Layer2#Scroll#Overcharging#GasFees#Blockchain#DeFi#TVL#CryptoNews#TransactionFees#ETH#SCR
🔥New Blockchains are Now Supported on SLEX Exchange! 🚀
🥳We're excited to announce that now you can engage with a diverse range of ecosystems as we've added support for:
🔗Scroll
🔗Zora
🔗Arbitrum
🔗Optimism
🔗zkSync
🔗Linea
🔗Base
☄️Now you have more trading flexibility, access to a wider range of tokens, and enhanced opportunities to boost your earnings on SLEX Exchange.
🤝Join SLEX Exchange, deposit your account and use various of blockchains and trading strategies to boost your portfolio:
slex.io/registration
#SLEXExchange#BlockchainSupport#CryptoDiversity#Scroll#Zora#Arbitrum#Optimism#zkSync#Linea
🚀 Scroll Users Face Excessive Transaction Fees Due to Multiplier Increases
Scroll users incurred over $50,000 in additional transaction fees following six manual multiplier increases that elevated Layer 1 data charges to 1,280 times the original baseline. According to NS3.AI, L2BEAT reported that approximately 139,000 transactions were impacted over a span of roughly four days, with the baseline cost estimated at around $280. On April 9, the team reduced both multipliers by 160 times. Etherfi Cash bots contributed approximately $35,000 of the excess fees during etherfi's migration to Optimism.
#Scroll#TransactionFees#MultiplierIncrease#Layer1#L2BEAT#NS3AI#Etherfi#Optimism#Crypto#Blockchain#SCR
#objective_c#3rd_party_mouse#invert_scrolling#mac_mouse#mouse#mouse_events#mousewheel#remap#remapping#scroll#scrolling#smooth_scrolling#symbolic_hotkeys#tools#utility
Mac Mouse Fix enhances your regular mouse on Mac with smooth scrolling, natural trackpad gestures like Mission Control or Spaces switching, and customizable buttons for keyboard shortcuts—even Apple keys for volume or brightness. Download free from the website (version 3 for macOS 11+; version 2 stays free forever). It boosts productivity by making any $10 mouse feel better than an Apple Trackpad, saving time on navigation and controls.
https://github.com/noah-nuebling/mac-mouse-fix
📰 CRYPTO NEWS
🆕️The founder and CEO of #CryptoQuant stated that compared to the previous cyclical peak, the fundamental elements of the bitcoin network can maintain a market value three times higher than the current one. He considers it "possible" to "keep" the bitcoin price at $265,000.
🆕️As part of the presale, #WATER raised $41 million. Which also makes WATER the largest Memecoin pre-sale to date, with over 26,000 wallets participating. The team has regained control of its account in X.
🆕️50 Cent's #Twitter account was hacked in order to promote the Solana Meme Coin.
🆕️Internet Computer will launch the #ICP Hub Accelerator Program 2024, which aims to help early blockchain projects transform their concepts into market solutions, create a strong blockchain innovation ecosystem and promote technological progress in the ICP community.
🔹 21 million #LINKS ($295 million) of non-convertible Chainlink contracts have been unblocked today.
🆕️DAO Osmosis supports a commission-free bridge for transferring bitcoin to the #Cosmos ecosystem.
🆕️Scroll ZKP presents "Scroll Sessions", a loyalty program to reward the Scroll Marks community for their participation and involvement in the #Scroll ecosystem.
🆕️Arbitrum introduces the "Layer Leap", a single-stage bridge from L1 to L3 for the #Orbit ecosystem.
🆕️#Reef plans to launch a new product on June 26.
‼️ Dogwifhat Whales dropped #WIF by 16 million in a week.
🆕️#Fantom has released #Sonic's third management offering, which includes an annual token destruction mechanism, as well as the launch of Sonic Spark and Sonic University.
🆕️#Bluefin announces integration with Wormhole Connect. The Wormhole community will participate in the future release of Bluefin tokens.
🆕️#StacksNakamoto has announced the completion of 90% of the work on the project and is preparing for the official launch on July 15. The Nakamoto Stacks update should increase the transaction speed to 5-10 seconds, which is about 100 times faster than the current speed. ➡️ This is a significant event for the Stacks project and the Bitcoin ecosystem, will improve the speed, overall efficiency and scalability of Layer2 on #Bitcoin, promising faster and more efficient transactions for users.