Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
site packages, python 3.8
#5
Use bdist_wheel so you get the real wheel format .whl.
Example to 3.8 not in my Path so take in from Scripts folder,and call it vvsearch to avoid name conflict.
# vvsearch.py
def search4vowels(phrase: str) -> set:
    vowels = set('aeiou')
    return vowels.intersection(set(phrase))

def search4letters(phrase: str, letters: str) -> set:
    return set(letters).intersection(set(phrase))

if __name__ == '__main__':
    print(search4letters('hitch-hiker', 'aeiou'))
    print(search4letters('galaxy', 'xyz'))
    print(search4letters('life, the universe, and everything', 'o'))
# setup.py
from setuptools import setup

setup(
   name="vvsearch",
   version='1.0',
   py_modules=['vvsearch'],
   description="Search Tool",
   url='https://python-forum.io/index.php',
   author_email='[email protected]',
)
Command line i use cmder,just the same in cmd
# Install wheel
C:\Python38\Scripts
λ pip install wheel
Collecting wheel
  Using cached https://files.pythonhosted.org/packages/00/83/...c9/wheel-0.33.6-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.33.6

# Make the wheel
C:\Python38\Scripts
λ py -3.8 setup.py bdist_wheel
....
adding 'vvsearch-1.0.dist-info/top_level.txt'
adding 'vvsearch-1.0.dist-info/RECORD'
removing build\bdist.win32\wheel

# Now the wheel is in dist folder,install with pip
C:\Python38\Scripts\dist
λ py -3.8 -m pip install vvsearch-1.0-py3-none-any.whl
Processing c:\python38\scripts\dist\vvsearch-1.0-py3-none-any.whl
Installing collected packages: vvsearch
Successfully installed vvsearch-1.0

# Test that it work 
C:\Python38
λ python
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import vvsearch
>>>
>>> vvsearch.search4letters('hitch-hiker', 'aeiou')
{'e', 'i'}
>>> vvsearch.search4letters('hello', 'aeiou')
{'e', 'o'}
>>> exit()
So now it install to 3.8.
This is just the same way you make it if want to use PyPi.
PyPi is a central disruption of wheels.

After upload wheel to PyPi your wheel get shorter name.
# This can share with other eg usb stick,private host of wheel on web
pip install vvsearch-1.0-py3-none-any.whl

# PyPi share with other in an easier way
pip install vvsearch 
It's just the same wheel PyPi disturbed it central.
Reply


Messages In This Thread
site packages, python 3.8 - by Dixon - Jan-23-2020, 11:45 PM
RE: site packages, python 3.8 - by buran - Jan-24-2020, 08:42 AM
RE: site packages, python 3.8 - by Dixon - Jan-24-2020, 09:49 PM
RE: site packages, python 3.8 - by buran - Jan-24-2020, 09:55 PM
RE: site packages, python 3.8 - by snippsat - Jan-24-2020, 10:37 PM
RE: site packages, python 3.8 - by Dixon - Jan-27-2020, 11:10 PM
RE: site packages, python 3.8 - by snippsat - Jan-28-2020, 02:03 AM
RE: site packages, python 3.8 - by Dixon - Jan-28-2020, 10:18 PM
RE: site packages, python 3.8 - by snippsat - Jan-28-2020, 10:39 PM
RE: site packages, python 3.8 - by Dixon - Jan-28-2020, 11:26 PM
RE: site packages, python 3.8 - by Dixon - Jan-29-2020, 11:22 PM
RE: site packages, python 3.8 - by snippsat - Jan-30-2020, 12:34 AM
RE: site packages, python 3.8 - by Dixon - Feb-01-2020, 05:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Installing python packages in a virtual environment Led_Zeppelin 1 809 Aug-15-2023, 08:18 PM
Last Post: deanhystad
  Installation of packages to newest Python version from previous one Andrzej_Andrzej 3 917 Jul-15-2023, 11:32 AM
Last Post: snippsat
  site-packages issue paulgureghian 3 1,399 Jul-07-2022, 04:15 PM
Last Post: snippsat
  Troubleshooting site packages ('h5py' to be specific) aukhare 2 2,039 Nov-02-2020, 03:04 PM
Last Post: snippsat
  How to create local copies of Python packages so they do not have to be downloaded okhajut 3 2,055 Sep-29-2020, 02:22 PM
Last Post: buran
  python interpreter won't import packages greenpy 1 1,999 Sep-11-2020, 07:47 PM
Last Post: buran
  Conversion of Oracle PL/SQL(packages, functions, procedures) to python modules. DivyaKumar 2 6,568 Jul-09-2020, 04:46 PM
Last Post: srikanth7482
  Site packages, Python 3.8 Dixon 2 2,560 Jan-18-2020, 10:42 PM
Last Post: Dixon
  Python 3.8 or 3.? Trouble installing packages dn237 5 6,855 Oct-25-2019, 07:21 PM
Last Post: snippsat
  Python packages - quality j.crater 8 5,795 Mar-13-2017, 08:58 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