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

Dependencies? #9

Open
User670 opened this issue Aug 4, 2022 · 1 comment
Open

Dependencies? #9

User670 opened this issue Aug 4, 2022 · 1 comment

Comments

@User670
Copy link

User670 commented Aug 4, 2022

Maybe this would be fixed if/when this thing goes on pip, but for now, doing the setup.py installation doesn't give me the machine-learning-related libraries and I have to get them manually.

Can I request a requirement.txt in the repo? (I know there's an environment.yml but pip install -r doesn't take that)

@User670
Copy link
Author

User670 commented Aug 4, 2022

update: while trying to deal with the dependencies, I got this from running smude:

D:\Github\smude>smude --help
C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\torchvision\models\detection\anchor_utils.py:63: UserWarning: Failed to initialize NumPy: module compiled against API version 0x10 but this version of numpy is 0xf (Triggered internally at  ..\torch\csrc\utils\tensor_numpy.cpp:68.)
  device: torch.device = torch.device("cpu"),
Traceback (most recent call last):
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 568, in _build_master
    ws.require(__requires__)
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 886, in require
    needed = self.resolve(parse_requirements(requirements))
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 777, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (opencv-contrib-python 4.6.0.66 (c:\users\user670\appdata\local\programs\python\python310\lib\site-packages), Requirement.parse('opencv-contrib-python==4.4.0.42'), {'smude'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\Scripts\smude-script.py", line 33, in <module>
    sys.exit(load_entry_point('smude==0.1.0', 'console_scripts', 'smude')())
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\Scripts\smude-script.py", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\importlib\metadata\__init__.py", line 162, in load
    module = import_module(match.group('module'))
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\smude-0.1.0-py3.10.egg\smude\__init__.py", line 18, in <module>
    from .model import load_model
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\smude-0.1.0-py3.10.egg\smude\model.py", line 3, in <module>
    import pytorch_lightning as pl
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pytorch_lightning\__init__.py", line 34, in <module>
    from pytorch_lightning.callbacks import Callback  # noqa: E402
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pytorch_lightning\callbacks\__init__.py", line 14, in <module>
    from pytorch_lightning.callbacks.callback import Callback
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pytorch_lightning\callbacks\callback.py", line 25, in <module>
    from pytorch_lightning.utilities.types import STEP_OUTPUT
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pytorch_lightning\utilities\__init__.py", line 18, in <module>
    from pytorch_lightning.utilities.apply_func import move_data_to_device  # noqa: F401
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pytorch_lightning\utilities\apply_func.py", line 30, in <module>
    from pytorch_lightning.utilities.imports import _compare_version, _TORCHTEXT_LEGACY
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pytorch_lightning\utilities\imports.py", line 22, in <module>
    import pkg_resources
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 3243, in <module>
    def _initialize_master_working_set():
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 3226, in _call_aside
    f(*args, **kwargs)
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 3255, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 570, in _build_master
    return cls._build_from_requirements(__requires__)
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 583, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "C:\Users\User670\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'opencv-contrib-python==4.4.0.42' distribution was not found and is required by smude

Doing pip install opencv-contrib-python gives version 4.6.0.66 of said package, which smude doesn't accept (throws the same error as above). Doing pip install opencv-contrib-python==4.4.0.42 gives this error message: ERROR: Could not find a version that satisfies the requirement opencv-contrib-python==4.4.0.42 (from versions: 3.4.11.45, 3.4.13.47, 3.4.14.51, 3.4.15.55, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.4.0.46, 4.5.1.48, 4.5.2.52, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66).

Windows 10 x64, Python 3.10.0, pip 21.3.1.

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

1 participant