How to Build Python Packages for Pip

Поділитися
Вставка
  • Опубліковано 26 жов 2024

КОМЕНТАРІ • 49

  • @RudradeepMukherjee
    @RudradeepMukherjee Рік тому +1

    Thank you James. Appreciate it. Created my first python package with your help. For people reading this, the install url has a space between simple/ and your package name. Good luck and have a great day/night everyone.

  • @bosra11
    @bosra11 2 роки тому +3

    This is a brilliant tutorial. This is a must watch for anyone thinking about being a Python developer!

  • @uliuphoff1470
    @uliuphoff1470 Рік тому

    Thanks for this great tutorial. After being a simple user of packages for a long time I now get the the pieces of the puzzle together how to create usable python packages. Everything is well explained and due to the step by step approach I can now try to program, setup, built and upload my own packages.

  • @alphonseinbaraj7602
    @alphonseinbaraj7602 3 роки тому +1

    I will do by following your procedure to create package soon. Thank you very much

    • @jamesbriggs
      @jamesbriggs  3 роки тому

      that's awesome, feel free to share it here or on discord :) discord.gg/7t2CGNJdZm

  • @aavvironalex
    @aavvironalex Рік тому

    Awesome video, made one of my goals for the summer of 2023 true! Thanks a lot!

  • @frodethorsenbrseth5014
    @frodethorsenbrseth5014 2 роки тому +7

    I've been trying to get my head around this stuff the past couple of days, and found this video very helpful, especially about which files are uploaded to pypi and how to.
    The only thing I would add here is that, I read about PEP-621, where it seems that the community now has chosen the pypackage.toml file to contain all metadata. I was surprised to see the setup.cfg file in this. Could the contents of setup.cfg be slightly reformatted and instead put inside pypackage.toml?

  • @CrossK6
    @CrossK6 3 роки тому +2

    Thank you for this video !
    I love you VS Code thème 😍
    Which one are you using ?
    Thank you very much !

    • @jamesbriggs
      @jamesbriggs  3 роки тому +3

      Synthwave 84 x Flouromachine - find it here marketplace.visualstudio.com/items?itemName=webrender.synthwave-x-fluoromachine :)

  • @JoshvsData
    @JoshvsData 3 роки тому +3

    This was a great tutorial! Hopefully I'll be able to share my first python package soon

    • @jamesbriggs
      @jamesbriggs  3 роки тому

      hey John yes please do that'd be awesome to see, we have a discord chat too so if you like you can share it there :)
      discord.gg/c5QtDB9RAP

    • @Stopinvadingmyhardware
      @Stopinvadingmyhardware Рік тому

      Josh? This isn’t Texas. I’m not that girls Uncle.

  • @fabianabarca
    @fabianabarca 2 роки тому

    Thanks! Very helpful and detailed

  • @foreach1
    @foreach1 3 роки тому +1

    Thanks! I just post so that you can have more visibility ;-) #python #tutorial #Pip #Packages

  • @yawofori-addae3888
    @yawofori-addae3888 2 роки тому

    First off, super great tutorial. It’s made creating packages really easy for me.
    A question I had was, if I wanted to include a whole folder that had things I needed for my package, how would I do this? I tried using the approach you used for the images, but maybe I am doing it wrong because I keep getting errors when I do a ‘pip install .’ to test things before building the wheel. I have a folder with files needed for an ML package I am building, but I’m having problems including the folder as a whole in the wheel package, so I can easily point a function to the folder

  • @titusfx
    @titusfx 2 роки тому

    Hi thanks for the video. What about the dependencies? How we specify that? Also what if we want to install it locally? Thanks

  • @platano5805
    @platano5805 3 роки тому

    Great video! .....But I must know.... Where did you get those desktop wallpapers?!?

    • @jamesbriggs
      @jamesbriggs  3 роки тому

      Haha, I don't remember these exact pictures but a google search for something like '4K landscapes', '4K desktop backgrounds', or '4K desktop backgrounds abstract' is probably the source :)

  • @snipzmattio5887
    @snipzmattio5887 2 роки тому +1

    16:17
    I cant do python -m build
    It says that /usr/bin/python: No module named build.__main__; 'build' is a package and cannot be directly executed

  • @Diffyemo
    @Diffyemo 2 роки тому +1

    Thank you. I really needed this video. I had been trying to figure out why my relative paths break on install. Instead of using resources and io I used import os.
    I made a simple function:
    def get_dir() -> str:
    return os.path.dirname(os.path.realpath(__file__))
    Then used that to get the path needed to retrieve any files (in this case .sql files).
    Do you see any disadvantage to this approach compared to the approach you use?

  • @andrewdavies5722
    @andrewdavies5722 2 роки тому

    how do you add requirements.txt file for larger projects?

  • @lethong5348
    @lethong5348 2 роки тому

    Thank you very much!. I love you.

  • @davidxcohen
    @davidxcohen 2 роки тому

    Thank you James, Super digest How to ... video. Appreciated ....

  • @ShivamPatel-yg3kd
    @ShivamPatel-yg3kd Рік тому

    Which vscode theme you are using?

    • @jamesbriggs
      @jamesbriggs  Рік тому

      Synthwave 84 - marketplace.visualstudio.com/items?itemName=RobbOwen.synthwave-vscode

  • @themathforyou
    @themathforyou Рік тому

    What is your theme?

  • @oumaimasouid5229
    @oumaimasouid5229 Рік тому

    thank you

  • @baldmancodes9824
    @baldmancodes9824 2 роки тому

    Great job on this tutorial. I tried some other tuts on UA-cam. This one was by far the most clear on the subject.

  • @abhiwanders3607
    @abhiwanders3607 3 роки тому

    james! i have my import nltk in my main.py file ... when i try i to build my package i get the error saying that no module named nltk.. how to resolve this please help

    • @jamesbriggs
      @jamesbriggs  3 роки тому

      Do you have NLTK installed on your machine? You will need to specify NLTK in the setup.cfg file under the 'install_requires' parameter - there's an example here: setuptools.readthedocs.io/en/latest/userguide/declarative_config.html
      Hope that helps!

  • @willborucki4530
    @willborucki4530 Рік тому

    great video!

  • @mrj1997
    @mrj1997 3 роки тому

    Thanks, great content.

  • @sureshg7124
    @sureshg7124 Рік тому

    Not Clear

  • @kartikkumarsrivastava3288
    @kartikkumarsrivastava3288 3 роки тому

    Awesome thanks

  • @Meowmeowcat312
    @Meowmeowcat312 2 роки тому

    HTTPError: 403 Forbidden from upload.pypi.org/legacy/
    Invalid or non-existent authentication information. See pypi.org/help/#invalid-auth for more information.
    PyPI upload failed

    • @ianyourgod
      @ianyourgod 2 роки тому

      i got this too and nothing is helping.

    • @Meowmeowcat312
      @Meowmeowcat312 2 роки тому

      @@ianyourgod its worked for me whenbi changed name

    • @ianyourgod
      @ianyourgod 2 роки тому +1

      @@Meowmeowcat312yeah i managed to fix it by using a script to write the token for me

    • @PrivateKero
      @PrivateKero Рік тому

      @@Meowmeowcat312 What name did you change? From the repository or the username?

  • @thecoldlemonade3532
    @thecoldlemonade3532 2 роки тому

    Are you divorced and was her name Abby?

  • @snipzmattio5887
    @snipzmattio5887 2 роки тому

    Thank you