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

can't install #24

Closed
SB2020-eye opened this issue Jan 26, 2021 · 6 comments
Closed

can't install #24

SB2020-eye opened this issue Jan 26, 2021 · 6 comments

Comments

@SB2020-eye
Copy link

SB2020-eye commented Jan 26, 2021

Hi. Running on Windows 10 OS. Using Visual Studio Code.

Running
(myenvironmentname) PS C:\users\scott\desktop\python2\sbb_binarization> pip install .
I keep getting the following:

Processing c:\users\scott\desktop\python2\sbb_binarization
    ERROR: Command errored out with exit status 1:
     command: 'C:\ProgramData\Anaconda3\envs\myenvironmentname\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Scott\\AppData\\Local\\Temp\\pip-req-build-l7egxsl1\\setup.py'"'"'; __file__='"'"'C:\\Users\\Scott\\AppData\\Local\\Temp\\pip-req-build-l7egxsl1\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Scott\AppData\Local\Temp\pip-pip-egg-info-notlemz5'
         cwd: C:\Users\Scott\AppData\Local\Temp\pip-req-build-l7egxsl1\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Scott\AppData\Local\Temp\pip-req-build-l7egxsl1\setup.py", line 6, in <module>
        with open('./ocrd-tool.json', 'r') as f:
    FileNotFoundError: [Errno 2] No such file or directory: './ocrd-tool.json'
    ----------------------------------------
WARNING: Discarding file:///C:/users/scott/desktop/python2/sbb_binarization. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I'm very new at all this. And my (beginner) language is Python. I don't understand the json stuff. Any help getting this installed would be greatly appreciated. :)

@kba
Copy link
Contributor

kba commented Jan 26, 2021

We don't develop for Windows, our target system is Ubuntu 18.04. I guess, Windows cannot deal with UNIX-like path like ./ocrd-tool.json.

I would strongly recommnd to either install it inside a Linux VM or to use the ocrd_all Docker images which include sbb_binarization. With the latter option, you only need to install Docker and nothing else.

@kba
Copy link
Contributor

kba commented Jan 26, 2021

Ah, no, the issue is that ocrd-tool.json in the root repo is a symlink to the actual file and Windows does not support symlinks.

@SB2020-eye
Copy link
Author

Thanks, @kba. Just for closure: Is there a way you know of, off the top of your head, I can simply "replace" the symlink? Or otherwise workaround this to install sbb_binarization?

@kba
Copy link
Contributor

kba commented Jan 26, 2021

You could copy /sbb_binarize/ocrd-tool.json to the root of the repository, that should fix the setup.py problem. But you will probably run into more difficulty on Windows.

@cneud
Copy link
Member

cneud commented Jan 26, 2021

Maybe @stefanCCS has an idea? While also not able to successfully install on Windows, it appears he got a little further at least...otherwise you may want to try Docker or WSL.

@SB2020-eye
Copy link
Author

I copied /sbb_binarize/ocrd-tool.json to the repository root (and just renamed the file already in the root with the same name), and everything has appeared to install. I gave it a test run once, and sure enough, I received a binarized output. So at least for now: so far, so good! Thank you!!!

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

3 participants