Pipenvの使い方

botman_green Pythonとかラズパイ

はじめに

Pipenv の使い方にハマったのでメモ(ラズパイで使いました)。

GitHub pypa/pipenv

Pipenv とは

Pipenv はライブラリの管理をする pip と 仮想環境構築をする virtualenv(venv) の機能がそろったやつみたいです。GitHub に下記のようにありました。

You no longer need to use pip and virtualenv separately. They work together.

npm みたいなやつです(。。。たぶん)。

Pipenv インストール

とりあえずインストール!(きっと方法はなんでもいい)とりあえず3つの方法を書いときます。pip でもできるけど pipx をすすめてました(違いはわかりません!)。

Pipenv 使い方

プロジェクトのディレクトリを作成しそこで色々コマンドを実行します。

初期化

初期化は下記のように細かいバージョン指定もできるようです。指定バージョンの python がない場合はインストールしてくれます。初期化後、仮想環境が構築され Pipfile が作成されます。

パッケージの管理

この辺は cocoapods と同じような感じです。

パッケージのバージョン指定は下記のようにします。

その他のコマンド

その他使いそうなコマンドです。

ずっと python hoge.py をやってインストールしたモジュールがありませんでハマってしまった。。。

おわりに

これで私も pythonist だ!!

参考

コメント

  1. porno より:

    Thanks for sharing, this is a fantastic blog article. Much thanks again. Really Great. Malinda Allen Brenton

  2. altyazili izle より:

    Really appreciate you sharing this post.Really looking forward to read more. Want more. Jon Truxell

  3. here より:

    Appreciate this post. Let me try it out.

  4. I am continually looking online for posts that can assist me. Thank you! Hosea Hattaway

  5. en yeni filmler より:

    Thanks a lot for the blog article.Really looking forward to read more. Much obliged. Shawn Gillem

  6. filmi full izle より:

    I really enjoy the blog post.Really looking forward to read more. Really Great. Clara Mcminn

  7. staci bieber より:

    I randomly stopped by your site but you are really successful

  8. janyce swihart より:

    It was very useful, I can say it was a useful article for me.

  9. I am thinking of visiting your website again Thanks

  10. dorian bent より:

    I like a very useful article, I like our page and follow it

  11. pedro corbridge より:

    If you are going for best contents like I do, only go to see this web page all the time because it presents feature contents, thanks

  12. jonah fernatt より:

    I like and follow your site, thanks

  13. maribeth bodden より:

    I must say I read a great article with pleasure

  14. En iyi yaş kedi mamaları, hangi yaş kedi maması daha iyi, besin değeri yüksek 2022’nin en iyi 6 yaş kedi maması hakkında detayları haberimizde bulabilirsiniz.

タイトルとURLをコピーしました