Reputation: 3514
I am trying to follow this tutorial using pip to install a python package locally.
My structure looks like this:
bacnet-restful/
example-node-red-flows/
flask_version/
images/
swagger_json/
scanning_scripts/
modulepkg/
__init__.py
aioapp.py
bacnet_actions.py
models.py
views.py
.gitignore.txt
LICENSE
README
requirements.txt
runtime.txt
setup.py
Per the tutorial in the bacnet-restful
directory when I run pip install wheel
I get this error:
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
Requirement already satisfied: wheel in c:\python39\lib\site-packages (0.37.0)
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
Also on Windows. Python version is 3.9.6
This is my setup.py
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="bacnet-restful",
version="0.0.1",
author="author newb",
author_email="[email protected]",
description="restful BACnet App",
long_description=long_description,
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.8',
)
EDIT
PS C:\Desktop\bacnet-restful> pip install bacnet-restul
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
ERROR: Could not find a version that satisfies the requirement bacnet-restul (from versions: none)
ERROR: No matching distribution found for bacnet-restul
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
EDIT 2
I got some tips here for python 3.9 on how the setup.py
should look which worked to install the package:
from distutils.core import setup
setup(name='bacnet-restful',
version='1.0',
description='Python Distribution Utilities',
author='author newb',
author_email='[email protected]',
url='https://www.python.org/',
py_modules=['aiohttp', 'BAC0', 'aiohttp_pydantic'],
)
Upvotes: 0
Views: 5041
Reputation: 16186
Please try the following thing inside your virtualenv.
pip install wheel
pip install .
Upvotes: 1