Code Monkey home page Code Monkey logo

Comments (10)

sushain97 avatar sushain97 commented on June 23, 2024 1

(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.

sushain97 avatar sushain97 commented on June 23, 2024 1

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.

sushain97 avatar sushain97 commented on June 23, 2024

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.

sushain97 avatar sushain97 commented on June 23, 2024

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.

jonorthwash avatar jonorthwash commented on June 23, 2024
>>> sys.prefix
'/usr'

from apertium-init.

sushain97 avatar sushain97 commented on June 23, 2024

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.

jonorthwash avatar jonorthwash commented on June 23, 2024
$ 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.

sushain97 avatar sushain97 commented on June 23, 2024

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.

jonorthwash avatar jonorthwash commented on June 23, 2024

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.

sushain97 avatar sushain97 commented on June 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.