anthonyw12123 / 4chanwebscraper

A primitive web scraper using Python.
MIT License
0 stars 0 forks source link

Installing pip packages as root (sudo) is against best practices #11

Closed cdsimpkins closed 8 years ago

cdsimpkins commented 8 years ago

Your project, so it's up to you, but I suggest you either use Python virtual environments or a fresh, non-default installation of python.

Virtual Environments are best in my opinion, because it allows you to manage dependencies for a project with no dependence on any packages installed system-wide.

anthonyw12123 commented 8 years ago

This could be a route to implementing this.

cdsimpkins commented 8 years ago

Virtual environments are pretty straight-forward. There's really no need for something to wrap around it. The real work will be in fixing your specific local environment to support it.

anthonyw12123 commented 8 years ago

Created a new brach with a requirements.txt file with the necessary packages so far, and a venv folder. Remaining to do is determine whether the venv folder is necessary, or if the requirements file needs to mention virtualenv.

cdsimpkins commented 8 years ago

i just submitted #17, in which i answered that question. sorry i didn't check before posting. for the second question, the answer is no. you don't reference the venv from the requirements file, as the requirements file is just a list of dependencies necessary for the project. it's meant so new developers have a succinct list of packages to have before development starts.

pip freeze > requirements.txt creates a file, and pip install -r requirements.txt installs all the packages at the listed versions from the requirements file.

anthonyw12123 commented 8 years ago

The requirements file is in 1.1; so unless something is amiss, I would think it ok to close the ticket.

cdsimpkins commented 8 years ago

you can close it if you want, but you should update the readme first to avoid confusion.

cdsimpkins commented 8 years ago

fixed in f7810e8