Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

No module named 'build' (package) #6

Open
iamalbert opened this issue Apr 22, 2017 · 2 comments
Open

No module named 'build' (package) #6

iamalbert opened this issue Apr 22, 2017 · 2 comments

Comments

@iamalbert
Copy link

iamalbert commented Apr 22, 2017

I am following the example to create a PIP-distribuable package

$ python setup.py sdist
$ pip install dist/my_package-0.1.tar.gz                                  

but I get this error

Processing ./dist/my_package-0.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-idyubtmj-build/setup.py", line 8, in <module>
        import build
    ModuleNotFoundError: No module named 'build'

It looks like build.py is not included in the package:

drwxr-xr-x xx/xx 0 2017-04-22 21:30 my_package-0.1/
drwxr-xr-x xx/xx 0 2017-04-22 21:30 my_package-0.1/my_package/
drwxr-xr-x xx/xx 0 2017-04-22 21:30 my_package-0.1/my_package/_ext/
drwxr-xr-x xx/xx 0 2017-04-22 21:30 my_package-0.1/my_package/_ext/my_lib/
-rw-r--r-- xx/xx 305 2017-04-22 21:30 my_package-0.1/my_package/_ext/my_lib/__init__.py
-rw-r--r-- xx/xx   0 2017-04-22 21:30 my_package-0.1/my_package/_ext/__init__.py
drwxr-xr-x xx/xx   0 2017-04-22 21:30 my_package-0.1/my_package/functions/
-rw-r--r-- xx/xx   0 2017-04-22 21:30 my_package-0.1/my_package/functions/__init__.py
-rw-r--r-- xx/xx 678 2017-04-22 21:30 my_package-0.1/my_package/functions/add.py
drwxr-xr-x xx/xx   0 2017-04-22 21:30 my_package-0.1/my_package/modules/
-rw-r--r-- xx/xx   0 2017-04-22 21:30 my_package-0.1/my_package/modules/__init__.py
-rw-r--r-- xx/xx 199 2017-04-22 21:30 my_package-0.1/my_package/modules/add.py
-rw-r--r-- xx/xx   0 2017-04-22 21:30 my_package-0.1/my_package/__init__.py
drwxr-xr-x xx/xx   0 2017-04-22 21:30 my_package-0.1/my_package.egg-info/
-rw-r--r-- xx/xx 248 2017-04-22 21:30 my_package-0.1/my_package.egg-info/PKG-INFO
-rw-r--r-- xx/xx 521 2017-04-22 21:30 my_package-0.1/my_package.egg-info/SOURCES.txt
-rw-r--r-- xx/xx   1 2017-04-22 21:30 my_package-0.1/my_package.egg-info/dependency_links.txt
-rw-r--r-- xx/xx  12 2017-04-22 21:30 my_package-0.1/my_package.egg-info/requires.txt
-rw-r--r-- xx/xx  11 2017-04-22 21:30 my_package-0.1/my_package.egg-info/top_level.txt
drwxr-xr-x xx/xx   0 2017-04-22 21:30 my_package-0.1/test/
-rw-r--r-- xx/xx 621 2017-04-22 21:30 my_package-0.1/test/test.py
-rw-r--r-- xx/xx 726 2017-04-22 21:30 my_package-0.1/setup.py
-rw-r--r-- xx/xx 248 2017-04-22 21:30 my_package-0.1/PKG-INFO
-rw-r--r-- xx/xx  38 2017-04-22 21:30 my_package-0.1/setup.cfg
@GarotoOuro
Copy link

pip install build

@AndreyDodonov-EH
Copy link

py -m pip install --upgrade build

As per

https://packaging.python.org/en/latest/tutorials/packaging-projects/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants