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

make serve gives warning about python venv #362

Open
gcapes opened this issue Oct 14, 2021 · 6 comments
Open

make serve gives warning about python venv #362

gcapes opened this issue Oct 14, 2021 · 6 comments

Comments

@gcapes
Copy link
Contributor

gcapes commented Oct 14, 2021

I have a python venv in the root of (most of) my carpentries lessons. This is required to run the make check-lesson-all and so on.
However, when I run make serve I get an error (warning?)

        ** ERROR: directory is already being watched! **

        Directory: /home/mbexegc2/Documents/training/course-material/git-course/venv/lib64

        is already being watched through: /home/mbexegc2/Documents/training/course-material/git-course/venv/lib

        MORE INFO: https://github.com/guard/listen/blob/master/README.md

I looked at the linked README but didn't really understand what to do.

It's not really a problem in that the site still builds locally, but it's a bit distracting.

Hopefully this is the correct place for this issue.

@gcapes
Copy link
Contributor Author

gcapes commented Oct 15, 2021

The fix for this is to add venv to the exclude list at the end of _config.yml

@gcapes
Copy link
Contributor Author

gcapes commented Oct 15, 2021

Just realised this should go in the lesson-example repo instead. Can someone move this issue?

@fmichonneau fmichonneau transferred this issue from carpentries/styles Oct 16, 2021
@maxim-belkin
Copy link
Contributor

Based on the provided error message, it looks like the error is caused by the lib64 "directory", which is probably a link to the lib directory. Can you check that lib64 is a link to lib and, if so, delete it and see if it works? You can recreate it afterwards if it doesn't work for you for some reason but I'm hopeful because I don't have lib64 directory in my venv folder and things work fine.

@gcapes
Copy link
Contributor Author

gcapes commented Oct 26, 2021

@fmichonneau
Thanks for moving the issue

@maxim-belkin
Deleting the lib64 link gets rid of the error message, but given lib64 is automatically created, wouldn't my proposed solution above would be much neater than having to manually delete these automatically created links? It would also fix it for anyone else who finds themselves in my position.

@maxim-belkin
Copy link
Contributor

wouldn't my proposed solution above would be much neater than having to manually delete these automatically created links?

At the moment, name and location of a folder that stores virtual environment files (venv in your report) are not standardized -- both are chosen by the user who creates it. If we choose to exclude venv in the _config.yml here, we won't solve the problem for other users with this problem who might choose to use different name/location. To solve the problem we need to standardize this folder's name & location. What we can do is create a virtualenv rule in the Makefile which would be responsible for creating a virtual environment and dealing with everything related to it. Once the name and location of that folder are systematized, we can make changes to _config.yml, if they're still necessary.

@maxim-belkin
Copy link
Contributor

Btw, I think carpentries/styles was the correct place for this report, but it doesn't matter where we discuss this.

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