Closed rawmarshmellows closed 7 years ago
To be clear, you only need to follow those instructions if you want to manually rebuild this conda package yourself. To just use the result of this conda build all you need to do is:
> conda install -c menpo dlib
To install the resulting binary we have already built.
Are you sure you want to manually rebuild this yourself?
I get this error:
(test) Kevins-MacBook-Pro:local kevinlu$ python -c "import dlib" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named 'dlib'
When I run the command above
So in a complete example you did something like:
> conda create -n test python
> source activate test
(test) > conda install -c menpo dlib
(test) > python -c "import dlib"
And you encountered an ImportError
? If so:
Yes that's what I did, I'm using OS version 10.12.3 and I'm using Python 3.5.3
That's odd! Working fine for me:
Can you output two things:
conda list
:
(test) > conda list
# packages in environment at /Users/jab08/miniconda/envs/test:
#
boost 1.59.0 py35_0 menpo
bzip2 1.0.6 3
dlib 18.18 py35_2 menpo
libpng 1.6.27 0
mkl 2017.0.1 0
numpy 1.12.1 py35_0
openssl 1.0.2k 1
pip 9.0.1 py35_1
python 3.5.3 1
readline 6.2 2
setuptools 27.2.0 py35_0
sqlite 3.13.0 0
tk 8.5.18 0
wheel 0.29.0 py35_0
xz 5.2.2 1
zlib 1.2.8 3
python
within the env:
(test) > python
Python 3.5.3 |Continuum Analytics, Inc.| (default, Mar 6 2017, 12:15:08)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
The output of conda list
:
(test) Kevins-MBP:~ kevinlu$ conda list
# packages in environment at /Users/kevinlu/miniconda3/envs/test:
#
boost 1.59.0 py35_0 menpo
bzip2 1.0.6 0 conda-forge
ca-certificates 2017.1.23 0 conda-forge
certifi 2017.1.23 py35_0 conda-forge
dlib 18.18 py35_2 menpo
libpng 1.6.28 0 conda-forge
mkl 2017.0.1 0
ncurses 5.9 10 conda-forge
numpy 1.12.1 py35_0
openssl 1.0.2h 3 conda-forge
pip 9.0.1 py35_0 conda-forge
python 3.5.3 1 conda-forge
readline 6.2 0 conda-forge
setuptools 33.1.1 py35_0 conda-forge
sqlite 3.13.0 1 conda-forge
tk 8.5.19 1 conda-forge
wheel 0.29.0 py35_0 conda-forge
xz 5.2.2 0 conda-forge
zlib 1.2.11 0 conda-forge
The header when I run python
(test) Kevins-MBP:~ kevinlu$ python
Python 3.5.3 |Continuum Analytics, Inc.| (default, Mar 6 2017, 12:15:08)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Odds on its the conda-forge libpng
. I'm afraid this menpo package isn't guarantee to play well with conda-forge. To truly test this you can try
otool -L miniconda/envs/test/lib/python-3.5/site-packages/dlib.so
Note that path is almost definitely incorrect as its off the top of my head. But it's something like that. You can paste the output here and we can confirm the issue. But you should also try installing dlib into a totally clean environment using only menpo and defaults.
Here is the output:
(test) Kevins-MBP:site-packages kevinlu$ otool -L /Users/kevinlu/miniconda3/envs/test/lib/python3.5/site-packages/dlib.so
/Users/kevinlu/miniconda3/envs/test/lib/python3.5/site-packages/dlib.so:
@rpath/dlib.so (compatibility version 0.0.0, current version 0.0.0)
@rpath/libboost_python.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libpython3.5m.dylib (compatibility version 3.5.0, current version 3.5.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
@rpath/libpng16.16.dylib (compatibility version 39.0.0, current version 39.0.0)
@rpath/libmkl_rt.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0)
And also test
is a completely clean environment with only menpo
installed!
That's strange, seems like it's finding everything.
To clarify, compare your conda list output with @jabooth output. All of yours are from the conda-forge channel whereas @jabooth are from defaults. Looks like you added conda-forge to your .condarc file. You can get a clean environment, like I'm talking about, by overriding this with something like
conda install -c defaults -c menpo dlib --override-channels
I'm on holiday right now but i will investigate the clash with conda-forge when I return.
Oh that seemed to do the job, I guess it was the channels that were screwing up everything! Thank you so much! Also if it isn't too much to ask what seemed to be the problem?
What does
conda install /PATH/TO/DLIB/PACKAGE.tar.gz
mean? Does it mean that I would have to download my owndlib.tar.gz
file? I've trying to cd to the path thatTEST END:
specifies and turned thedlib-19.4.0.tar.bz2
into adlib-19.4.0.tar.gz
then runningconda install dlib-19.4.0.tar.gz
but it still doesnt' work. Although, I can see that the test has passed and it has succesfully aligned an image. Anyone able to help me, I've spent the whole day trying to figure this out!