Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
setuptools setup problem
#1
I am using python3.4 on debian jessie  After the following enties
from setuptools import setup

setup(
   name='vseach',
   version='1.0',
   py_modules=['vsearch'],
)
Error:
error:no commands supplied
vsearch is a file in the current directory containing two function definitions.

I am just getting started with python and have found several instructions identical to the lines above. None specify a command..

Is there something I have missed?
Reply
#2
From my limited knowledge it looks like all you have done is defined three variables, thus the 'no commands supplied' error.

Can you post links to some of the instructions you mentioned?
Reply
#3
Here are a couple references

https://pythonhosted.org/an_example_pypi...tools.html

The setup in this reference is more elaborate but still no commands. If you scroll down there is a listing of possible commands. On my system the entry

setup --help-commands

does not work.

The following reference uses 

from distutils import setup

and I have tried this too with the same results

https://docs.python.org/3/distutils/intr...le-example:

I had a third reference which I have misplaced. It used the minimal script exactly as in my original post but advised that a much more detailed version should be used.
Reply
#4
For the first one did you do all this?
   import os
   from setuptools import setup
   def read(fname):
       return open(os.path.join(os.path.dirname(__file__), fname)).read()
Reply
#5
I entered the lines you suggested and python accepted them followed by the setup lines in my original post. The result was still

error: no commands supplied
Reply
#6
My misunderstanding. The instructions meant to create a file setup.py with the contents
from setuptools import setup
setup(
   name='vsearch',
   version='1.0',
   py_modules=['vsearch'],
)
in same the directory as vsearch.py which contains the function definitions.
Then from the system prompt run the command
python3.4 setup.py dist

This works and creates a sub directory dist containing the file vsearch-1.0.tar.gz
Finally from the system prompt run:
python3.4 -m pip install vsearch-1.0.tar.gz.

This last step does not work for me. The system responds /usr/bin/python3.4 No module named pip
My understanding is pip should be a part of python3.4.installation.

How can I fix this?
Reply
#7
There are instructions for installing pip on your system here. http://stackoverflow.com/questions/65875...h-python-3
Reply
#8
The link from mcmxl22 should get you pip.
You could also make wheel,
which is a better format an more modern format for python.
pip install wheel
Then from command line:
python setup.py bdist_wheel

Now you should have vsearch-1.0-py3-none-any.whl
Usage:
pip install vsearch-1.0-py3-none-any.whl

If want to share with the world,then upload to PyPI
Then when finish it can eg be pip install vsearch(will download and install your module to user).
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Setuptools CLI program ModuleNotFoundError after splitting up module into package Postbote 1 2,320 Nov-25-2021, 06:35 PM
Last Post: Postbote
  Scipy sparse setuptools issues Anldra12 11 5,448 Jun-19-2021, 04:01 PM
Last Post: Anldra12
  Upgrade Setuptools on Python 3.4 Alexver 2 7,931 Sep-20-2018, 06:22 AM
Last Post: Alexver
  Python3 No Module Named gi, Tkinter, setuptools and more... On Fedora Linux harun2525 12 14,090 Aug-11-2018, 12:48 AM
Last Post: Larz60+
  setuptools bromberg 3 3,522 Jun-30-2018, 01:57 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020