A
A
AveWycc2020-02-22 07:53:50
JavaScript
AveWycc, 2020-02-22 07:53:50

Why are modules not included in pip?

Created a package with this setup.py using python setup.py sdist

from setuptools import setup, find_packages
 
setup(name='example',
      version='0.1',
      url='',
      license='MIT',
      author='Gigi Sayfan',
      author_email='[email protected]',
      description='Add static script_dir() method to Path',
      packages=find_packages(),
      long_description=open('README.md').read(),
      zip_safe=False)

In the modules folder -
__init__.py is empty (although even if you write something in it, nothing will change)
hello.py -
def helloWorld():
    print("Hello, World")
def hello():
    n = input("Как вас зовут?")
    print("Привет, ", n)

After creating the package in the same directory, I write the pip install example command, but when I connect the package in the code, I cannot use its functions, due to the fact that pip created the package, but without modules. I can't understand why, because the created example.tar.gz archive has everything you need.
python version = 3.8.1.
pip version = 20.0.2

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Proskurin, 2019-06-27
@ridiculousdwarf

Well, this condition is always true, for the simple reason that a cannot be both yes and no at the same time, so that both conditions are false. De Morgan's law can translate this condition into looks suspicious, don't you think? So yes, you mixed up the operator.

T
tema_sun, 2019-06-27
@tema_sun

Because you want AND, not OR there.

S
Sergey Karbivnichy, 2020-02-22
@AveWycc

When you run the command pip install example, you are installing a package from the pypi.org repository.
In your case you need -pip install ./dist/ProjectName.tar.gz

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question