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

[Errno 2] No such file or directory when trying to run the diacritizer #18

Open
toufiglu opened this issue May 9, 2023 · 1 comment

Comments

@toufiglu
Copy link

toufiglu commented May 9, 2023

Hi Hamza,

Thank you for developing this tool. I was trying to use it, following the steps mentioned. However, when executing

python multilevel_diacritizer/multi_level_diacritizer.py --help

I encountered

python: can't open file 'multilevel_diacritizer/multi_level_diacritizer.py': [Errno 2] No such file or directory

I wonder if there is anything I could do to run it. Thanks!

The complete codes are here.

(base) yiminglu@Toufig-Lu multilevel_diacritizer % eval "$(pyenv init -)"
(base) yiminglu@Toufig-Lu multilevel_diacritizer % python -V
Python 3.7.10
(base) yiminglu@Toufig-Lu multilevel_diacritizer % poetry install --no-root --no-dev
The currently activated Python version 3.9.7 is not supported by the project (3.7.10).
Trying to find and use a compatible version. 
Using python3 (3.7.10)
The `--no-dev` option is deprecated, use the `--only main` notation instead.
Installing dependencies from lock file

No dependencies to install or update
(base) yiminglu@Toufig-Lu multilevel_diacritizer % poetry shell
The currently activated Python version 3.9.7 is not supported by the project (3.7.10).
Trying to find and use a compatible version. 
Using python3 (3.7.10)
Spawning shell within /Users/yiminglu/Library/Caches/pypoetry/virtualenvs/multilevel-diacritizer-4ljotJfI-py3.7
(base) yiminglu@Toufig-Lu multilevel_diacritizer % emulate bash -c '. /Users/yiminglu/Library/Caches/pypoetry/virtualenvs/multilevel-diacritizer-4ljotJfI-py3.7/bin/activate'
(multilevel-diacritizer-py3.7) (base) yiminglu@Toufig-Lu multilevel_diacritizer % python multilevel_diacritizer/multi_level_diacritizer.py --help
python: can't open file 'multilevel_diacritizer/multi_level_diacritizer.py': [Errno 2] No such file or directory
@Hamza5
Copy link
Owner

Hamza5 commented May 13, 2023

Hello,
This error looks like you are missing an

$ export PYTHONPATH=.

I know that is needed inside a Docker container but I don't remember if it was needed when using Poetry.
Anyway, this is related to Python itself so that it can search in the current directory to find the scripts.

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

2 participants