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
0
votes
1 answer

Pros and cons of sdist

What are the pros and cons of packaging a Python project using python setup.py sdist, taking care of listing all files in MANIFEST.in instead of just creating an archive of the whole project tree? Creating an archive of the tree sounds simpler and…
Aurélien Gâteau
  • 4,010
  • 3
  • 25
  • 30
0
votes
1 answer

Package upload to pypi.org broken

I have been trying to workaround the latest changes to pypi for hours, and I can't find a way to do it. My usual method of running python setup.py register; python setup.py bdist_wheel sdist upload currently fails with an SSL error: (py27_test)…
Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
0
votes
0 answers

Importing files in __init__.py

I'm trying to use a piece of code I got from somewhere. The code has a structure equivalent to this: project/ test.py somepackage/ __init__.py file1.py file2.py __init__.py contains only: from file1 import * from file2…
0
votes
0 answers

My conda environment use default "six" package, not what I installed in conda environment

(python2.7) (23:28:22) ~$ python Python 2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42) [GCC 7.2.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import six >>> six.__version__ '1.5.2' >>>…
hopflink
  • 181
  • 12
0
votes
1 answer

What are the norms for releasing the same package under multiple names on PyPI?

Suppose I've uploaded a package called foobar to PyPI. Because the package is a Django module, I'd also like to publish it as django-foobar. What is the general consensus towards releasing the same package under multiple names? Is it allowed or…
pbaranay
  • 585
  • 5
  • 17
0
votes
1 answer

Error when installing scapy

Ok so i'm trying to install scapy for python3, but ive been having some issues when I enter this command: pip install scapy This is the output: Collecting scapy Using cached scapy-2.3.3.tgz In the tar file…
Bale
  • 553
  • 1
  • 8
  • 19
0
votes
0 answers

python help function documentation

I have problems finding the documentation of the help function in Python 2.7, I have this code: from google.cloud.gapic import pubsub as ps print dir(ps) help(ps) and it returns : ['__doc__', '__name__', '__path__'] Help on package…
0
votes
1 answer

setup.py: No module named *

I'm trying to develop a new Python module. This is the how my directory structure looks like: . ├── cmd_dispatcher.py ├── commands │   ├── __init__.py │   └── validate.py ├── hello.py ├── README.md ├── setup.py └── utils └── __init__.py This…
Ganesh Satpute
  • 3,664
  • 6
  • 41
  • 78
0
votes
0 answers

Organizing a python package and its modules

I currently have the following package structure mypkg/ |-__init__.py |-foo/ |--_init__.py |--foo_one.py |--foo_two.py |--foo_three.py |-bar/ |-__init__.py |- ... Inside foo_one.py, foo_two.py and foo_three.py I defined three classes, FooOne,…
0
votes
1 answer

pip package version vs redis actual version

The latest version of Redis seems to be 4.0.2: https://redis.io/download When I look up Redis in the pip index it says its at 2.10.6: https://pypi.python.org/pypi/redis I'm new to python package management and I don't understand the dependency here.…
red888
  • 27,709
  • 55
  • 204
  • 392
0
votes
1 answer

Check if package available in python3

I have a project in Python2.7 and want to port it to Python3.6. I want to build some kind of dependency tree where I can see which package is available in Python3.6. But don't know why how to check it without trying to install it to Python3.6…
Vladimir Chernenko
  • 423
  • 2
  • 6
  • 10
0
votes
1 answer

Python import acting strange (only uppercase working, not with relatives)

I'm using PyCharm and Python 3 and I have the next python folder layout: src/ __init__.py command/ __init__.py simpleremote/ __init__.py Command.py GarageDoor.py …
madtyn
  • 1,469
  • 27
  • 55
0
votes
0 answers

Error when installing python3 packages in Virtualenv using pip

i am trying install pytrend (included some packages eg: numpy , pandas, ... ) in my virtual environment, after activating the venv and running pip install pytrends the command line troughs this error : > Command…
0
votes
1 answer

issue in locating cx_oracle python package files/directory

I installed cx_Oracle python package using pycharm's package installer. It installed successfully and also works perfectly. The installed directory for the package is shown as c:\program files(x86)\python36-32\lib\site-packages\. When I go to this…
user2916886
  • 847
  • 2
  • 16
  • 35
0
votes
0 answers

Python project structure for package with plugin classes

I'm just starting a new open-source Python (3) project. However my Python scripting has so far always been limited to one single file. I'm trying to make an installable package (installable through PyPi) Which then can be imported in some one else…
Bram
  • 2,515
  • 6
  • 36
  • 58