Comments (2)
Through trial and error I found the right solution.
To correctly install Argos-Translate, which will work offline, you need to follow these steps:
git clone https://github.com/argosopentech/argos-translate.git
cd argos-translate
virtualenv env
source env/bin/activate
pip install argostranslate
pip install argostranslategui
Note! If you do this:
git clone https://github.com/argosopentech/argos-translate.git
cd argos-translate
virtualenv env
source env/bin/activate
pip install -e .
then offline will not work!
from argos-translate.
This is quite alarming because no one expects argos-translate to use the cloud.
$ argos-translate --help
usage: argos-translate [-h] [--from-lang FROM_LANG] [--to-lang TO_LANG] [TEXT]
Open-source offline translation.
…
I run argos this way to enforce the offline expectation:
firejail --net=none --env=ARGOS_DEVICE_TYPE=auto argos-translate $args
Nonetheless, there is a substantial security issue here for anyone not sandboxing argos (probaby most people), so I suggest prepending “(security)” to the title. To worsen the security problem, note that the argos-translate project intermingles with libretranslate, which is inside the privacy-abusing walled garden of Cloudflare. So it’s concerning that the app uses the cloud when there is a good chance it could be sharing sensitive info with Cloudflare.
The other issue is indeed the packaging. The various pip
tools are designed for python developers and not proper tools for end users, which I mention in bug 254. But since there is no proper package we are trapped. That said, the best of the worst is pipx
.
I got burnt in a debian upgrade because python3 updates broke all pip-installed apps, thus forcing me to reinstall argos-translate. It was a disaster but one thing I discovered is pipx
at least tries to do better than pip
by automatically deploying a venv on every install, and by supporting upgrades. It’s still not a proper pkg manager but it’s fewer steps than pip
or pip3
. You can run something like this:
$ PIPX_HOME=${prefix:-/opt/}/pipx PIPX_BIN_DIR=${prefix:-/usr/local}/bin pipx install --verbose argostranslate
Then to verify:
$ PIPX_HOME=${prefix:-/opt/}/pipx PIPX_BIN_DIR=${prefix:-/usr/local}/bin pipx list
venvs are in /opt/pipx/venvs
apps are exposed on your $PATH at /usr/local/bin
package argostranslate 1.9.6, installed using Python 3.11.2
- argos-translate
- argospm
Note that the PIPX_HOME
and PIPX_BIN_DIR
vars are optional. I use them to do a multi-user systemwide install. But it is a hack that makes some python devs cringe. Python’s toolchains assume everything is installed by and for a single user.
from argos-translate.
Related Issues (20)
- no pip install
- Does not support Python 3.12 HOT 1
- How to switch usage to GPU instead of CPU? HOT 1
- BUG: pip install argostranslate does not work on Python 3.12 HOT 3
- Problem in Greek Translation
- How to use custom model?
- Stanza version >=1.1.1 breaks a few langauges HOT 2
- Support for Brazilian Portuguese
- [BUG] SIGSEGV
- Title
- Upgrade SentencePiece for Windows Support on Python 3.12+ HOT 2
- Translation of pre-split and pre-tokenized sentences
- Translation from Spanish -> English missing words
- (feature request) a way to pause and continue a translation process that takes days to execute; plus a progress indicator
- Installation procedure has chronic crashes due to bulky files. Crash recovery fails. Manual procedure needed.
- KeyError: 'ctranslate2' on installation attempt
- Wrong country names - English to slovak
- Wrong country translations - English to French HOT 1
- Wrong country name translations English to German
- Some duplicate results in en to zh
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argos-translate.