visual-studio-codedatabricksazure-databricks

Unable to Create a Python Wheel to Use with Databricks from Visual Studio Code


I am trying to create a Python wheel to be used with Databricks. I'm using VS Code to generate the wheel.

I have the following setup.py file:

import setuptools

with open("QuickStart.MD", "r") as fh:
    long_description = fh.read()

setuptools.setup(
    name="newlib", 
    version="0.1.8",
    author="name",
    author_email="newmail@gmail.com",
    description="framework",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="",
    packages=setuptools.find_packages(),
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
    ],
    python_requires='>=3.6',
    install_requires=[
   'pyodbc',
   'jsonschema'
]
)

My README.md files looks something like the following:

# Example Package
This is a simple example package. You can use
[Github-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
to write your content 

When I run python setup.py bdist_wheel

I get the error:

invalid command 'bdist_wheel'

enter image description here

Can someone let me know where I'm going wrong?


Solution

  • You are missing wheel package.

    pip install wheel
    

    If you already got this, maybe the default python is something else. try python -v and understand what is the version. Try with

    pip3 install wheel