Comments (10)
(I think the current solution can be un-overengineered by making an apertium_apy.py
target in make release
, etc. that copies over apertium-init.py
and then we add that file to the .gitignore
.)
from apertium-init.
Okay, all better now. I'm really sorry about this :\ Should have checked on another machine after I released. Regardless, v2.1.1 is released to PyPi and tagged in GitHub:
sushain@azurite:~$ sudo -H pip3 install apertium-init
Collecting apertium-init
Downloading apertium_init-2.1.1-py3-none-any.whl (74kB)
100% |████████████████████████████████| 81kB 2.0MB/s
Installing collected packages: apertium-init
Successfully installed apertium-init-2.1.1
sushain@azurite:~$ apertium-init
usage: apertium-init [-h] [-d DESTINATION] [-p] [-pe PUSH_EXISTING_TO_GITHUB]
[-u USERNAME] [-a {lt,lttoolbox,hfst}]
[-a1 {lt,lttoolbox,hfst}] [-a2 {lt,lttoolbox,hfst}]
[--no-rlx1] [--no-rlx2] [--no-prob1] [--no-prob2]
[--no-pgen1] [--no-pgen2]
name
apertium-init: error: the following arguments are required: name
from apertium-init.
https://github.com/apertium/apertium-init/blob/master/apertium_init.py#L12
What is your sys.prefix
and what's inside it? Your sudo
installation might be the source of the problem.
from apertium-init.
For context, the installation of this package is extremely hacky since apertium-init
isn't a valid name for a Python module. It should have been apertium_init
from the start but I'm preserving the dash for backwards compatibility.
from apertium-init.
>>> sys.prefix
'/usr'
from apertium-init.
What is your
sys.prefix
and what's inside it?
os.listdir(sys.prefix)
should work :)
In theory, it should have an apertium_init
folder... If not, try this:
$ sudo python3
>>> sys.prefix
...
>>> import os
>>> os.listdir(sys.prefix)
...
If it's there but not in the first version, that could explain it. Not really sure how to fix it in that case (aside from telling people not to install with sudo).
from apertium-init.
$ python3
...
>>> os.listdir(sys.prefix)
['games', 'share', 'include', 'lib', 'local', 'sbin', 'bin', 'src']
$ sudo python3
Python 3.6.3 (default, Oct 3 2017, 21:16:13)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.prefix
'/usr'
>>> import os
>>> os.listdir(sys.prefix)
['games', 'share', 'include', 'lib', 'local', 'sbin', 'bin', 'src']
from apertium-init.
Argh. Okay, I can re-confirm that the install works for me this evening and see if we can't figure this out.
Can you try locate apertium_init
or whatever the equivalent for your platform is? The folder must be somewhere...
from apertium-init.
Seems to've put it here:
/usr/local/apertium_init/
/usr/local/apertium_init/__pycache__
/usr/local/apertium_init/__pycache__/apertium-init.cpython-36.pyc
/usr/local/apertium_init/apertium-init.py
Seems like a bad place for python stuff...
from apertium-init.
Interesting. Well, it installs to your sys.prefix
. Other data like what NLTK downloads ends up there as well presumably. Or the countries
package.
I have an idea to get rid of the hacky install and fix this problem in one go. I'll try it this evening.
from apertium-init.
Related Issues (20)
- change to xfst-based spellrelax
- vanilla rtx has deprecated indexed blank
- notice about licensing HOT 3
- rtx default to having tags transferred for all common categories
- vanilla lexd is uncompilable due to unescaped /
- traces of lexc in lexd stuff
- Current Version Not on PyPI HOT 2
- Migrate builds to Github Actions
- Don't recompile CG rules in bilingual modules
- Add Orthography Conversion to Analyzers
- Read Monolingual modes.xml HOT 1
- add udx mapping stuff to language dirs
- add lexd support
- -pe should equal -p -e, not a long form HOT 3
- Newer flake8 unhappy with quotes
- change spellrelax from twol to hfst-expand-equivalences HOT 1
- validate option combinations
- new PR calls for documentation update(s) HOT 1
- move all instructions in README related to installation to new Installation section near top, before Usage
- .deps/spellrelax.hfst should be .deps/$(LANG1).spellrelax.hfst
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 apertium-init.