Closed ezrabest closed 3 years ago
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pydensecrf Using a whl prebuilt by LFD, UCI seemed to solve this issue.
However, installation in linux (e.g Ubuntu) still encounters a similar problem (using gcc).
Might be a specific problem installing with python 3.7, for it is fine to install with Python 3.6.
In addition to @kimisecond's answer, to install "whl" file:
pip install pydensecrf-1.0rc2-cp37-cp37m-win_amd64.whl
*Change file name to whichever one you download.
@thealtruist Can you please give a direct link to pydensecrf-1.0rc2-cp37-cp37m-win_amd64.whl? I could not find it
@tamireiny The link is provided in @kimisecond 's answer. You'll need to copy and paste it into the web browser. And make sure to download the version that matches your Python version and Windows system type. For example, pydensecrf-1.0rc2-cp37-cp37m-win_amd64.whl
refers to Python3.7 and Windows 64-bit.
@thealtruist I have managed to download the file now, but when I run: pip install pydensecrf-1.0rc2-cp37-cp37m-win_amd64.whl, I get: ERROR: pydensecrf-1.0rc2-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform. I have python 3.7, windows 10 64 bit. Any idea how to solve?
@tamireiny Can you verify the Python version? python --version
@thealtruist I run python --version Python 3.7.6
@tamireiny Can you also verify the system type?
@thealtruist
@tamireiny Could you also check your pip version? pip --version
@thealtruist , sure: pip --version pip 20.0.2 from c:\users\tamir\appdata\local\programs\python\python36\lib\site-packages\pip (python 3.6)
@tamireiny It looks like your pip is connected to Python 3.6 and your interpreter is connected to Python 3.7
@thealtruist You are right, thanks. I used now the pip the is related to python 3.7
Then I try: import pydensecrf.densecrf as dcrf
I get:
Traceback (most recent call last):
File "
What do you suggest?
@tamireiny Were you able to successfully install pydensecrf using the pip that's related to Python 3.7?
@thealtruist Yes, when I try to install again I get: pip install pydensecrf-1.0rc2-cp37-cp37m-win_amd64.whl WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Requirement already satisfied: pydensecrf==1.0rc2 from file:///C:/Users/Tamir/anaconda3/Scripts/pydensecrf-1.0rc2-cp37-cp37m-win_amd64.whl in c:\users\tamir\anaconda3\lib\site-packages (1.0rc2)
@tamireiny Previously, have you set the Anaconda path in your Windows PATH Environment Variables?
@thealtruist Yes
@tamireiny I don't use Anaconda but it seems strange that it's trying to locate the module in Anaconda that you installed using pip.
@thealtruist I didn't understand your last comment, the error is: import pydensecrf.densecrf as dcrf ImportError: DLL load failed: The specified module could not be found.
Why do you think it's trying to locate modules using Anaocnda?
@tamireiny That was a mistake. I was referring to it referencing the location of the site package.
Requirement already satisfied: pydensecrf==1.0rc2 from file:///C:/Users/Tamir/anaconda3/Scripts/pydensecrf-1.0rc2-cp37-cp37m-win_amd64.whl in c:\users\tamir\anaconda3\lib\site-packages (1.0rc2)
@tamireiny But apparently that's a normal thing so I'm not sure what's causing the error.
@thealtruist Here in this folder path: C:\Users\Tamir\anaconda3\Scripts>
UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:
Specifications:
Your python: python=3.7
If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.
The following specifications were found to be incompatible with your CUDA driver:
Your installed CUDA driver is: 10.1
Seems that I got reject since there is no support for python 3.7
@thealtruist This worked for me: pip install pydensecrf-1.0rc2-cp37-cp37m-win_amd64.whl --no-deps
@tamireiny Nice, glad you figured it out!
@david-littlefield AttributeError: module 'pydensecrf.densecrf' has no attribute 'DenseCRF2D' i get this attribute error
@mu745511 What are the steps that you used to install?
@mu745511 What are the steps that you used to install?
import sys sys.path.append('github master pydensecrf')
actually i want to install it offline in kaggle notebook so i created a dataset using the github repo and import it using sys.path.append and then the error popped up , also i tried to install using internet like : pip install pydensecrf or using the pip install git+https://github.com/lucasb-eyer/pydensecrf.git command
python version in the kernel is 3.7.9 and cython is also installed
Thanks to all repliers Working with Pycharm instead of Anaconda solve the issue
I have tried all solutions suggested in other issues, but the installation failed, with pip and with .git commands. I'm running on win10 64bit python 3.7 all installation tools were updated. the error message: `(base) C:\Users\Ezra>pip install git+https://github.com/lucasb-eyer/pydensecrf.git Collecting git+https://github.com/lucasb-eyer/pydensecrf.git Cloning https://github.com/lucasb-eyer/pydensecrf.git to c:\users\ezra\appdata\local\temp\pip-req-build-2k6r0wk2 Running command git clone -q https://github.com/lucasb-eyer/pydensecrf.git 'C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2' Building wheels for collected packages: pydensecrf Building wheel for pydensecrf (setup.py) ... error ERROR: Complete output from command 'c:\users\ezra\appdata\local\continuum\anaconda3\python.exe' -u -c 'import setuptools, tokenize;file='"'"'C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Ezra\AppData\Local\Temp\pip-wheel-6plwp_tx' --python-tag cp37: ERROR: running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.7 creating build\lib.win-amd64-3.7\pydensecrf copying pydensecrf\utils.py -> build\lib.win-amd64-3.7\pydensecrf copying pydensecrf__init__.py -> build\lib.win-amd64-3.7\pydensecrf running build_ext building 'pydensecrf.eigen' extension creating build\temp.win-amd64-3.7 creating build\temp.win-amd64-3.7\Release creating build\temp.win-amd64-3.7\Release\pydensecrf C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipydensecrf/densecrf/include -Ipydensecrf -Ic:\users\ezra\appdata\local\continuum\anaconda3\include -Ic:\users\ezra\appdata\local\continuum\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tppydensecrf/eigen.cpp /Fobuild\temp.win-amd64-3.7\Release\pydensecrf/eigen.obj eigen.cpp C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/VectorBlock.h(120): error C2373: 'Eigen::DenseBase::segment': redefinition; different type modifiers
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/DenseBase.h(291): note: see declaration of 'Eigen::DenseBase::segment'
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/VectorBlock.h(121): error C2447: '{': missing function header (old-style formal list?)
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/VectorBlock.h(152): error C2373: 'Eigen::DenseBase::head': redefinition; different type modifiers
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/DenseBase.h(294): note: see declaration of 'Eigen::DenseBase::head'
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/VectorBlock.h(153): error C2447: '{': missing function header (old-style formal list?)
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/VectorBlock.h(184): error C2373: 'Eigen::DenseBase::tail': redefinition; different type modifiers
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/DenseBase.h(297): note: see declaration of 'Eigen::DenseBase::tail'
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/VectorBlock.h(185): error C2447: '{': missing function header (old-style formal list?)
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe' failed with exit status 2
ERROR: Failed building wheel for pydensecrf Running setup.py clean for pydensecrf Failed to build pydensecrf Installing collected packages: pydensecrf Running setup.py install for pydensecrf ... error ERROR: Complete output from command 'c:\users\ezra\appdata\local\continuum\anaconda3\python.exe' -u -c 'import setuptools, tokenize;file='"'"'C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Ezra\AppData\Local\Temp\pip-record-j4m6iof8\install-record.txt' --single-version-externally-managed --compile: ERROR: running install running build running build_py creating build creating build\lib.win-amd64-3.7 creating build\lib.win-amd64-3.7\pydensecrf copying pydensecrf\utils.py -> build\lib.win-amd64-3.7\pydensecrf copying pydensecrf__init__.py -> build\lib.win-amd64-3.7\pydensecrf running build_ext building 'pydensecrf.eigen' extension creating build\temp.win-amd64-3.7 creating build\temp.win-amd64-3.7\Release creating build\temp.win-amd64-3.7\Release\pydensecrf C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipydensecrf/densecrf/include -Ipydensecrf -Ic:\users\ezra\appdata\local\continuum\anaconda3\include -Ic:\users\ezra\appdata\local\continuum\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tppydensecrf/eigen.cpp /Fobuild\temp.win-amd64-3.7\Release\pydensecrf/eigen.obj eigen.cpp C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/VectorBlock.h(120): error C2373: 'Eigen::DenseBase::segment': redefinition; different type modifiers
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/DenseBase.h(291): note: see declaration of 'Eigen::DenseBase::segment'
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/VectorBlock.h(121): error C2447: '{': missing function header (old-style formal list?)
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/VectorBlock.h(152): error C2373: 'Eigen::DenseBase::head': redefinition; different type modifiers
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/DenseBase.h(294): note: see declaration of 'Eigen::DenseBase::head'
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/VectorBlock.h(153): error C2447: '{': missing function header (old-style formal list?)
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/VectorBlock.h(184): error C2373: 'Eigen::DenseBase::tail': redefinition; different type modifiers
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/DenseBase.h(297): note: see declaration of 'Eigen::DenseBase::tail'
C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\pydensecrf\densecrf\include\Eigen\src/Core/VectorBlock.h(185): error C2447: '{': missing function header (old-style formal list?)
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe' failed with exit status 2
ERROR: Command "'c:\users\ezra\appdata\local\continuum\anaconda3\python.exe' -u -c 'import setuptools, tokenize;file='"'"'C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Ezra\AppData\Local\Temp\pip-record-j4m6iof8\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Ezra\AppData\Local\Temp\pip-req-build-2k6r0wk2`
thanks for your assist