How to Install Git, Git Bash, and Virtual Python Environment (venv)

Поделиться
HTML-код
  • Опубликовано: 5 окт 2024
  • How to set up virtual python environment (venv) in Visual Studio Code and PyCharm's terminal

Комментарии • 7

  • @camiloalonso3709
    @camiloalonso3709 2 года назад

    Absolute fucking legend!! been looking for this for like 10 mins already

  • @emekudoh5650
    @emekudoh5650 2 года назад

    Thank you...awesome.

  • @arthurj9472
    @arthurj9472 Год назад

    Miami dade college !

  • @mssafy2592
    @mssafy2592 2 года назад

    thank you very much for your effort
    I have a problem , I create a python file then I create a venv in the bash terminal , then I download a backage in the venv after activation ,and then install and import a backage in the python file , but it give an error to the package import , then I run the code by the terminal
    test.venv\Scripts\python.exe and then the path of the python file I created in vscode of python , and yes the code is run in the terminal but still give me an error in the python file in vscode . how could I change the directory of the file to this specific env ??when io ever I sat run it will run it in the master pyton interpreter and not in the env
    pls help me I have tons of files I need to move them in venv and I don't know how .

    • @jfleischer
      @jfleischer  2 года назад +1

      This depends on how you are running the Python file. You can run the Python file in VSCode by clicking the Play button, or you can type in the terminal "python MyPythonFile.py" and press Enter. but change the MyPythonFile.py part to the actual name of your python file.
      you mentioned that, yes it is run in the terminal, but it gives you an error in vscode probably because you use the Play button and the VSCode is not set to use the virtual environment. so do this: go to VSCode. and you see in my video at 11:40 ? in the bottom left or the bottom right where it says the Python version number, click on it and then you will see a menu pops up to choose your environment. so you type in test.venv/Scripts/python.exe

    • @mssafy2592
      @mssafy2592 2 года назад

      @@jfleischer omg thank a thousand time
      It did run the file in the venv thank you again 💓

    • @jfleischer
      @jfleischer  2 года назад +1

      @@mssafy2592 fantastic