Cannot run bdist_wheel build command on my setup.py - python

I have created a pypi package for educational purposes, and I wanted to do an upgrade. I did through the usual steps(do the changes, run setup.py etc)
but when I do:
python3 setup.py bdist_wheel
I am getting the error
python3 setup.py build bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
Wheel and pip are installed and up to date:
pip3 install wheel
Requirement already satisfied: wheel in /usr/local/lib/python3.4/dist-
packages (0.31.0)
The help of the command, does not seem to support bdist_wheel.
Am I missing something?
python3 setup.py --help-commands
Standard commands:
build build everything needed to install
build_py "build" pure Python modules (copy to build directory)
build_ext build C/C++ extensions (compile/link to build directory)
build_clib build C/C++ libraries used by Python extensions
build_scripts "build" scripts (copy and fixup #! line)
clean clean up temporary files from 'build' command
install install everything from build directory
install_lib install all Python modules (extensions and pure Python)
install_headers install C/C++ header files
install_scripts install scripts (Python or otherwise)
install_data install data files
sdist create a source distribution (tarball, zip file, etc.)
register register the distribution with the Python package index
bdist create a built (binary) distribution
bdist_dumb create a "dumb" built distribution
bdist_rpm create an RPM distribution
bdist_wininst create an executable installer for MS Windows
check perform some checks on the package
upload upload binary package to PyPI
Extra commands:
alias define a shortcut to invoke one or more commands
bdist_egg create an "egg" distribution
develop install package in 'development mode'
easy_install Find/get/install Python packages
egg_info create a distribution's .egg-info directory
install_egg_info Install an .egg-info directory for the package
rotate delete older distributions, keeping N newest files
saveopts save supplied options to setup.cfg or other config file
setopt set an option in setup.cfg or another config file
test run unit tests after in-place build
upload_docs Upload documentation to PyPI
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
EDIT:
python3 --version
Python 3.6.3
pip3 --version
pip 10.0.1 from /usr/local/lib/python3.4/dist-packages/pip (python 3.4)

Looks like pip version and python version didnt match...fixing this removed the problem.

Related

Trying to run imagen-pytorch

I'm trying to run this "imagen-pytorch" repo https://github.com/lucidrains/imagen-pytorch/blob/main/README.md
I've cloned it and tried running the setup.py file on pycharm (CE) however I get the following error:
$ python setup.py
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
There are no further instructions on the README.md file. Please can you explain where I am going wrong?
You have to run with some command.
The most popular are
python setup.py build
python setup.py install
You need them to install module.
You can see other commands using
python setup.py --help-commands
Maybe they forgot to show this information because other modules on GitHub already show it ;)

How do you run a setup.py file properly? [duplicate]

This question already has answers here:
What is setup.py?
(10 answers)
Closed 7 years ago.
I'm trying to run this setup.py file, which was in a .tat.gz file. I'm going to the directory it's in and running python setup.py but get this error message:
brandon#brandon-NV57H:~/Downloads/numpy-1.9.2$ python setup.py
Running from numpy source directory.
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: no commands supplied
brandon#brandon-NV57H:~/Downloads/numpy-1.9.2$
Can anyone help me out? How do I fix this? I have both python2.7 and python3.4.
If you want to install it then the command is install:
python setup.py install
If you need to build the package first, use the build command before installing:
python setup.py build
Hope this helps!

PYMC installation --fcompiler not recognized

I'm trying to install pymc on OSX Mountain lion.
I have installed gfortran (from http://gcc.gnu.org/wiki/GFortranBinaries#MacOS) and cloned pymc.
I tried what has previously been working: 'setup.py config --fcompiler=gfortran build', but this gives an error:
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --fcompiler not recognized
If I just do: 'sudo python setup.py install' then I get this
.
.
.
clang: warning: argument unused during compilation: '-mno-fused-madd'
In file included from src/ft2font.cpp:3:
In file included from src/ft2font.h:16:
/usr/X11/include/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found
include
^
1 error generated.
error: Setup script exited with error: command 'clang' failed with exit status 1
Any ideas what's going on?
Thanks,
Jen
Which version of PyMC are you trying to install, the current development version on GitHub master (PyMC 3) or the release version (PyMC 2.3)?
If you are trying to install PyMC 3, you do not need a Fortran compiler. You do need Theano, however. Can you try the following?
pip install --no-deps git+git://github.com/Theano/Theano.git
pip install --no-deps git+git://github.com/pymc-devs/pymc.git

Multiple Python Installations - both easy_install and pip fail

I have a system-level installation of Python 3.3.3, and I want to set up an installation in user space at /usr/local/python33 as part of a multi-version virtualenv-type setup. I made the directory, and I have attempted to use both easy_install and pip (as easy_install-3.3 and pip-3.3 from the system-level install) to put a copy of Python 3.3.3 there. No joy. The logs from both attempts are shown below. I thought this was supposed to be straightforward, but my confidence if flagging.
EASY_INSTALL
easy_install-3.3 --install-dir="/usr/local/python33" python==3.3.3
Creating /usr/local/python33/site.py
Searching for python==3.3.3
Reading https://pypi.python.org/simple/python/
Reading http://www.python.org
Reading http://www.python.org/2.3
Reading http://www.python.org/2.4
Reading http://www.python.org/2.4.1
Reading http://www.python.org/2.5
Reading http://www.python.org/download/
Best match: Python 3.3.3
Downloading http://www.python.org/ftp/python/3.3.3/Python-3.3.3.tgz
Processing Python-3.3.3.tgz
Writing /var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/easy_install-3cjpwy/Python-3.3.3/setup.cfg
Running Python-3.3.3/setup.py -q bdist_egg --dist-dir /var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/easy_install-3cjpwy/Python-3.3.3/egg-dist-tmp-3me0es
error: Setup script exited with error: Modules/Setup: No such file or directory
PIP
pip-3.3 install --target /usr/local/python33 python==3.3.3
You are installing a potentially insecure and unverifiable file. Future versions of pip will default to disallowing insecure files.
Downloading from URL http://www.python.org/ftp/python/3.3.3/Python-3.3.3.tgz (from http://www.python.org/download/)
Running setup.py egg_info for package python
running egg_info
creating pip-egg-info/Python.egg-info
writing dependency_links to pip-egg-info/Python.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/Python.egg-info/top_level.txt
writing pip-egg-info/Python.egg-info/PKG-INFO
writing manifest file 'pip-egg-info/Python.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/Python.egg-info/SOURCES.txt'
writing manifest file 'pip-egg-info/Python.egg-info/SOURCES.txt'
Source in /private/var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/pip_build_tipton/python has version 3.3.3, which satisfies requirement python==3.3.3
Installing collected packages: python
Running setup.py install for python
Running command /Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3 -c "import setuptools;__file__='/private/var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/pip_build_tipton/python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/pip-x_pk9r-record/install-record.txt --single-version-externally-managed --home=/var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/tmpf4gi0e
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
Both easy_install and pip are for installing Python packages, not for installing Python itself.
How you install Python depends on your operating system. For Unices you typically run the standard configure; make; make install.

Build options to bdist

How do I specify build option:
python setup.py build --fcompiler=gnu95
when I build rpm package:
python setup.py bdist --format=rpm
bdist seems to be building it all over again.
python setup.py build --fcompiler=gnu95 bdist --format=rpm

Categories