I'm trying to collect python code in a package gnn_pylib
and install it in my conda environment. My package will require opencv, which has been installed in my conda environment via:
conda install -c conda-forge opencv
I can run cv2 functions correctly, and I can call functions in the packages using cv2 functions successfully:
import gnn_pylib
gnn_pylib.show()
But when i try to install the package running pip install -e .
from the gnn_pylib
directory I get the following error:
Collecting cv2 (from gnn-pylib==0.1)
Could not find a version that satisfies the requirement cv2 (from gnn-pylib==0.1) (from versions: )
No matching distribution found for cv2 (from gnn-pylib==0.1)
Is there something i am missing? should I some way inform pip
but my conda
opencv?
The package has the following structure:
gnn_pylib/
gnn_pylib/
__init__.py
show.py
setup.py
__init__.py
is as follows:
from .show import foo
show.py
is as follows:
import cv2
import numpy as np
def foo():
cv2.imshow("random", np.random.rand(10,10))
cv2.waitKey()
return
setup.py
is as follows:
from setuptools import setup
setup(name='gnn_pylib',
version='0.1',
description='General purpose python library',
url='http://github.com/whatever/gnn_pylib',
author='whatever',
author_email='whatever@gmail.com',
license='MIT',
packages=['gnn_pylib'],
install_requires=[
'numpy',
'cv2',
],
zip_safe=False)