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
python 3.5 support #57
Comments
String interpolation in Python 3.6 is a great thing, and makes the code so much easier to read! But, on the other hand, I want loompy to be widely used. Do you have a compelling reason why you need to stay with Python 3.5? A quick search indicates that we have ~90 instances of using string interpolation. It would not be a huge amount of work to revert those to the old syntax, but there's always the risk of introducing a bug or two. |
I always use Python 3.6 so not an issue for me; but we want scVI to be widely used and many people aren't using the latest Python release. We just started using tox to test scVI and all its dependencies against other versions of Python. Currently loompy is our only dependency that isn't Python 3.5 compatible. Most libraries support both Python 2 (though the future package) and Python 3. That said, I agree that string interpolation is a great thing, and 90 instances is a lot. So I don't know whether its worth it just for scVI -- we'll keep using loompy regardless. I mainly posted the issue because I thought it might be an oversight. |
Ok got it. Feel free to send a pull request ;-) For now, I’ll consider it a feature request for loompy3. |
I realized that we also use Python 3.6 variable type hints, which is going to be a pain to find and remove (or is there an automated tool for this?). |
I'm trying to use loompy with tensorflow on single cell data. At the moment the tensorflow community is primarily on python 3.5 in part due to the complex interactions with GPU drivers. I suspect many are looking at machine learning on single cell and as such this particular combination may be important. Will see if I can find a solution and report back. |
Hi, I'm going to see if I can get python >3.6 up and running. |
You could also add a |
Good idea. I will add it. To get started quickly, I recommend Anaconda, which installs in your home directory so it doesn’t mess with your system’s python. |
I found py-backwards and it can indeed be used to backport loompy to at least Python 3.5. The following works, and creates a Python 3.5-compatible loompy:
There is also py-backwards-packager, but it doesn't backport source distributions ( If you know a way to create a |
I updated the docs with instructions for installing loompy from source on Python <3.6 |
I'll close this now, but feel free to send a pull request if you figure out how to automate py-backwards as part of the packaging process. |
Sorry for the late reply. Somehow I didn't get a notification for your comments. I noticed a couple of things when using py-backwards.
If I still install loompy and try to read som data with scanpy.
Looks like an error in loom_validator.py but I can't figure out what it is. My syntax checker marks some things but that is simply becouse the file have failed to convert to 3.5, but I can't figure out why. Some hack and slash later it seems to be an issue with py-backwards.
but I can't make sense of the py-backwards error. |
Hi
|
I guess it's the nested curly braces in the formatting specification, and I posted some ideas at nvbn/py-backwards#48. You can also try using the commit just before I added the validator ( |
Just a heads up. After me and my laptop went through an existential crisis triggered by me wanting to update ubuntu instead of just simply python, I am finally back where I started but have installed python3.6. Please let me know if you need help testing something. I was planning to test your suggestion but will not do it unless it is needed. |
Is the PR still ok ? For the record: I am exactly in the situation of using loompy in scvi, and for some god awful reason I am stuck with python3.5. |
Hi @gamazeps - sure, I'll be happy to have a look! |
I'm getting the error below when I try to install loompy on Python 3.5, even though everything works with Python 3.6.
I guess the f"..." notation is new in 3.6:
Would you consider adding support for Python 3.5 to loompy?
The text was updated successfully, but these errors were encountered: