This message was deleted.
# ask-anything
s
This message was deleted.
🙌 1
e
The invoke command will create env environment!
Please open a PR clarifying that point if it isn’t clear
b
I am not sure if it is just me 🤔. Never used invoke before. But sure can do, also helps me to get more familiar with the PR process
i
It's like running a shell script via python essentially.
🙏 1
b
hm invoke has eval which does not work in windows/powershell. came back with
Copy code
The command "eval" is either misspelled or
could not be found.
i
Yeah it's a known issue, we have an open issue on this!
b
do I need a container?
i
You can try running the commands manually via conda
Or try pip venv
e
jupysql has a pretty similar setup and the windows problem has been fixed there, maybe include the fix in your PR? https://github.com/ploomber/jupysql/blob/55d9096d991de8137319a0ad3a1ba3f54b5783b1/tasks.py#L6
👍 2
b
as far as I can grasp it I think this line is not required
'eval "$(conda shell.bash hook)" '
After I removed this line it just runs through fine.
i
It’s required depending on your OS, for windows you’d need to run
conda shell.bash hook
. Take a look on the fix in the git link above, we need this command as it sets conda as the source to activate
b
Will PR it with the feature I am trying to implement https://github.com/ploomber/sklearn-evaluation/issues/319
meerkat 1
If I have question regarding the issue do you prefer to communicate it over slack or in the issue for being documented?
🙌 1
e
please post your questions on github so we keep all the conversation in a single place!
👍 1
➕ 1
b
Well I stay corrected. The setup run through without error. However I have somewhat of a wierd error
Importing matplotlib works as well
Running
precision_recall.py
it gives me module not found
I am loosing my mind about this. I uninstalled vscode, conda, and reinstalled. tried to get it in a docker devcontainer to run and lastly tried it on a second laptop.
Any help is highly appreciated
i
I’d check the versions are matching. Also having a new fresh conda env might help out!
On your first import you’re not using the same import:
matplotlib.pyplot
b
Yes correct. importing matplotlib works importing
matplotlib.pyplot
fails which is also kind of strange
i
If you click here on the get started button, and import it manually you’d see it works, try a clean slate with a higher
python version 3.9
. It also seems they had a recent release, try locking on 3.7.0, it’s not locked in the setup.py so I don’t think this is it.
Sometimes when doing pip install you need to refresh/reopen at least on jupyter lab, in pycharm I know you don’t.
Make sure your env is activated, and the interpreter is set to the right env
Maybe this will be helpful, I’m sure it’s something silly.
b
note quite sure what fixed it but I updated matplotlib and restarted vscode without extensions and now it works
👏 1
meerkat 1
You wouldnt believe how many frustration this caused for me
thanks for investing the time looking into this
❤️
i
I bet, it’s always the small stuff 😄
No worries happy to help. Thanks for contributing, keep up the good work meerkat
b
I was to fast. it worked in console but not when executing the script... I tried now different version of matplotlib (which is already suboptimal for contributing); the SO threads you posted I have all read. Independent of the IDE vscode, I tried to run it just from command prompt (after activating the conda env
conda activate sk-eval
and running
python precision_recall.py
still the same error. I somehow refuse to accept that it will not work, but I am close to giving up. I will try it a last time with a devcontainer I think
So in console, with env activated it works like a charm
In the exact same console window
This is so wierd...
now it really works ... I copied just for testing purposes the
precision_recall.py
in the root directory of the project now it works ... this is by far the most bizarre erorr I have encountered while working with python Apologies for the spam ...!
🙌 1
i
No worries, happy it works now!