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

Transitioning to Python 3 #2

Open
emiliom opened this issue Jan 28, 2019 · 6 comments
Open

Transitioning to Python 3 #2

emiliom opened this issue Jan 28, 2019 · 6 comments

Comments

@emiliom
Copy link
Member

emiliom commented Jan 28, 2019

This is a stub issue, for now. We have issues and materials on the Python 3 transition scattered throughout other repos. Let's try to integrate generic elements (ie, information not specific to the ODM2 package at hand) here, on this issue and/or on a markdown document in this repo.

Some places where we've discussed this:

@aufdenkampe
Copy link
Member

@emiliom, thanks for posting this new cross-org issue for collecting the various efforts to transition to Python 3! This is a great place for that.

@aufdenkampe
Copy link
Member

aufdenkampe commented Feb 6, 2019

I just talked to @miguelcleon who mentioned he just tried installing the ODM2PythonAPI on Python 3 and it didn't work, and that he was looking into it right now because he had thought it would based on this work:

However, as @emiliom mentioned in ODM2/ODM2PythonAPI#157 (comment), he didn't "recall anyone doing significant and sustained testing for Python 3 compatibility."

It seems that now might be the right time to push for this testing and development of a Python 3 compatible ODM2PythonAPI.

In addition to @miguelcleon's current interest, others are also working on this or have an immediate need, including:

Can some of the suggestions I had made in ODM2/WOFpy#230 (comment) or ODM2/WOFpy#230 (comment) help?

@miguelcleon
Copy link
Member

@aufdenkampe Ok, the problem maybe specific to the environment I was trying to install too. I received the error below. I was trying to install it in the same environment as ODM2 Admin.


UnsatisfiableError: The following specifications were found to be in conflict:
  - odm2api
  - social-auth-core
Use "conda info <package>" to see the dependencies for each package.

I copied the conda environment and removed social-auth-core, which is required by social-auth-app-django so that was removed as well. Then I got:


UnsatisfiableError: The following specifications were found to be in conflict:
  - defaults/linux-64::numpy==1.15.4=py36h1d66e8a_0
  - odm2api
Use "conda info <package>" to see the dependencies for each package.


So it looks like it is not is not working with the version of numpy in my environment either.

I then tried installing on a fresh Python 3.6 conda environment but that required a downgrade to python 2.7. So I guess this is an issue with conda and how the odm2pythonapi is setup. It may well work if you just install using pip directly into python without conda but I'm trying to do everything in conda environments.

@emiliom
Copy link
Member Author

emiliom commented Feb 6, 2019

Regarding the ability to install odm2api on Py3, w/o overly restrictive dependency version pinning: I'm not seeing any dependency version pinning in its requirements files and conda recipe. So it probably should be built ok via pip install on Py3, with some flexibility for specific dependency version requirements from other packages.

@miguelcleon There is no Py3 odm2api conda package available at this time! So, the conda package that's there only works with 2.7, by design. See https://anaconda.org/conda-forge/odm2api/files

Still, the ability to pip install it on Py3 doesn't mean it actually works Ok on Py3! There's no guarantee, and it's unclear how much work one would have to invest to deem it Py3-compatible, including both testing and tweaking the code.

It seems that now might be the right time to push for this testing and development of a Python 3 compatible ODM2PythonAPI.

Well, it's only the right time if there are people willing and able to put in the work! That's both the base work, plus the work to review PRs. Speaking for myself, I don't think I can make a commitment of that sort this month.

@emiliom
Copy link
Member Author

emiliom commented Feb 6, 2019

I guess I should add that this discussion should be happening over at https://github.com/ODM2/ODM2PythonAPI/, not here. This issue is for general resources and topics involving the transition to Python 3, not discussions for any one package in particular.

@emiliom
Copy link
Member Author

emiliom commented Jun 4, 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