![]() To build your project, go in your project folder (here A/) and run this command: python3 setup.py sdist You can setup a new env with the good version with: pipenv -python 3.6 command. Then you can check by opening your python shell and do: import myPackageīe sure your pipenv is the right python version. Import A without building it pip pip install The setup.py file contains this ( setuptools page for more details): from setuptools import setup, find_packages | myfile.py (contains a hello() function) StructureĪs example I will use this project architecture for A: A/ pip and pipenv will raise an error if there is no setup.py file at the root of you project A (even if you don't build your project). ![]() (Even if recent versions of python doesn't need _init_.py, it seems pip and pipenv still need it.) Do I need a setup.py file in A? pip and pipenv need an _init_.py file (can be empty) in A if you want to be able to import A in B. Do I need an _init_.py file for A packages? Pipenv is a venv tool liked to a specific project / folder. You can do pip -version to check to which python, pip is liked to. To be sure you understand, pip is the package manager of your global python interpreter. Pipenv install path/to/your/package Prelude Tested on python 3.6.9 with pip 20.2.2 and pipenv 2020.6.2 TL DR ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |