Questions tagged [python-packaging]

Packages are namespaces which contain multiple packages and modules themselves.

A package is a directory containing a special file called __init__.py (which indicated that the directory contains a python package) and sub-packages and modules. The package name is determined by the name of the directory.

1369 questions
-1
votes
1 answer

How does one choose for different source distribution formats?

When I release a package to PyPI, I usually create a sdist and a bdist_wheel. The best practice for built distribtion seems to be clear: Wheel. But for source distribtions, I see different formats. Only zip has the note that it needs an extrernal…
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
-1
votes
2 answers

Why do I have to import python packages into each class method?

I have a class object and some of the methods in the object require python packages (e.g. numpy). If I import the packages in the main script prior to creating the object the methods in the object do not recognize that the packages were imported. To…
Mike49
  • 473
  • 1
  • 5
  • 17
-1
votes
1 answer

adding a newly created and uploaded package to pycharm

I created a package (thompcoUtils) on test.pypi.org and pypi.org https://pypi.org/project/thompcoUtils/ and https://test.pypi.org/project/thompcoUtils/ show the package is installed in both the test and live repositories I added the repositories…
jordanthompson
  • 888
  • 1
  • 12
  • 29
-1
votes
1 answer

How Can we Create a plugin and Play Architecture in Django?

Actually, I want to create a plug and play architecture in Python Django. I have a different kind of scrapers and I am writing more scrapers too. Whenever I build a new scraper I have to again publish my repo in production. What I need I just want…
-1
votes
3 answers

Mess with venv or new flavor of python?

Question The question is if there another way that I'm just not thinking of to solve those problems below, or is it really the answer to build a python flavor with our tools? I have a proposed solution that solves the problems, but that doesn't mean…
bubthegreat
  • 301
  • 1
  • 9
-1
votes
2 answers

Python program Attribute:Error module 'reader' has no attribute 'Reader'

I'm trying to test run my program in C:\reader\compressed\ where I have created two test files 'test.gzip' and 'test.bz2' but when I go run the Reader class I get that the module reader has no attribute 'Reader'. I'm opening python to "import…
April_Nara
  • 1,024
  • 2
  • 15
  • 39
-1
votes
1 answer

How can I check the dependencies needed for installation of python package?

I want to check dependencies needed to install in order to install the python package in linux machine (centos ) without starting the installation of package . I want to install Pysftp package in my machine but first I wanted to know dependencies I…
-1
votes
2 answers

How to import a project subfolder so that it is available once the installed project has been imported?

How to import a project subfolder so that it is available once a project has been imported? For example how to import the contents of project.tools so that after importing the project using import project, project.tools.common.function() is…
Greg
  • 8,175
  • 16
  • 72
  • 125
-1
votes
1 answer

Open a file inside the package directory instead of opening from current directory

I have created a Python package and installed locally. With using the command pip install . .In my package it's necessary to open a file like this. open('abc.txt','r+') But my problem is it's try to open the file in the working directory instead of…
Rahul K P
  • 15,740
  • 4
  • 35
  • 52
-2
votes
1 answer

Installed wheel python package but Module not found

Hi have created a wheel file and installed it. But upon importing I'm getting module not found error. Here is the Setup.py import setuptools from setuptools import find_packages import pathlib,…
-2
votes
1 answer

How solving Problem installing the noise package

I tried to install noise Python package, but I encountered this error ` PS C:\Users\MacBook\Desktop\python-superhi> python -m pip install noise Collecting noise Using cached noise-1.2.2.zip (132 kB) Preparing metadata (setup.py) ... done Building…
-2
votes
2 answers

Pip-installed module cannot be imported

I uploaded my first PyPi package today. It took me a while to figure everything out, but I did it, and now I'm trying to import it to another project of mine. Unfortunately I get a ModuleNotFoundError. I'm on Windows 10, running python 3.9.6. I've…
RedKnight91
  • 340
  • 3
  • 17
-2
votes
1 answer

Pyinstaller: Is there a way to package apps for Windows and Linux on MacOS (or vice versa)?

I packaged a kivy app on MacOS and I'm trying to port it to Windows and Linux. Didn't see anything in the pyinstaller docs so I tried using VirtualBox to run pyinstaller in Windows and Linux virtual environments. It didn't work on Windows because I…
Wiiat
  • 1
  • 3
-2
votes
2 answers

How to create installer for python application?

I have developed an application which has multiple file and some dependent libraries such as bacpypes, requests, rdflib etc. I want to create an installer which will install all the packages along with the application so that the user need not to…
Sagar
  • 1,115
  • 2
  • 13
  • 22
-2
votes
3 answers

Why can't I "import random.shuffle"?

I can do import random a = [1, 2, 3] random.shuffle(a) or from random import shuffle a = [1, 2, 3] shuffle(a) But I can't import random.shuffle a = [1, 2, 3] random.shuffle(a) which will make the interpreter complain 'random' is not a…
Shen Zhuoran
  • 385
  • 3
  • 13
1 2 3
91
92