python-packaging

Pip installs packages in the wrong directory

Pip installs packages in the wrong directory Question: So I want to install the opencv-python package. I typed in pip install opencv-python and got this: Collecting opencv-python Downloading opencv_python-4.7.0.72-cp37-abi3-win_amd64.whl (38.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.2/38.2 MB 3.1 MB/s eta 0:00:00 Requirement already satisfied: numpy>=1.17.0 in c:usersleo westerburg burrappdatalocalpackagespythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0localcachelocal-packagespython39site-packages (from opencv-python) (1.24.2) Installing collected packages: opencv-python Successfully installed …

Total answers: 2

Create a python venv that works on systems with no python installed

Create a python venv that works on systems with no python installed Question: How do I setup a virtual environment in such a way that is can be used to call a python script, but doesn’t need a system wide python. My goal is it to have one folder with the python script in it …

Total answers: 2

pip install <.whl file> installs dist_info but doesn't actually install the package

pip install <.whl file> installs dist_info but doesn't actually install the package Question: I’m trying change my package over from using setup.py to using pyproject.toml and setup.cfg. My setup.cfg is roughly as follows: [metadata] name = our_name version = 0.1.1 author = me [options] install_requires = networkx >= 3.0 My code is all under src, …

Total answers: 1

Setuptools is creating is creating egg for UNKNOWN instead of setuptools-rust

Setuptools is creating is creating egg for UNKNOWN instead of setuptools-rust Question: I’m trying to build setuptools rust (v1.3) using python 3.10.4, openssl 3.0 and setuptools v58.2 These are the commands and outputs: (venv3.10) [/dbc/blr-dbc2112/abandaru/projects]$ python cayman_pyo3_setuptools-rust/pyo3_setuptools-rust/src/setup.py build running build (venv3.10) [/dbc/blr-dbc2112/abandaru/projects]$ python cayman_pyo3_setuptools-rust/pyo3_setuptools-rust/src/setup.py install running install running bdist_egg running egg_info writing UNKNOWN.egg-info/PKG-INFO writing dependency_links …

Total answers: 1

How to update custom package version?

How to update custom package version? Question: I am trying to create a python package that I can reuse in other projects. I did follow this tutorial: Create Your Custom, private Python Package That You Can PIP Install From Your Git Repository. It works but when I update the code of my package and then …

Total answers: 1

import python module with one file inside

import python module with one file inside Question: I packaged one file: proxy_master ├── __init__.py └── proxy_master.py After installing it, i need to type: from proxy_master import proxy_master I want to know is it even possible just type? import proxy_master Thanks! Advices to change something may be good too, i did all like mentioned here …

Total answers: 2

requirements.txt: any version < 1.5 (incl dev and rc versions)

requirements.txt: any version < 1.5 (incl dev and rc versions) Question: I am looking for a pattern for Python’s requirement.txt (for usage with pip and python 3.10), which will cover all versions available up to a version 1.5, e.g. 1.4.2.dev5+g470a8b8 1.4.dev22+g2be722f 1.4 1.4rc0 1.5rc1 And: is there a clever way to test this without actually …

Total answers: 1

What's difference between [tool.poetry] and [project] in pyproject.toml?

What's difference between [tool.poetry] and [project] in pyproject.toml? Question: Context So, I’m trying to create a new python package following this guideline: https://packaging.python.org/en/latest/tutorials/packaging-projects/ As a guideline says – in my pyproject.toml I should have this structure: [project] name = "example_package_YOUR_USERNAME_HERE" version = "0.0.1" authors = [ { name="Example Author", email="[email protected]" }, ] description = "A …

Total answers: 2

Installing test files with pyproject.toml and setuptools

Installing test files with pyproject.toml and setuptools Question: I’m migrating an old python project to the new pyproject.toml based system and am having trouble with getting files that are required by tests to install. Inside the pyproject.toml I have: [tool.setuptools] package-data = {"my_pkg_name" = ["tests/*.sdf", "tests/*.urdf", "tests/*.xml", "tests/meshes/*.obj"]} [build-system] requires = ["setuptools>=43.0.0", "wheel"] build-backend = …

Total answers: 1