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

[JOSS]: Installation instructions #5

Closed
adswa opened this issue Aug 6, 2019 · 10 comments
Closed

[JOSS]: Installation instructions #5

adswa opened this issue Aug 6, 2019 · 10 comments

Comments

@adswa
Copy link

adswa commented Aug 6, 2019

Hi @MLHale,

I'd appreciate assistance on the installation of the dependencies. I'm testing the installation using Debian 10 in a Python 2.7.16 virtual environment.

  1. One requirement is pypiwin32. Is this a requirement for Windows users only, or would I need to have it installed to get your software to work?
  2. I'm running into a couple dependency incompatibilities between the Python packages channels, daphne, asgiref, and asgi_redis when installing the other dependencies you list, for example channels and asgi_redis seem to have conflicting asigref version dependencies.
╰─➤ pip install -U asgiref
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting asgiref
  Using cached https://files.pythonhosted.org/packages/4c/b9/9eb9762c9b43754d49e6b85625c1a5a45673a3083c742be00d8721839b01/asgiref-3.2.1-py2.py3-none-any.whl
ERROR: channels 2.1.3 has requirement asgiref~=2.3, but you'll have asgiref 3.2.1 which is incompatible.
ERROR: asgi-redis 1.4.3 has requirement asgiref~=1.1.2, but you'll have asgiref 3.2.1 which is incompatible.

Could you provide me with the version numbers of the dependencies I would need to install? The output of a pip freeze would be helpful for a start.

Belongs to this JOSS review.

@adswa
Copy link
Author

adswa commented Aug 6, 2019

Ah I see, my bad -- I'm checking the system requirements of the GP3 Analysis software, and saw that it only supports Windows. The installation difficulties I'm experiencing could thus be related to my operating system. @RingoHHuang, you are the other reviewer of this submission, could you check whether the installation of the dependencies works smoother for you, or whether you run into similar dependency conflicts? Please also feel free to close this issue afterwards. Thanks a lot! 🙂

@RingoHHuang
Copy link

I'm on Windows 10 Home Edition using Python 3.7.4.

I ran into a bit of a hiccup installing asgi_redis. It seems to replace an existing version of asgiref with a version that is incompatible with some of my other Python packages:

ERROR: daphne 2.3.0 has requirement asgiref~=3.0, but you'll have asgiref 1.1.2 which is incompatible.
ERROR: channels 2.2.0 has requirement asgiref~=3.0, but you'll have asgiref 1.1.2 which is incompatible.
Installing collected packages: asgiref, asgi-redis
  Found existing installation: asgiref 3.2.1
    Uninstalling asgiref-3.2.1:
      Successfully uninstalled asgiref-3.2.1
Successfully installed asgi-redis-1.4.3 asgiref-1.1.2

@MLHale MLHale closed this as completed Aug 7, 2019
@MLHale MLHale reopened this Aug 7, 2019
@MLHale
Copy link
Owner

MLHale commented Aug 7, 2019

(mis-clicked close issue from my phone, sorry about that)
Hi @adswa and @RingoHHuang,

@adswa - Yes GP3, unfortunately only works for windows-based platforms. I will gather specific dependency version numbers and add them in this thread. It might be also more useful if we built a build file. My initial intent was to dockerize everything, but unfortunately the python portions of the app need to be installed natively, due to the GP3 restriction to windows and docker not providing an efficient mapping to screenspace objects (like screen resolution the ilk) that the GP3 needs access to.

@RingoHHuang - Eyestream is written for Python 2.xx (in our install instructions, we suggest 2.7.9, but it should be forwards compatible with any python 2 release). That probably explains the issue you mentioned regarding asgiref. Supporting Python 3.xx should be theoretically possible, but would require a re-write of the underlying communication mechanisms written in Django Channels (which is generating the error message you are getting) and would require us to re-write some of the dependencies we are using.

@MLHale
Copy link
Owner

MLHale commented Aug 7, 2019

I've added some notes to the readme file in 879c518 to clarify that the GP3 only supports windows 8+ and that eyestream is written for Python 2 environments.

I will double check the dependency versions and add those as well.

@RingoHHuang
Copy link

Hi @MLHale,

Thanks for the clarification! My mistake - didn't see that it was for Python 2. I'm starting the installation steps from the beginning using Python 2.7.9 (Windows 10 Home). I've run into two issues:

  • pip install channels requires the pathlib module, but it doesn't ship with Python 2.7.9. Perhaps include pip install pathlib in the installation instructions prior to installing channels?
  • Does asgi_redis and channels depend on different versions of asgiref? After pip install asgi_redis, I get:
ERROR: channels 2.1.3 has requirement asgiref~=2.3, but you'll have asgiref 1.1.2 which is incompatible. 
ERROR: daphne 2.3.0 has requirement asgiref~=3.0, but you'll have asgiref 1.1.2 which is incompatible.

@MLHale
Copy link
Owner

MLHale commented Aug 8, 2019

Hi @RingoHHuang,

I just reinstalled everything from scratch to see if I could replicate the issues you identified. I was able to replicate the issue. It seems that the problem lies in making an assumption that future versions of channels were backwards compatible.

It seems channels releases 2.x.x and up changed the underlying dependency.

For this reason, I will update the installation instructions to change the pip install channels step to pip install channels==1.1.8 which is the last compatible version with asgi_redis. It seems that newer versions of channels moved to a dependency called channels_redis, while it is out of scope for this release of eyestreams, I might look at this in the future to add support for the new channels releases (coincidentally it would probably add support for Python 3 as well).

In terms of installation, you can do the following to retry:

pip uninstall channels
pip uninstall asgi_redis
pip install channels==1.1.8
pip install asgi_redis

I will submit a commit in a moment to change the instructions in the README.md file.
Lastly, since you are using Windows 10 home, you will need to make sure to use of docker toolbox, since docker community edition is only supported for windows 10 pro, education, and enterprise editions. You can find instructions for docker toolbox here:
https://docs.docker.com/toolbox/toolbox_install_windows/

Below is the log of installation steps after I changed the channels dependency to 1.1.8.

PS C:\Users\mattl> pip install channels==1.1.8
Collecting channels==1.1.8
  Downloading https://files.pythonhosted.org/packages/7a/a6/5a3420c0b93e127fd5b22eaf4155b8c76eb7c404eeac78f4f0816fab97ce/channels-1.1.8-py2.py3-none-any.whl (57kB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 61kB 1.2MB/s
Collecting daphne~=1.3 (from channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/b4/e3/65ba9a2044627826eae52f07a9013f82339bb88917aadf69c702e0e51eea/daphne-1.4.2-py2.py3-none-any.whl
Collecting asgiref~=1.1 (from channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/ee/6d/67f79a9567de5ba4419c3e8d39622bed0d974d704075d09df765b5ddb5ce/asgiref-1.1.2-py2.py3-none-any.whl
Collecting Django>=1.8 (from channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/61/cb/e3c6bfccdf23c48dd4ce014b96178aa048b9450739eaa5f11d4d23d9d5d6/Django-1.11.23-py2.py3-none-any.whl (6.9MB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 7.0MB 898kB/s
Collecting twisted>=17.1 (from daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/2d/2c/aae693e226a7cc4a654df4a2cfd47d65de870cc4af1323e5f5d6ff0b6996/Twisted-19.7.0-cp27-cp27m-win_amd64.whl (3.2MB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 3.2MB 1.6MB/s
Collecting autobahn>=0.18 (from daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/02/55/cc671b201828f4a2def24171394aee0fdd3af46a651fc8104dee8fc2e6ea/autobahn-19.8.1-py2.py3-none-any.whl (772kB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 778kB 1.6MB/s
Collecting six (from asgiref~=1.1->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting pytz (from Django>=1.8->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/87/76/46d697698a143e05f77bec5a526bf4e56a0be61d63425b68f4ba553b51f2/pytz-2019.2-py2.py3-none-any.whl (508kB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 512kB 1.7MB/s
Collecting hyperlink>=17.1.1 (from twisted>=17.1->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/7f/91/e916ca10a2de1cb7101a9b24da546fb90ee14629e23160086cf3361c4fb8/hyperlink-19.0.0-py2.py3-none-any.whl
Collecting attrs>=17.4.0 (from twisted>=17.1->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/23/96/d828354fa2dbdf216eaa7b7de0db692f12c234f7ef888cc14980ef40d1d2/attrs-19.1.0-py2.py3-none-any.whl
Collecting zope.interface>=4.4.2 (from twisted>=17.1->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/36/3d/bea244aa800e43f5013b55765db189aacb4d7b11adc386654f296e139988/zope.interface-4.6.0-cp27-cp27m-win_amd64.whl (131kB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 133kB 1.7MB/s
Collecting incremental>=16.10.1 (from twisted>=17.1->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/f5/1d/c98a587dc06e107115cf4a58b49de20b19222c83d75335a192052af4c4b7/incremental-17.5.0-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from twisted>=17.1->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/a3/86/14c16bb98a5a3542ed8fed5d74fb064a902de3bdd98d6584b34553353c45/Automat-0.7.0-py2.py3-none-any.whl
Collecting constantly>=15.1 (from twisted>=17.1->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/b9/65/48c1909d0c0aeae6c10213340ce682db01b48ea900a7d9fce7a7910ff318/constantly-15.1.0-py2.py3-none-any.whl
Collecting PyHamcrest>=1.9.0 (from twisted>=17.1->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/9a/d5/d37fd731b7d0e91afcc84577edeccf4638b4f9b82f5ffe2f8b62e2ddc609/PyHamcrest-1.9.0-py2.py3-none-any.whl (52kB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 61kB 1.3MB/s
Collecting txaio>=18.8.1 (from autobahn>=0.18->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/e9/6d/e1a6f7835cde86728e5bb1f577be9b2d7d273fdb33c286e70b087d418ded/txaio-18.8.1-py2.py3-none-any.whl
Collecting cryptography>=2.7 (from autobahn>=0.18->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/d8/30/6313af106e5abff8bfa78eb2ce630673bb5add4fafd3b28d4bd0271c8e7f/cryptography-2.7-cp27-cp27m-win_amd64.whl (1.5MB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 1.5MB 1.4MB/s
Collecting idna>=2.5 (from hyperlink>=17.1.1->twisted>=17.1->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 61kB 830kB/s
Requirement already satisfied: setuptools in c:\python27\lib\site-packages (from zope.interface>=4.4.2->twisted>=17.1->daphne~=1.3->channels==1.1.8) (40.6.2)
Collecting enum34; python_version < "3" (from cryptography>=2.7->autobahn>=0.18->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=2.7->autobahn>=0.18->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 102kB 1.4MB/s
Collecting ipaddress; python_version < "3" (from cryptography>=2.7->autobahn>=0.18->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/fc/d0/7fc3a811e011d4b388be48a0e381db8d990042df54aa4ef4599a31d39853/ipaddress-1.0.22-py2.py3-none-any.whl
Collecting cffi!=1.11.3,>=1.8 (from cryptography>=2.7->autobahn>=0.18->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/fa/24/37ec704b98ffc36e7d0ade9e4653539c0b8e6fec34f084f30194609aa10b/cffi-1.12.3-cp27-cp27m-win_amd64.whl (168kB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 174kB 1.7MB/s
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography>=2.7->autobahn>=0.18->daphne~=1.3->channels==1.1.8)
  Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 163kB 1.6MB/s
Installing collected packages: six, asgiref, idna, hyperlink, attrs, zope.interface, incremental, Automat, constantly, PyHamcrest, twisted, txaio, enum34, asn1crypto, ipaddress, pycparser, cffi, cryptography, autobahn, daphne, pytz, Django, channels
  Running setup.py install for pycparser ... done
Successfully installed Automat-0.7.0 Django-1.11.23 PyHamcrest-1.9.0 asgiref-1.1.2 asn1crypto-0.24.0 attrs-19.1.0 autobahn-19.8.1 cffi-1.12.3 channels-1.1.8 constantly-15.1.0 cryptography-2.7 daphne-1.4.2 enum34-1.1.6 hyperlink-19.0.0 idna-2.8 incremental-17.5.0 ipaddress-1.0.22 pycparser-2.19 pytz-2019.2 six-1.12.0 twisted-19.7.0 txaio-18.8.1 zope.interface-4.6.0
You are using pip version 18.1, however version 19.2.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
PS C:\Users\mattl> pip install asgi_redis
Collecting asgi_redis
  Downloading https://files.pythonhosted.org/packages/63/c0/4a2d24cbc0d163ae02bb21eaa1d95311e3948a4fd532e2d6416a02e16471/asgi_redis-1.4.3-py2.py3-none-any.whl
Requirement already satisfied: asgiref~=1.1.2 in c:\python27\lib\site-packages (from asgi_redis) (1.1.2)
Collecting msgpack-python (from asgi_redis)
  Downloading https://files.pythonhosted.org/packages/8a/20/6eca772d1a5830336f84aca1d8198e5a3f4715cd1c7fc36d3cc7f7185091/msgpack-python-0.5.6.tar.gz (138kB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 143kB 1.7MB/s
Collecting redis~=2.10.6 (from asgi_redis)
  Downloading https://files.pythonhosted.org/packages/3b/f6/7a76333cf0b9251ecf49efff635015171843d9b977e4ffcf59f9c4428052/redis-2.10.6-py2.py3-none-any.whl (64kB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 71kB 2.0MB/s
Requirement already satisfied: six in c:\python27\lib\site-packages (from asgi_redis) (1.12.0)
Installing collected packages: msgpack-python, redis, asgi-redis
  Running setup.py install for msgpack-python ... done
Successfully installed asgi-redis-1.4.3 msgpack-python-0.5.6 redis-2.10.6
You are using pip version 18.1, however version 19.2.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
PS C:\Users\mattl>

MLHale added a commit that referenced this issue Aug 8, 2019
@MLHale
Copy link
Owner

MLHale commented Aug 8, 2019

Added the details I mentioned in commit d80a3b2

Also to answer @adswa 's comment, here is the pip freeze results after a fresh install

asgi-redis==1.4.3
asgiref==1.1.2
asn1crypto==0.24.0
attrs==19.1.0
autobahn==19.8.1
Automat==0.7.0
cffi==1.12.3
channels==1.1.8
constantly==15.1.0
cryptography==2.7
daphne==1.4.2
Django==1.11.23
enum34==1.1.6
hyperlink==19.0.0
idna==2.8
incremental==17.5.0
ipaddress==1.0.22
msgpack-python==0.5.6
pycparser==2.19
PyHamcrest==1.9.0
pypiwin32==223
pytz==2019.2
pywin32==224
redis==2.10.6
six==1.12.0
Twisted==19.7.0
txaio==18.8.1
zope.interface==4.6.0

@RingoHHuang
Copy link

Thanks @MLHale. I have now installed all the Python packages without any issues. Can you confirm the output below from docker pull redis looks fine?

Using default tag: latest
latest: Pulling from library/redis
Digest: sha256:854715f5cd1b64d2f62ec219a7b7baceae149453e4d29a8f72cecbb5ac51c4ad
Status: Image is up to date for redis:latest
docker.io/library/redis:latest

@MLHale
Copy link
Owner

MLHale commented Aug 9, 2019

@RingoHHuang looks good.

@adswa
Copy link
Author

adswa commented Aug 10, 2019

Great, thanks @MLHale. Will close this issue as it is resolved.

@adswa adswa closed this as completed Aug 10, 2019
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

3 participants