Open astraszab opened 1 month ago
Update README, make sure that you are trying to run it from the folder with splitting_and_preparing_data.py file.
Thanks for the clarification. Now I'm getting another error:
~/projects/Store_Sales/src/store_sales$ python splitting_and_preparing_data.py
Traceback (most recent call last):
File "/home/astraszab/projects/Store_Sales/src/store_sales/splitting_and_preparing_data.py", line 1, in
Also why the streamlit section is placed before dependencies installation in readme? Don't we need an environment created to run streamlit?
Also why the streamlit section is placed before dependencies installation in readme? Don't we need an environment created to run streamlit?
That's a good point, replaced the Streamlit section to the right place in README. b0d8fe3
Thanks for the clarification. Now I'm getting another error:
~/projects/Store_Sales/src/store_sales$ python splitting_and_preparing_data.py
Traceback (most recent call last): File "/home/astraszab/projects/Store_Sales/src/store_sales/splitting_and_preparing_data.py", line 1, in import pandas as pd ModuleNotFoundError: No module named 'pandas'
As I see your python can't find the Pandas module even though it's in pyproject.toml file and should have been installed by Poetry. Try activating virtual env by running 'poetry shell' command in your terminal. If there's still an error, make sure that Poetry dependencies and packages are installed. For doing this run 'poetry show' command in your terminal and check if Pandas library is there. Finally, you may try running scripts via using the 'poetry run' command (e.g poetry run python splitting_and_preparing_data.py instead of python splitting_and_preparing_data.py).
The point is there are no instructions regarding activating the virtual env in the README, so subsequent commands after poetry install
don't work, including streamlit and running python scripts directly via python
command.
Also consider using 'scripts' section of pyproject.toml
. This will allow you to register specific scripts and use them as commands without navigating to the directories in src/
(https://python-poetry.org/docs/pyproject/#scripts)
The point is there are no instructions regarding activating the virtual env in the README, so subsequent commands after
poetry install
don't work, including streamlit and running python scripts directly viapython
command. Also consider using 'scripts' section ofpyproject.toml
. This will allow you to register specific scripts and use them as commands without navigating to the directories insrc/
(https://python-poetry.org/docs/pyproject/#scripts)
Yes, you are right, thank you. Added more instructions to README for virtual environment activation. a927ba3
The point is there are no instructions regarding activating the virtual env in the README, so subsequent commands after
poetry install
don't work, including streamlit and running python scripts directly viapython
command. Also consider using 'scripts' section ofpyproject.toml
. This will allow you to register specific scripts and use them as commands without navigating to the directories insrc/
(https://python-poetry.org/docs/pyproject/#scripts)
Added scripts in .toml ecc4d15 and 38f8e26
I'm running splitting_and_preparing_data.py script as described in README:
python splitting_and_preparing_data.py
Getting the following error: /home/astraszab/.pyenv/versions/3.12.3/bin/python: can't open file '/home/astraszab/projects/Store_Sales/splitting_and_preparing_data.py': [Errno 2] No such file or directory