Skip to content

Add support for Python 3.7 #106

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

Closed
b4stien opened this issue Jun 28, 2018 · 16 comments
Closed

Add support for Python 3.7 #106

b4stien opened this issue Jun 28, 2018 · 16 comments

Comments

@b4stien
Copy link

b4stien commented Jun 28, 2018

Hi there, we've noticed trying to upgrade our Python version to 3.7 that there is no way to install opencv-python with it. Would you consider adding it to the build matrice? Would you like a PR for that?

Thanks for the great work 👌

@skvark
Copy link
Member

skvark commented Jun 28, 2018

Yes, I will definetely add support for 3.7. However, there are a few things which need to be checked or updated before it is possible:

I can make the changes but the timetable for a new opencv-python release depends mostly on the issues listed above (if there are no other unexpected issues).

@yonip
Copy link

yonip commented Jul 2, 2018

Just a few notes:

@skvark
Copy link
Member

skvark commented Jul 2, 2018

Thanks. Numpy's 3.7 wheels were released a bit after I wrote that message. Travis doesn't need to support 3.7 on Linux, the builds run in manylinux Docker containers which will have support for 3.7 after I rebuild them. macOS is ok if multibuild README says so.

I'll make the required changes after Appeyor has added Python 3.7.

@rose-maria
Copy link

On running : python setup.py install

I get :

Usage:
  H:\PYTHON\python.exe -m pip list [options]

no such option: --format
Traceback (most recent call last):
  File "setup.py", line 370, in <module>
    main()
  File "setup.py", line 25, in main
    numpy_version = get_or_install("numpy", "1.11.3" if sys.version_info[:2] >=
(3, 6) else "1.11.1")
  File "setup.py", line 352, in get_or_install
    subprocess.check_output([sys.executable, "-m", "pip", "list", "--format", "j
son"]).decode('ascii'))  # valid names & versions are ASCII as per PEP 440
  File "H:\PYTHON\lib\subprocess.py", line 618, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '['H:\\PYTHON\\python.exe', '-m', 'pip',
'list', '--format', 'json']' returned non-zero exit status 2

@yonip
Copy link

yonip commented Jul 10, 2018

Update/bump: Appveyor now includes Python 3.7.0

@rose-maria I don't think this is the place for your own bug report (you might want to make a separate issue for that), but I could not reproduce that error.

Does python -m pip list --format json also not work?

@skvark
Copy link
Member

skvark commented Jul 10, 2018

@yonip Thanks, I'll add support for 3.7 during this week, probably tomorrow.

@rose-maria As suggested above, open a new issue if you think that the error is related to this repository (note: building this package locally has not been tested but it might work on Windows).

@skvark
Copy link
Member

skvark commented Jul 15, 2018

Windows and Linux builds work fine but there's compiler compatibility issue on macOS due to upgrade to OpenCV 3.4.2:

/Users/travis/build/[secure]/opencv-python/opencv/3rdparty/protobuf/src/google/protobuf/arena_impl.h:182:10: error: thread-local storage is not supported for the current target

  static GOOGLE_THREAD_LOCAL ThreadCache thread_cache_;

Based on googling (https://stackoverflow.com/a/29929949/5795428) Xcode 8 should have support for thread-local storage but unfortunately the error persists with Xcode 8 and Xcode 9 environments in Travis. This is something which needs to be solved before I can make a new release.

@scivision
Copy link
Contributor

Thanks for your continued excellent work on this. For those wanting to see the Xcode errors, here are the opencv-python Travis-CI build logs

@toplinuxsir

This comment has been minimized.

@skvark
Copy link
Member

skvark commented Jul 20, 2018

Good news: after multiple failed builds with different parameters and with awesome help from @yonip the macOS builds are now working. After the current builds are done, I'll release a new version. It will be available on PyPI at the latest on monday.

@skvark
Copy link
Member

skvark commented Jul 21, 2018

Release builds are now running and new packages will be available during the next 24 hours.

@skvark skvark closed this as completed Jul 21, 2018
@kvalev
Copy link
Contributor

kvalev commented Jul 22, 2018

I am having some issues fetching the latest version when using Python3.7 - No matching distribution found for opencv-python.

I can reproduce it with the following Dockerfile:

FROM ubuntu:18.04

ENV DEBIAN_FRONTEND noninteractive

RUN apt update && \
    apt install -y python3.7 python3-pip
# set python3.7 as default for pip3
RUN ln -s -f /usr/bin/python3.7 /usr/bin/python3
RUN pip3 install opencv-python

Looking at the wheel files, it seems that the x86_64 wheel for py37 is missing.

@skvark
Copy link
Member

skvark commented Jul 22, 2018

Looks like I have made some mistakes in the build matrix... only i686 entries are there for Linux :/ I'll have to make a new release. It will take couple of days because I'm simply running out of hours.

It would help if someone could add the entries to the build matrix and submit a PR. I'll then make the release.

@NotSoSuper
Copy link

Hey, are the x86_64 PyPI wheels going to be up soon?
Just making sure they aren't forgotten 😃

@skvark
Copy link
Member

skvark commented Jul 23, 2018

Just tagged a new version, they will be slowly appearing to PyPI. Thanks for the patience.

@scivision
Copy link
Contributor

scivision commented Jul 24, 2018

The Linux x86_64 wheels for Python 3.7 are now on PyPi
https://pypi.org/project/opencv-python/#files

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

8 participants