Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install.sh terminates if brew install has already run #128

Open
hftf opened this issue Feb 14, 2017 · 1 comment
Open

install.sh terminates if brew install has already run #128

hftf opened this issue Feb 14, 2017 · 1 comment

Comments

@hftf
Copy link

hftf commented Feb 14, 2017

Today I tried to install gentle on Mac OS X El Capitan. As instructed in the README.md (quoted below):

  1. Download the source code and run ./install.sh. Then run python serve.py to start the server. This works on Mac and Linux.

I ran git clone [email protected]:lowerquality/gentle.git and then ran ./install.sh in the new folder.

After Brew whined that a few programs (like ffmpeg and wget) were already installed, the install.sh script exited. (I noticed that install.sh:8 calls install_deps.sh:16 which invokes brew install.)

...
Warning: autoconf-2.69 already installed
Error: ffmpeg-2.7.2_1 already installed
To install this version, first `brew unlink ffmpeg`
Error: libtool-2.4.6 already installed
To install this version, first `brew unlink libtool`
Error: automake-1.14.1 already installed
To install this version, first `brew unlink automake`
Error: wget-1.15_1 already installed
To install this version, first `brew unlink wget`

The install.sh script should probably not terminate in this scenario (especially without a helpful message).


As a reference to others who may be searching, here are the error messages I saw when attempted to run the scripts:

When I ran python align.py:

Traceback (most recent call last):
  File "gentle/align.py", line 49, in <module>
    resources = gentle.Resources()
  File ".../gentle/gentle/resources.py", line 19, in __init__
    require_dir(self.proto_langdir)
  File ".../gentle/gentle/resources.py", line 16, in require_dir
    raise RuntimeError("No resource directory %s.  Check %s environment variable?" % (path, ENV_VAR))
RuntimeError: No resource directory .../gentle/exp.  Check GENTLE_RESOURCES_ROOT environment variable?

When I ran python serve.py:

Traceback (most recent call last):
  File "serve.py", line 1, in <module>
    from twisted.web.static import File
ImportError: No module named twisted.web.static

I finished the installation by manually running both pip install . and then running the remaining lines in install.sh.

Still, I had an error message when running python serve.py:

Traceback (most recent call last):
  File "serve.py", line 4, in <module>
    from twisted.internet import reactor, threads
  File "/Library/Python/2.7/site-packages/twisted/internet/reactor.py", line 38, in <module>
    from twisted.internet import default
  File "/Library/Python/2.7/site-packages/twisted/internet/default.py", line 56, in <module>
    install = _getInstallFunction(platform)
  File "/Library/Python/2.7/site-packages/twisted/internet/default.py", line 50, in _getInstallFunction
    from twisted.internet.selectreactor import install
  File "/Library/Python/2.7/site-packages/twisted/internet/selectreactor.py", line 18, in <module>
    from twisted.internet import posixbase
  File "/Library/Python/2.7/site-packages/twisted/internet/posixbase.py", line 18, in <module>
    from twisted.internet import error, udp, tcp
  File "/Library/Python/2.7/site-packages/twisted/internet/tcp.py", line 28, in <module>
    from twisted.internet._newtls import (
  File "/Library/Python/2.7/site-packages/twisted/internet/_newtls.py", line 21, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "/Library/Python/2.7/site-packages/twisted/protocols/tls.py", line 63, in <module>
    from twisted.internet._sslverify import _setAcceptableProtocols
  File "/Library/Python/2.7/site-packages/twisted/internet/_sslverify.py", line 38, in <module>
    TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,
AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'

Based on the replies to this issue, I downgraded twisted from 17.1.0 to 16.4.1 by running sudo pip install Twisted==16.4.1. After this, both of the python scripts worked.

@strob
Copy link
Contributor

strob commented Feb 14, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants