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

Install package in grater version with string in name

I have a problem do add to requirements.txt package with string in version and install this in grater version. I need this to development process when i push commit i create a new package and on main project i can update them by: pip install -r…
LukaszK
  • 171
  • 10
-1
votes
1 answer

Installing old version of python packages

I done a project 4-5 years before, currently i needed that project now, there i used specific python packages, for example, matplotlib==1.5.1 and scipy==0.19.0 is needed and more. To run that project now, I created a virtual env. with python version…
Vishak Raj
  • 141
  • 1
  • 1
  • 8
-1
votes
1 answer

Poetry cannot import from subfolders in scripts runned by "poetry run"

Project structure is like this: . ├── README.md ├── pyproject.toml ... my_project_name/ ├── moduleA.py ├── moduleB.py └── FolderC └── moduleC.py moduleA.py: from .moduleB import moduleB_func from .FolderC.moduleC import…
-1
votes
1 answer

Why do I receive an ImortError with what seems to be a valid packaging structure?

Any ideas why python is not finding the app module I have defined in this project? I am trying to run plant.py and receiving "Module Not Found". I tried using relative import as well and received "ImportError: attempted relative import with no known…
-1
votes
1 answer

Install python package from private artifactory behind VPN

I have a Github Actions CI/CD for my python packages which has dependency on a private repository. Moreover, that repository is behind VPN which obviously breaks my installation and testing pipeline. Is there a way to configure VPN for Github…
Most Wanted
  • 6,254
  • 5
  • 53
  • 70
-1
votes
2 answers

able to import module but not things from it

I am on mac (first time) and using pycharm and visual code. On pycharm, I am using a venv, have installed scapy and can see it is installed in the interpreter package manager and there is no red line under "import scapy". the issue arises when I try…
-1
votes
1 answer

How can I write the python import statements, such that the file works from both inside and outside its package?

Here's a file structure I'm working with: package_example/ main.py the_package/ __init__.py pkg_file_1.py pkg_file_2.py Here are the files: # main.py from the_package.pkg_file_1 import foo_1 def main(): foo_1() if __name__…
CSStudent7782
  • 618
  • 1
  • 5
  • 21
-1
votes
2 answers

Avoid Package re-upload to PyPI

Do I need to re-upload my package at PyPI when I have already pushed the latest version at GitHub? Can't they just sync?
Rajeev
  • 5
  • 3
-1
votes
2 answers

Calling functions from internal packages

I've organized my project by separating different functionality, but don't how to communicate between the parts I've created. I'm trying to access functions from run_perf.py in addMetrics.py by including this import statement from analysis import…
cramos24
  • 29
  • 8
-1
votes
1 answer

Is PEAK ("python enterprise application kit") still relevant?

I'm trying to 'learn me some python packaging,' but keep getting bogged down in all the different ways of doing things. So far I have encountered setuptools, easy-install, requirements.txt, setup.py, poetry, and just now I found out about something…
Jeff Wright
  • 1,014
  • 1
  • 11
  • 17
-1
votes
1 answer

Trying to publish a pypi distribution in python that relies on other pypi distribution

Im trying to publish a small distribution in python to pypi. I'm following the docs https://packaging.python.org/tutorials/packaging-projects/ which specifies that i should have the following directory format directory format. However, my…
Omar Jarkas
  • 100
  • 5
-1
votes
1 answer

Why does wheel installation put shared objects in site-packages folder instead of package folder?

I've a python binary distribution [wheel] created via python setup.py bdist_wheel The wheel looks as follows unzip -l dist/-1.0.0-cp36-cp36m-linux_x86_64.whl Archive: dist/-1.0.0-cp36-cp36m-linux_x86_64.whl Length …
Chaitanya Bapat
  • 3,381
  • 6
  • 34
  • 59
-1
votes
1 answer

'utf-8' codec can't decode byte 0x85 in position 39: invalid start byte (What to do?)

Python throws this error. I want to solve it but the problem is my data (.txt files) gow through a package. How can I solve this? Maybe I can instruct my computer to encode in a different way if it encounters encoding in the package or something?…
-1
votes
1 answer

pygame font Can't perform this operation for unregistered loader type

I started python programming a while ago and i really like programing things with pygame. So now i wanted to convert my perfectly fine working .py program to an executable using auto-py-to-exe. So i started my program and everything seemed to work…
Ladekabel3
  • 11
  • 2
-1
votes
1 answer

Problems with entrypoints (from other packages) when installing package through pip

Trying to install a package, for example, pytorch pip install torch / pip install -U torch And I'm greeted with this Collecting torch Using cached torch-0.1.2.post2.tar.gz (128 kB) ERROR: Command errored out with exit status 1: command:…
PatXio
  • 129
  • 2
  • 16