filmov
tv
The Best Way To Install Python Modules On Ubuntu Linux | pip-tools
![preview_player](https://i.ytimg.com/vi/KklAyNSfjGU/maxresdefault.jpg)
Показать описание
Follow me on Twitter:
Hello friends, in this video I'm going to be showing you my favourite way to install python modules.
I will be showing you how to install compatible versions of django, djangorestframework and pytest.
Django is a python framework for web development and pytest is a framework for testing our python code.
We're going to start by setting up a virtual environment. Then we're going to go ahead and activate the virtual environment.
Our virtual environmment is now activated as you can see here. Anything we install will only be available inside the virtual environment.
Normally people install python packages with pip install like this
This would install a python module called pytest.
However if we wanted to install multiple things that need compatible versions to work this would be difficult.
Instead we can use this amazing package called pip-tools which we're going to use to install all of the packages we need to be compatible.
We can install this with pip like so.
I want to specify that I want django==3.1 like so. But we also want to install compatible versions of djangorestframework and pytest .
We can then exit and save.
Then all we have to do to download these is the following command.
And just like that we have all of our python modules installed and we already know they will be compatible with each other.
We can now check that django is installed.
And that's it for this video, so hopefully that was useful, you'd now be able to set up your django project and use pytest and use djangorestframework.
Thank you for watching.
Hello friends, in this video I'm going to be showing you my favourite way to install python modules.
I will be showing you how to install compatible versions of django, djangorestframework and pytest.
Django is a python framework for web development and pytest is a framework for testing our python code.
We're going to start by setting up a virtual environment. Then we're going to go ahead and activate the virtual environment.
Our virtual environmment is now activated as you can see here. Anything we install will only be available inside the virtual environment.
Normally people install python packages with pip install like this
This would install a python module called pytest.
However if we wanted to install multiple things that need compatible versions to work this would be difficult.
Instead we can use this amazing package called pip-tools which we're going to use to install all of the packages we need to be compatible.
We can install this with pip like so.
I want to specify that I want django==3.1 like so. But we also want to install compatible versions of djangorestframework and pytest .
We can then exit and save.
Then all we have to do to download these is the following command.
And just like that we have all of our python modules installed and we already know they will be compatible with each other.
We can now check that django is installed.
And that's it for this video, so hopefully that was useful, you'd now be able to set up your django project and use pytest and use djangorestframework.
Thank you for watching.
Комментарии