0:33 when you use the pip package managers, 1:06 pipenv automatically creates and manages an virtual environment 1:11 it also allows us to easily add and remove packages using a *pip file* 1:35 cheat sheet 2:28 *pip3 install pipenv* 2:43 *pip3 freeze* 3:28 activate environment - *pipenv shell* 5:06 *pipenv install* camelcase 7:15 how to packages 7:19 how to show packages in your pipenv - *pipenv lock -r* 7:36 *pipenv uninstall* camelcase 7:58 install to dev environment 8:27 install packages from requireents.txt 9:30 pipenv install -r requirements.txt 11:10 check for security and vulnerability 12:28 build dependency tree/graph 12:55 reinstall camelcase - 13:05 * (asterisk) mean the *latest version* 13:12 when you deploy, you want to make sure that you usually want to use the *lock* file by ignoring the *Pipfile* -> 13:39 prepare your lock file
Setting up a new computer, I had to revisit this video to debug my containerized Python development tools (Python3, pip3, pipenv, and pylint) . Hint: Do Not hard-code the VOLUME and WORKDIR into the container definition; pass them as arguments to Docker at run-time. This video is the most concise, practical video about pipenv that I have watched.
I'm a Java and JavaScript guy so this made a LOT of sense. Great video. Honestly, I am focusing more on JavaScript and Python nowadays. They seem to have a lot of innovation going on. That and Rust. I am learning Rust for WebAssembly.
I'm really loving your Python stuff. Between React, Node, and Python, you do a great job of preparing developers for the employable stacks of today. Keep the Python coming. Love it.
Can we use the different python version in pipenv, like as you might know tensorflow doesn't work with python 3.7 you need to have python 3.6 to run and test tensorflow, although im using docker and docker image ofr tensorflow/tensorflow. but i wanna know is it possible with pipenv?
I just read about pipenv couple hours ago, and now this video released. Great. All good things of PHP Composer, Nodejs NPM/Yarn, and Maven came with this tool. By the way, instead using python3/pip3 or pythonVERSION, you can set your default Python version.
These high production quality videos exist for a reason. To rope people into certain things or give them a perspective that the big companies want them to have. And, people who code are going to bend the knee easier to propaganda because of the thought patterns of the environments they are in typically all lean one way. This cycle has been observable since around 2014 Don't get me wrong free Tuts are a good thing. But it's always more of a grift than a gift. Grift grift grift
HEY BRAD, as one of your big fans, I urge you to HIRE somebody to answer questions in the Q&A section of your paid courses in udemy and other sites, you are a great instructor and I like your way, but I get very very frustrated when I have a question and i get no response whatsoever, I understand you are doing a lot of things and probably don't have time to follow up with each question, but at least hire somebody to do that. thanks !
@@Ronium22 yeah google should be able to answer any question I have as much as I can get any knowledge I want by reading books and references, the point of taking a course is to acquire a specific knowledge in as little time as possible, I am sure you know how complicated and time-consuming it could get to explain a certain question in stackoverflow as an example, that in case I didn't find a direct and fast answer in google, which I always try to do, that's why I say it'd be much faster to have somebody to respond to a question if its on a certain topic in the course without the need to explain and reproduce a ton of code which could take hours just to come up with an easy way to illustrate it, I enjoy listening and learning from brads courses, but I have the right to express an opinion since I am paying for the service I am getting. and it's just a recommendation at the end.
Do we have to make the virtual environment for every project? If I install numpy in a virtual environment, can I access it anywhere else? Also @ 7:05 is did not get capitalized
No pip file created of as today, "Creating PipFile for this project..." is skipped and cmd lists straight to "Launching subshell in virtual environment". Is there a reason / concern for this or another way to view this file? Thought maybe it was a hidden file but that was not the case, giving me the assumption it was never created.
hello sir ,I have installed anaconda navigator ... when I run command to install pipenv it says requirement already satisfied and when I try to use it it shows pipenv is not recognised as internal or external command ... I tried using windows command prompt and jupyter notebook , still same error .
After installing Django and running command 'pipenv shell' the virtual envieroment is not running on (pipenv_crash_course) rather its running on (ankur) Virtualenv location: /home/ankur/.local/share/virtualenvs/ankur-0RdmWIa8. Is it a problem? HELP !!!
Hello Sir, when I type the comman pip3 install pipenv, I have this type of error: Traceback (most recent call last): File "/usr/local/bin/pip", line 7, in from pip._internal.cli.main import main File "/home/nvidia/.local/lib/python3.5/site-packages/pip/_internal/cli/main.py", line 57 sys.stderr.write(f"ERROR: {exc}") ^ SyntaxError: invalid syntax Could you help me please?
one more thing, don't promise that you will update a course or add more topics to it unless you're sure that you will. and it would be better if you provide a time frame to that, again this is from a big fan of yours. thanks and Merry Christmas
This video was very helpful Brad, thanks plenty. I'm experiencing a problem with my pipenv tho and I'll be glad if you find time to help out. Whever I run "pipenv install django" the pipfile is created in the expected folder, but the pipfile.lock file isn't created. It produces this error: Adding django to Pipfile's [packages]... Pipfile.lock not found, creating... Locking [dev-packages] dependencies... Locking [packages] dependencies... b\site-packages\pipenv\utils.py", line 402, in resolve_deps req_dir=req_dir File "c:\program files\python things\lib\site-packages\pipenv\utils.py", line 250, in actually_resolve_deps req = Requirement.from_line(dep) File "c:\program files\python things\lib\site-packages\pipenv\vendor equirementslib\models equirements.py", line 704, in from_line line, extras = _strip_extras(line) TypeError: 'module' object is not callable Thanks plenty for your help.
nice tutorial, but, wouldn't the utility of pipenv become highlighted if things are explained with more than one virtual environments and switching between them.
I do like "pipenv --rm" which deletes the virtual env files of the project you are in. Useful when you are cleaning up older project files not required any longer..
PipEnv - introduction to pipenv why we need that instead of virtualenv ? - pipenv automatically install and manage virtual environment and provide easy way to add and remove packages using pip file which is similar to package.json in node environment. We have cheatsheet of pipenv made by traversymedia gist.github.com/bradtraversy/c70a93d6536ed63786c434707b898d55 when I was installing pip3 at the first time it was working fine but whenever I have installed pipenv and then again trying that out in my project folder it was showing error like Traceback (most recent call last): File "/usr/bin/pip3", line 9, in from pip import main ImportError: cannot import name 'main' That simply means that I havenot installed pip3 properly and I had searched for it in stackoverflow and finally got solution first attempt: askubuntu.com/questions/1025793/running-pip3-importerror-cannot-import-name-main failed !!!!!!!!! second attempt: askubuntu.com/questions/969463/python3-pip3-install-broken-on-ubuntu?rq=1 what was the propblem then ?? I just forgot to use sudo to install pip3 packages LOL AFTER SOLUTION WHAT NEXT ?? LETS DIVE INTO THE CHEAT SHEET AGAIN …. Problem again :( I have tried the command : pipenv shell to activate the pipenv and got the error as not expected pipenv command not found :( let us search for it again in stack overflow… Attempt 1 : and eventually got the success on it .. link: stackoverflow.com/questions/46391721/pipenv-command-not-found what was the problem ?? They have told that I had issue again not installing pipenv golbally again :) that little shit of SUDO again………. Solutions are already in that link but DONT FORGET TO USE SUDO while installing pipenv :) I had already installed it so I have to manage the path and as solution recommended I had done it like PYTHON_BIN_PATH="$(python3 -m site --user-base)/bin" PATH="$PATH:$PYTHON_BIN_PATH" with these aforementioned commands. INSTALLED ? THEN WHAT ???????????? activate ?? command is : pipenv shell BEFORE DOING SO WE NEED TO GOTO OUR PROJECT folder other wise it will create pipfile in user directory CORRECT ME IF I AM WRONG .. NEW TO LINUX SYSTEM How does Pipfile looks like : [[source]] name = "pypi" url = "pypi.org/simple" verify_ssl = true [dev-packages] [packages] [requires] python_version = "3.6" OK …… THEN ?? command : pip3 freeze for what ? => to show the currently available environment on my machine result => blank :D I don't have any any projects and environment till now I will check this out again later…. Have you noticed that we dont have to do python3 -version now … python -version will show the current version of python and in my case its 3.6 we are in completely different environment with pipenv wanna check that out ??? command: python then user commands like import sys => import system file sys.executable =>showing executable path of python it will display the your python file path on your machine… quit ?? use quit() so get back to pipenv with pipenv shell command so for testing we are going to install very comman package with pipenv install command command: pipenv install camelcase wanna check Pipfile ?? it looks like [[source]] name = "pypi" url = "pypi.org/simple" verify_ssl = true [dev-packages] [packages] camelcase = "*" [requires] python_version = "3.6" Have you noticed new package there .. * mean the latest version.. OMG that have created .lock file as well WHAT IS LOCK FILE THEN.. ?? .lock file will have all the dependencies and all of other dependencies of that dependencies It will provide us the final build so that we can use same version of everything while deploying project. CHECKING ON PYTHON TERMINAL NOW … Python 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from camelcase import CamelCase >>> c = CamelCase() >>> s = 'this is my string' >>> print(c.hump(s)) This is My String how to list the packages with terminal command : pipenv lock -r UNINSTALL PACKAGE command: pipenv uninstall camelcase DEV DEPENDENCIES ??? => packages only for your dev environment not for your production environment how to do that with pipenv ?? =>pipenv install nose -dev so our pipfile looks like [[source]] name = "pypi" url = "pypi.org/simple" verify_ssl = true [dev-packages] nose = "*" [packages] [requires] python_version = "3.6" HAVE you noticed that ?? OK THEN … HOW TO INSTALL PACKAGES FORM requirements.txt file ?? simple command : pipenv install -r ./requirements.txt not going to try it for now …………. why not lets install django with requirements.txt file pip just created a requirements.txt file on root with single line Django==2.1.5 and ran the command pipenv install -r ./requirements.txt now we have django installed in our virtual environment… so let’s CREATE DJANGO PROJECT command: django-admin startproject testproject WOW what the heck was that it just happened very fast :) lets run that project command : python manage.py runserver WAIT WAIT !!! you are writing this command in wrong path first go to your TEST PROJECT PATH command: cd testproject then run it… hope you are getting expected output :D CHECK SECURITY ISSUE WITH pipenv command: pipenv check ALL PASSED FOR NOW :D HOW TO UPDATE VERSION OF packages …….. ??? => just update the version you want to install of specific package and run : pipenv install just like npm install or yarn install right ?? DEPENDENCIES TREE command : pipenv graph => this will show the graph or tree version of your dependencies and their dependencies …. AT LAST HOW TO MAINTAIN DEPENDENCIES AND THEIR VERSION ON PROJECTION ?? IF you run the command pipenv install in the server and they have * for their version then that will install lastes version ot that dependency so that to manage that we can instead use .lock file to maintain the versioning as per the development. - ignoring pipfile and use lock file - pipenv lock (for making lock file ) - pipenv install -ignore-pipfile DO YOU KNOW WE CAN USE PIPENV OUTSIDE THE VIRTUAL ENVIRONMENT FILE ?? go back to your global scope : exit command : pipenv run python this will open python terminal in the version that is installed in pipenv environment.. ALL CREDIT GOES TO TRAVERSY MEDIA :D ……. SORRY FOR MY EULISH :D
when i write "pipenv shell". firstly it doesn't show folder name in parenthesis and most importantly it doesn't create a pipfile. i"m using git-bash shell in vs code human@DESKTOP-DM38E59 MINGW64 ~/Desktop/django_proj $ pipenv shell Creating a virtualenv for this project… Pipfile: C:\Users\human\Pipfile Using C:/Program Files (x86)/Python37-32/python.exe (3.7.3) to create virtualenv… [ ==] Creating virtual environment...Using base prefix 'C:\\Program Files (x86)\\Python37-32' New python executable in C:\Users\human\.virtualenvs\human-n2gDkG13\Scripts\python.exe Installing setuptools, pip, wheel... done. Running virtualenv with interpreter C:/Program Files (x86)/Python37-32/python.exe Successfully created virtual environment! Virtualenv location: C:\Users\human\.virtualenvs\human-n2gDkG13 Launching subshell in virtual environment…
This kind of explains the grift. th-cam.com/video/thxlNdUXopI/w-d-xo.html Or why we have so many high production level accounts shilling JavaScript If we have good free stuff , you should always question why... and what incentivized this.. Don't get me wrong it's a grift that I like so it's okay.
0:33 when you use the pip package managers,
1:06 pipenv automatically creates and manages an virtual environment 1:11 it also allows us to easily add and remove packages using a *pip file*
1:35 cheat sheet
2:28 *pip3 install pipenv*
2:43 *pip3 freeze*
3:28 activate environment - *pipenv shell*
5:06 *pipenv install* camelcase
7:15 how to packages
7:19 how to show packages in your pipenv - *pipenv lock -r*
7:36 *pipenv uninstall* camelcase
7:58 install to dev environment
8:27 install packages from requireents.txt
9:30 pipenv install -r requirements.txt
11:10 check for security and vulnerability
12:28 build dependency tree/graph
12:55 reinstall camelcase - 13:05 * (asterisk) mean the *latest version*
13:12 when you deploy, you want to make sure that you usually want to use the *lock* file by ignoring the *Pipfile* -> 13:39 prepare your lock file
Setting up a new computer, I had to revisit this video to debug my containerized Python development tools (Python3, pip3, pipenv, and pylint) . Hint: Do Not hard-code the VOLUME and WORKDIR into the container definition; pass them as arguments to Docker at run-time. This video is the most concise, practical video about pipenv that I have watched.
still is the best tutorials for pipenv after 3 years. thanks Brad
After a bit of tinkering about this morning, your video helped clear a few things. Badly needed pipenv commands. Thanks Brad. Great share!
I'm a Java and JavaScript guy so this made a LOT of sense. Great video. Honestly, I am focusing more on JavaScript and Python nowadays. They seem to have a lot of innovation going on. That and Rust. I am learning Rust for WebAssembly.
I'm really loving your Python stuff.
Between React, Node, and Python, you do a great job of preparing developers for the employable stacks of today.
Keep the Python coming. Love it.
I was just reading about it this morning :)
Favourite notification ❤
Can we use the different python version in pipenv, like as you might know tensorflow doesn't work with python 3.7 you need to have python 3.6 to run and test tensorflow, although im using docker and docker image ofr tensorflow/tensorflow. but i wanna know is it possible with pipenv?
I just read about pipenv couple hours ago, and now this video released. Great.
All good things of PHP Composer, Nodejs NPM/Yarn, and Maven came with this tool.
By the way, instead using python3/pip3 or pythonVERSION, you can set your default Python version.
Brad, thanks for this gift.
These high production quality videos exist for a reason. To rope people into certain things or give them a perspective that the big companies want them to have.
And, people who code are going to bend the knee easier to propaganda because of the thought patterns of the environments they are in typically all lean one way.
This cycle has been observable since around 2014
Don't get me wrong free Tuts are a good thing.
But it's always more of a grift than a gift.
Grift grift grift
You do a nice job explaining what your doing, thank you. I didn't realize Python development had this capability.
This was a very helpful and time efficient introduction to pipenv. Thank you.
If pipenv shell is using 2.7 by default, you can do
pipenv shell --python your.python.version
like
pipenv shell --python 3.8
If you want to check the location of your executable, you can directly use the command which ie: which python
HEY BRAD, as one of your big fans, I urge you to HIRE somebody to answer questions in the Q&A section of your paid courses in udemy and other sites, you are a great instructor and I like your way, but I get very very frustrated when I have a question and i get no response whatsoever, I understand you are doing a lot of things and probably don't have time to follow up with each question, but at least hire somebody to do that. thanks !
mo swilam Google should be able to answer quite literally any question you have.
@@Ronium22 yeah google should be able to answer any question I have as much as I can get any knowledge I want by reading books and references, the point of taking a course is to acquire a specific knowledge in as little time as possible, I am sure you know how complicated and time-consuming it could get to explain a certain question in stackoverflow as an example, that in case I didn't find a direct and fast answer in google, which I always try to do, that's why I say it'd be much faster to have somebody to respond to a question if its on a certain topic in the course without the need to explain and reproduce a ton of code which could take hours just to come up with an easy way to illustrate it, I enjoy listening and learning from brads courses, but I have the right to express an opinion since I am paying for the service I am getting. and it's just a recommendation at the end.
Very well organized and direct.
Thanks!
Great job of making Pipenv make sense to me. I really appreciate your work.
Thank you Brad, Merry Christmass
Merry Chirstmas to you too :)
glad i'm not the only one who found venv somewhat confusing with poor UX, especially after getting familiar with NPM
pipenv file doesn`t show at my end, should I open something before?
please tell me how to open it
and was it for subshell/local pipenv???
If I install packages inside the shell using the regular "pip install", is there any way I can get the Pipfile updated to include those packages?
great video. but I want to make requriments.txt file from pip file. how can I do that?
Do we have to make the virtual environment for every project?
If I install numpy in a virtual environment, can I access it anywhere else?
Also @ 7:05 is did not get capitalized
I am completely out off python but still clicked here just to give it a like
No pip file created of as today, "Creating PipFile for this project..." is skipped and cmd lists straight to "Launching subshell in virtual environment". Is there a reason / concern for this or another way to view this file? Thought maybe it was a hidden file but that was not the case, giving me the assumption it was never created.
A very timely video Brad. Thanks. Also wanted to say the udemy course is really awesome.
I had a locking fail when trying to install psycopg2 and psycopg2-binary.
hello sir ,I have installed anaconda navigator ...
when I run command to install pipenv it says requirement already satisfied and when I try to use it it shows pipenv is not recognised as internal or external command ... I tried using windows command prompt and jupyter notebook , still same error .
After installing Django and running command 'pipenv shell' the virtual
envieroment is not running on (pipenv_crash_course) rather its running on (ankur)
Virtualenv location:
/home/ankur/.local/share/virtualenvs/ankur-0RdmWIa8. Is it a problem?
HELP !!!
Cheers Brad. Love your vids man, so helpful and inspiring.
Thank you Brad for your awesome contents 😍😍😍. Merry Christmas
Wow! That makes everything just so much cleaner! Thank you 😊
Hello Sir, when I type the comman pip3 install pipenv, I have this type of error:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in
from pip._internal.cli.main import main
File "/home/nvidia/.local/lib/python3.5/site-packages/pip/_internal/cli/main.py", line 57
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
Could you help me please?
simple and to the point, thank you :)
Thank you so much, sir, for sharing this knowledge.
Another great video :) Thanks Brad!
Good notification, and what is important, without accent
Wow this is epic! It changes everything 🤯 So cool thanks for the video
Can't import numpy
ModuleNotFoundError: No module named 'numby'
Although it shows it in the pipfile
yea, I like the old way...I like having control of where the files are put
We need Flutter Brad, flutter 1.0 released few days ago
why the bash sign has (pipenv-crash-course), I mean , how to add our custom one..
Merry Christmas and Happy new year, will still update during holiday?
one more thing, don't promise that you will update a course or add more topics to it unless you're sure that you will. and it would be better if you provide a time frame to that, again this is from a big fan of yours. thanks and Merry Christmas
Great thorough Tutorial! thanks
I suggest to make a speacial for python tuto . it's really recommended & it's help people to find courses
Exactly what I was looking for! Thank yoU!
Great video thanks. What about installing packages like pybind11 where you need to include header files in your C++ project?
I'd like to see a video on making quiz app on vanilla js. There are few crappy on TH-cam but I want a tutorial from Brad.
Excellent tutorial, as always .Quick question - will these commands work on windows 7?
Thank you for the vid. Do we need to install Python3 first to be able to install pipenv? Can I just install pipenv with python2? Thanks :)
Why is 'i' in 'is' not capitalized wheu u used hump()?
right in the time I need it thank you so much!!!
pipenv lock -r won`t work??
So when u dropping those c# tutorials ( :
Thanks for the great video!
I have a small question: what should be committed to git? The pip lock or the pip file? (or both)
always commit the package manager .lock file, be it php/nodejs/python
It works also good with PyCharm
I keep running into environment not locking on Windows.
Really weird. Regular venv works
Very Useful, thanks Brad :)
This video was very helpful Brad, thanks plenty. I'm experiencing a problem with my pipenv tho and I'll be glad if you find time to help out. Whever I run "pipenv install django" the pipfile is created in the expected folder, but the pipfile.lock file isn't created. It produces this error:
Adding django to Pipfile's [packages]...
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
b\site-packages\pipenv\utils.py", line 402, in resolve_deps
req_dir=req_dir
File "c:\program files\python things\lib\site-packages\pipenv\utils.py", line 250, in actually_resolve_deps
req = Requirement.from_line(dep)
File "c:\program files\python things\lib\site-packages\pipenv\vendor
equirementslib\models
equirements.py", line 704, in from_line
line, extras = _strip_extras(line)
TypeError: 'module' object is not callable
Thanks plenty for your help.
Brad... its been a long time since your last angular tutorial :D
When does html and css course comes out, I'm excited !
Things have slowed down due to the holidays but it will def be out in January :)
@@TraversyMedia is the html and css course a udemy xourse.
@@yamacode9958 Yes it should be about 15 hours or so with projects as well as deeper learning
@@TraversyMedia Early january please
(pipenvdemo) bash-3.2$ pipenv lock -r
Usage: pipenv lock [OPTIONS]
Try 'pipenv lock -h' for help.
Error: No such option: -r
plz help me
how to access pipenv projects, how to move dev packages to normal dependency packages, how to change python version in pipenv
nice tutorial, but, wouldn't the utility of pipenv become highlighted if things are explained with more than one virtual environments and switching between them.
I do like "pipenv --rm" which deletes the virtual env files of the project you are in. Useful when you are cleaning up older project files not required any longer..
Can you do a video on Poetry? It's an alternative to pipenv.
Can you do a video on Poetry + Pyenv
How come “is” is not capitalized?
Why not Conda?
Respect bro. Thanks ♥
PipEnv
- introduction to pipenv why we need that instead of virtualenv ?
- pipenv automatically install and manage virtual environment and provide easy way to add and remove packages using pip file which is similar to package.json in node environment.
We have cheatsheet of pipenv made by traversymedia
gist.github.com/bradtraversy/c70a93d6536ed63786c434707b898d55
when I was installing pip3 at the first time it was working fine but whenever I have installed pipenv and then again trying that out in my project folder it was showing error like
Traceback (most recent call last): File "/usr/bin/pip3", line 9, in from pip import main ImportError: cannot import name 'main'
That simply means that I havenot installed pip3 properly and I had searched for it in stackoverflow and finally got solution
first attempt:
askubuntu.com/questions/1025793/running-pip3-importerror-cannot-import-name-main
failed !!!!!!!!!
second attempt:
askubuntu.com/questions/969463/python3-pip3-install-broken-on-ubuntu?rq=1
what was the propblem then ??
I just forgot to use sudo to install pip3 packages LOL
AFTER SOLUTION WHAT NEXT ?? LETS DIVE INTO THE CHEAT SHEET AGAIN ….
Problem again :(
I have tried the command : pipenv shell to activate the pipenv and got the error as not expected
pipenv command not found :( let us search for it again in stack overflow…
Attempt 1 : and eventually got the success on it ..
link: stackoverflow.com/questions/46391721/pipenv-command-not-found
what was the problem ??
They have told that I had issue again not installing pipenv golbally again :) that little shit of SUDO again……….
Solutions are already in that link but DONT FORGET TO USE SUDO while installing pipenv :)
I had already installed it so I have to manage the path and as solution recommended I had done it like
PYTHON_BIN_PATH="$(python3 -m site --user-base)/bin"
PATH="$PATH:$PYTHON_BIN_PATH"
with these aforementioned commands.
INSTALLED ? THEN WHAT ????????????
activate ??
command is : pipenv shell
BEFORE DOING SO WE NEED TO GOTO OUR PROJECT folder other wise it will create pipfile in user directory CORRECT ME IF I AM WRONG .. NEW TO LINUX SYSTEM
How does Pipfile looks like :
[[source]]
name = "pypi"
url = "pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
[requires]
python_version = "3.6"
OK …… THEN ??
command : pip3 freeze
for what ? => to show the currently available environment on my machine
result => blank :D I don't have any any projects and environment till now I will check this out again later….
Have you noticed that we dont have to do python3 -version now … python -version will show the current version of python and in my case its 3.6
we are in completely different environment with pipenv wanna check that out ???
command: python
then user commands like
import sys => import system file
sys.executable =>showing executable path of python
it will display the your python file path on your machine…
quit ?? use quit()
so get back to pipenv with pipenv shell command
so for testing we are going to install very comman package with pipenv install command
command: pipenv install camelcase
wanna check Pipfile ?? it looks like
[[source]]
name = "pypi"
url = "pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
camelcase = "*"
[requires]
python_version = "3.6"
Have you noticed new package there .. * mean the latest version..
OMG that have created .lock file as well
WHAT IS LOCK FILE THEN.. ??
.lock file will have all the dependencies and all of other dependencies of that dependencies
It will provide us the final build so that we can use same version of everything while deploying project.
CHECKING ON PYTHON TERMINAL NOW …
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from camelcase import CamelCase
>>> c = CamelCase()
>>> s = 'this is my string'
>>> print(c.hump(s))
This is My String
how to list the packages with terminal
command : pipenv lock -r
UNINSTALL PACKAGE
command: pipenv uninstall camelcase
DEV DEPENDENCIES ??? => packages only for your dev environment not for your production environment
how to do that with pipenv ??
=>pipenv install nose -dev
so our pipfile looks like
[[source]]
name = "pypi"
url = "pypi.org/simple"
verify_ssl = true
[dev-packages]
nose = "*"
[packages]
[requires]
python_version = "3.6"
HAVE you noticed that ??
OK THEN …
HOW TO INSTALL PACKAGES FORM requirements.txt file ??
simple command : pipenv install -r ./requirements.txt
not going to try it for now …………. why not lets install django with requirements.txt file pip
just created a requirements.txt file on root with single line
Django==2.1.5
and ran the command pipenv install -r ./requirements.txt
now we have django installed in our virtual environment… so let’s CREATE DJANGO PROJECT
command: django-admin startproject testproject
WOW what the heck was that it just happened very fast :)
lets run that project
command : python manage.py runserver
WAIT WAIT !!! you are writing this command in wrong path first go to your TEST PROJECT PATH
command: cd testproject
then run it…
hope you are getting expected output :D
CHECK SECURITY ISSUE WITH pipenv
command: pipenv check
ALL PASSED FOR NOW :D
HOW TO UPDATE VERSION OF packages …….. ???
=> just update the version you want to install of specific package and run : pipenv install
just like npm install or yarn install right ??
DEPENDENCIES TREE
command : pipenv graph
=> this will show the graph or tree version of your dependencies and their dependencies ….
AT LAST HOW TO MAINTAIN DEPENDENCIES AND THEIR VERSION ON PROJECTION ??
IF you run the command pipenv install in the server and they have * for their version then that will install lastes version ot that dependency so that to manage that we can instead use .lock file to maintain the versioning as per the development.
- ignoring pipfile and use lock file
- pipenv lock (for making lock file )
- pipenv install -ignore-pipfile
DO YOU KNOW WE CAN USE PIPENV OUTSIDE THE VIRTUAL ENVIRONMENT FILE ??
go back to your global scope : exit
command : pipenv run python
this will open python terminal in the version that is installed in pipenv environment..
ALL CREDIT GOES TO TRAVERSY MEDIA :D ……. SORRY FOR MY EULISH :D
Woww i was looking for this.
when i write "pipenv shell". firstly it doesn't show folder name in parenthesis and most importantly it doesn't create a pipfile. i"m using git-bash shell in vs code
human@DESKTOP-DM38E59 MINGW64 ~/Desktop/django_proj
$ pipenv shell
Creating a virtualenv for this project…
Pipfile: C:\Users\human\Pipfile
Using C:/Program Files (x86)/Python37-32/python.exe (3.7.3) to create virtualenv…
[ ==] Creating virtual environment...Using base prefix 'C:\\Program Files (x86)\\Python37-32'
New python executable in C:\Users\human\.virtualenvs\human-n2gDkG13\Scripts\python.exe
Installing setuptools, pip, wheel...
done.
Running virtualenv with interpreter C:/Program Files (x86)/Python37-32/python.exe
Successfully created virtual environment!
Virtualenv location: C:\Users\human\.virtualenvs\human-n2gDkG13
Launching subshell in virtual environment…
make a video on developing a music website
Just use the tutorials he provides
abhinav chavali i am looking for back end stuff for a great music website :
Thank You!
Hello Brad.
Early bird 🐦
well done
Please do Tkinter crash course.
Genious!
awesome
For linux & mac:
which python
which python3
For windows:
where python
Pipenv is sooo slow to install simple packages!
Wth are dependancies, please explain the stuff instead of flexing technical terms.
i prefer venv.
😍😍😘
This kind of explains the grift.
th-cam.com/video/thxlNdUXopI/w-d-xo.html
Or why we have so many high production level accounts shilling JavaScript
If we have good free stuff , you should always question why... and what incentivized this..
Don't get me wrong it's a grift that I like so it's okay.
Virtualenv
First like