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

Error installing dependencies #13

Closed
sriprad opened this issue Apr 9, 2021 · 8 comments
Closed

Error installing dependencies #13

sriprad opened this issue Apr 9, 2021 · 8 comments

Comments

@sriprad
Copy link

sriprad commented Apr 9, 2021

Hi Team,
Thank you for all the great work. It looks amazing.
I tried installing pip install layoutparser but it thrown me the below error,
can you please let me know how to rectify this,

ERROR: Command errored out with exit status 1:
command: 'C:\Program Files\Anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-s13j7o41\pycocotools_6c1fc2cce84542a8be1c0cbeacfda632\setup.py'"'"'; file='"'"'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-s13j7o41\pycocotools_6c1fc2cce84542a8be1c0cbeacfda632\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\Public\Documents\Wondershare\CreatorTemp\pip-wheel-awmfv0cr'
cwd: C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-s13j7o41\pycocotools_6c1fc2cce84542a8be1c0cbeacfda632
Complete output (22 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.8\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.8\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.8\pycocotools
copying pycocotools_init_.py -> build\lib.win-amd64-3.8\pycocotools
running build_ext
cythoning pycocotools/_mask.pyx to pycocotools_mask.c
C:\Users\pss.ch\AppData\Roaming\Python\Python38\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-s13j7o41\pycocotools_6c1fc2cce84542a8be1c0cbeacfda632\pycocotools_mask.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'pycocotools._mask' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\common
creating build\temp.win-amd64-3.8\Release\pycocotools
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\pss.ch\AppData\Roaming\Python\Python38\site-packages\numpy\core\include -I./common "-IC:\Program Files\Anaconda\include" "-IC:\Program Files\Anaconda\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tc./common/maskApi.c /Fobuild\temp.win-amd64-3.8\Release./common/maskApi.obj -Wno-cpp -Wno-unused-function -std=c99
cl : Command line error D8021 : invalid numeric argument '/Wno-cpp'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

ERROR: Failed building wheel for pycocotools
ERROR: Command errored out with exit status 1:
command: 'C:\Program Files\Anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-s13j7o41\pycocotools_6c1fc2cce84542a8be1c0cbeacfda632\setup.py'"'"'; file='"'"'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-s13j7o41\pycocotools_6c1fc2cce84542a8be1c0cbeacfda632\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\Public\Documents\Wondershare\CreatorTemp\pip-record-w4euj5sb\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\pss.ch\AppData\Roaming\Python\Python38\Include\pycocotools'
cwd: C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-s13j7o41\pycocotools_6c1fc2cce84542a8be1c0cbeacfda632
Complete output (20 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.8\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.8\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.8\pycocotools
copying pycocotools_init_.py -> build\lib.win-amd64-3.8\pycocotools
running build_ext
skipping 'pycocotools_mask.c' Cython extension (up-to-date)
building 'pycocotools._mask' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\common
creating build\temp.win-amd64-3.8\Release\pycocotools
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\AppData\Roaming\Python\Python38\site-packages\numpy\core\include -I./common "-IC:\Program Files\Anaconda\include" "-IC:\Program Files\Anaconda\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tc./common/maskApi.c /Fobuild\temp.win-amd64-3.8\Release./common/maskApi.obj -Wno-cpp -Wno-unused-function -std=c99
cl : Command line error D8021 : invalid numeric argument '/Wno-cpp'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Program Files\Anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-s13j7o41\pycocotools_6c1fc2cce84542a8be1c0cbeacfda632\setup.py'"'"'; file='"'"'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-s13j7o41\pycocotools_6c1fc2cce84542a8be1c0cbeacfda632\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\Public\Documents\Wondershare\CreatorTemp\pip-record-w4euj5sb\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\AppData\Roaming\Python\Python38\Include\pycocotools' Check the logs for full command output.

@lolipopshock
Copy link
Member

Could you check #11 ?

@engineerchange
Copy link

I had a similar issue today.

I think this commit doesn't solve the problem of #11 for Windows users - this change is up-to-date in pypi now, and I got the same error as above with a fresh pip install layoutparser today. When I tried pip installing the latest version of pycocotools (2.0.2) on my Windows 10 machine, I still got a similar error as above.

I think the resolution is changing pycocotools's compiler flag for Windows users. I was able to follow these instructions that git clone the coco library and make a smaller change to a compiler flag in the setup.py to install pycocotools. Then, I had to git clone https://github.com/Layout-Parser/layout-parser.git, comment out the pycocotools install in setup.py, and run python setup.py install and it ran through the rest of the install fine for me.

@lolipopshock
Copy link
Member

Thanks @engineerchange! And you might want to try pip install -U "git+https://github.com/layout-parser/layout-parser.git#egg=layoutparser" (with -U and downloading source from github rather than pypi). But anyhow we are going to update the pypi version as well so it shouldn't be an issue in the future.

@ankit-crossml
Copy link

Hi All,

I am also facing the below error:

AssertionError: Requires fvcore>=0.1.2

And when I try to install this then I get following dependency errors:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
layoutparser 0.1.3 requires fvcore==0.1.1.post20200623, but you have fvcore 0.1.5.post20210410 which is incompatible.
layoutparser 0.1.3 requires pycocotools==2.0.1, but you have pycocotools 2.0.2 which is incompatible.

Could anyone please help me with the working installation version?

Regards,
Ankit Aggarwal

@lolipopshock
Copy link
Member

lolipopshock commented Apr 13, 2021

Hi All,

I am also facing the below error:

AssertionError: Requires fvcore>=0.1.2

And when I try to install this then I get following dependency errors:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
layoutparser 0.1.3 requires fvcore==0.1.1.post20200623, but you have fvcore 0.1.5.post20210410 which is incompatible.
layoutparser 0.1.3 requires pycocotools==2.0.1, but you have pycocotools 2.0.2 which is incompatible.

Could anyone please help me with the working installation version?

Regards,
Ankit Aggarwal

If you are on a non-Windows platform, this should be fixed in the v0.2 release of layout parser. Just run pip install -U layoutparser and it should fix your problem. However if you are on a Windows machine, please check https://github.com/Layout-Parser/layout-parser/blob/master/installation.md#for-windows-users .

@lolipopshock
Copy link
Member

Fixed in #18 and #25 .

@MarkValadez
Copy link

Hi everyone,

I was install the detectron2 based models, but the program hits a segmentation fault when defining the model model = lp.Detectron2LayoutModel('lp://PubLayNet/mask_rcnn_R_50_FPN_3x/config') there seems to be a dependency issue with the "black" library. I am unsure if these two are unrelated. I get the following error when installing:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. python-lsp-black 1.2.1 requires black>=22.3.0, but you have black 21.4b2 which is incompatible.

Thanks in advance for any help.

@MarkValadez
Copy link

Hi everyone,

I was install the detectron2 based models, but the program hits a segmentation fault when defining the model model = lp.Detectron2LayoutModel('lp://PubLayNet/mask_rcnn_R_50_FPN_3x/config') there seems to be a dependency issue with the "black" library. I am unsure if these two are unrelated. I get the following error when installing:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. python-lsp-black 1.2.1 requires black>=22.3.0, but you have black 21.4b2 which is incompatible.

Thanks in advance for any help.

Following up on my previous post, it seems that a poor dependency interplay between conda and pip dependencies caused memory overflows when training the model. I switched to pipenv and that seems to have resolved the issue for now.

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

5 participants