Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Error when using colour import on Win10 Python 3.7.9 #20

Closed
gennadyg opened this issue Jan 11, 2021 · 6 comments
Closed

Error when using colour import on Win10 Python 3.7.9 #20

gennadyg opened this issue Jan 11, 2021 · 6 comments

Comments

@gennadyg
Copy link

Hi,
Trying to use your library for demosaic RAW16 -> RGB images and for some reason getting 'The specified module could not be found', despite the fact that installed all prerequisites listed and VC code can see colour package as locally installed, any help will be appreciated.

image

image

@KelSolaar
Copy link
Member

Hi @gennadyg,

Can you let us know how you installed the package(s)? I'm not used to seeing the directory where the colour.__init__ module resides on your system.

Cheers,

Thomas

@gennadyg
Copy link
Author

Thanks for checking @KelSolaar,

Just followed github description with a following commands:

pip install --user colour-demosaicing
pip install --user colour-science

colour.init located is here on my Win10:
c:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour_init
.py

Thanks.

@KelSolaar
Copy link
Member

Cool!

Note that technically, only pip install --user colour-demosaicing should be needed as it will pull-down colour-science-0.3.16 as a dependency.

Would it be possible to print sys.path from within your script and check that c:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-package is effectively listed?

At the top of your script:

import sys
from pprint import pprint

pprint(sys.path)

@gennadyg
Copy link
Author

Hi @KelSolaar

That what I'm getting from output in VS code(also added "import colour"):

['c:\\IdeaProjects\\spark-rosbag\\src\\spark\\raw12_converter', 'C:\\Program ' 'Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\\python37.zip', 'C:\\Program ' 'Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\\DLLs', 'C:\\Program ' 'Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\\lib', 'C:\\Program ' 'Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0', 'C:\\Users\\gegilin\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python37\\site-packages', 'C:\\Users\\gegilin\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python37\\site-packages\\win32', 'C:\\Users\\gegilin\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python37\\site-packages\\win32\\lib', 'C:\\Users\\gegilin\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python37\\site-packages\\Pythonwin', 'C:\\Program ' 'Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\\lib\\site-packages'] PS C:\IdeaProjects\spark-rosbag\src\spark\raw12_converter> c:; cd 'c:\IdeaProjects\spark-rosbag\src\spark\raw12_converter'; & 'C:\Users\gegilin\AppData\Local\Microsoft\WindowsApps\python.exe' 'c:\Users\gegilin\.vscode\extensions\ms-python.python-2020.12.424452561\pythonFiles\lib\python\debugpy\launcher' '56550' '--' 'c:\IdeaProjects\spark-rosbag\src\spark\raw12_converter\Colour-demosaic-test.py' Traceback (most recent call last): File "c:\IdeaProjects\spark-rosbag\src\spark\raw12_converter\Colour-demosaic-test.py", line 3, in <module> import colour File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\__init__.py", line 57, in <module> from .adaptation import (CHROMATIC_ADAPTATION_METHODS, File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\adaptation\__init__.py", line 39, in <module> File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\adaptation\fairchild1990.py", line 23, in <module> PS C:\IdeaProjects\spark-rosbag\src\spark\raw12_converter> c:; cd 'c:\IdeaProjects\spark-rosbag\src\spark\raw12_converter'; & 'C:\Users\gegilin\AppData\Local\Microsoft\WindowsApps\python.exe' 'c:\Users\gegilin\.vscode\extensions\ms-python.python-2020.12.424452561\pythonFiles\lib\python\debugpy\launcher' '56566' '--' 'c:\IdeaProjects\spark-rosbag\src\spark\raw12_converter\Colour-demosaic-test.py' Traceback (most recent call last): File "c:\IdeaProjects\spark-rosbag\src\spark\raw12_converter\Colour-demosaic-test.py", line 3, in <module> import colour File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\__init__.py", line 57, in <module> from .adaptation import (CHROMATIC_ADAPTATION_METHODS, File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\adaptation\__init__.py", line 39, in <module> from .fairchild1990 import chromatic_adaptation_Fairchild1990 File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\adaptation\fairchild1990.py", line 23, in <module> from colour.algebra import spow File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\algebra\__init__.py", line 16, in <module> from .interpolation import ( File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\algebra\interpolation.py", line 65, in <module> import scipy.interpolate File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\__init__.py", line 130, in <module> from . import _distributor_init File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\_distributor_init.py", line 61, in <module> WinDLL(os.path.abspath(filename)) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 364, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found PS C:\IdeaProjects\spark-rosbag\src\spark\raw12_converter>

Thanks,

@KelSolaar
Copy link
Member

Hi @gennadyg,

Thanks, this is useful! So after unrolling the last line(s), I got this traceback:

Traceback (most recent call last):

File "c:\IdeaProjects\spark-rosbag\src\spark\raw12_converter\Colour-demosaic-test.py",
    line 3, in <module> import colour 
File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\__init__.py",
    line 57, in <module> from .adaptation import (CHROMATIC_ADAPTATION_METHODS, 
File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\adaptation\__init__.py",
    line 39, in <module> from .fairchild1990 import chromatic_adaptation_Fairchild1990 
File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\adaptation\fairchild1990.py",
    line 23, in <module> from colour.algebra import spow 
File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\algebra\__init__.py",
    line 16, in <module> from .interpolation import ( 
    File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\colour\algebra\interpolation.py",
        line 65, in <module> import scipy.interpolate 
File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\__init__.py",
    line 130, in <module> from . import _distributor_init 
File "C:\Users\gegilin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\_distributor_init.py",
    line 61, in <module> WinDLL(os.path.abspath(filename)) 
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py",
    line 364, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found

It seems like your Scipy installation is somehow busted. Can you confirm you are able to import scipy?

Cheers,

Thomas

@gennadyg
Copy link
Author

Hi Thomas,

Indeed have some environment problem about Scipy, unable to make import scipy with the same error, will investigate how to fix this in my environment.
Thanks a lot for pointing this out.

@colour-science colour-science locked and limited conversation to collaborators Jan 22, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants