question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Package installation and PyPi distribution

See original GitHub issue

Trying to install this repository:

pip install git+https://github.com/xplip/pixel

Collecting git+https://github.com/xplip/pixel Cloning https://github.com/xplip/pixel to ./tmp/pip-req-build-ijxd55pn Running command git clone --quiet https://github.com/xplip/pixel /home/nlp/amit/tmp/pip-req-build-ijxd55pn Resolved https://github.com/xplip/pixel to commit efb38f5d54ee04874f61a92aebb3d8403fecf38c Running command git submodule update --init --recursive -q Preparing metadata (setup.py) … done

Then

python -c "import pixel"

Traceback (most recent call last): File “<string>”, line 1, in <module> ModuleNotFoundError: No module named ‘pixel’

I guess it does not install the actual python “package” called “pixel”.


If you would add PyPi distribution as well, it would not need to also install the git submodules, which actually takes long as datasets is big.

Here’s my suggestion: https://github.com/xplip/pixel/pull/3

However, the name pixel is taken, so you would need to come up with a different pypi package name (this does not change the fact that the installed package will be called pixel)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
xplipcommented, Aug 4, 2022

Sorry for the confusion, you can find the installation instructions by clicking on “Show instructions” under https://github.com/xplip/pixel#setup. Maybe I should make it easier to find. If you run this command conda install -c conda-forge pycairo pygobject manimpango instead of installing pycairo via pip, the error should hopefully be resolved.

Alternatively, running sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0 libpango1.0-dev libpangocairo-1.0-0 together with pip install pycairo PyGObject manimpango should do the job without conda.

1reaction
xplipcommented, Aug 1, 2022

Thanks for the suggestion! I think it’s a good idea to distribute pixel via PyPi. The main reason we currently only support the installation via eggs (running pip install -e git+https://github.com/xplip/pixel#egg=pixel should work) is because we rely on external system libraries (pango, cairo, pangocairo, and their respective dependencies) which need to be installed beforehand, and we give instructions on how to do so here in the repo. If we distributed the package as-is, people would be able to install it from PyPi without a warning and then encounter errors at runtime if they don’t have these external libraries installed. I think a good way around this will be to build some Linux and macOS platform wheels for pixel and distribute these via PyPi. I’ll try to do that this week 😃.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing Packages - Python Packaging User Guide - Python.org
This section covers the basics of how to install Python packages. ... is common in the Python community to refer to a distribution...
Read more >
distributions - PyPI
Project description​​ Distributions provides low-level primitives for collapsed Gibbs sampling in Python and C++ including: special numerical functions, samplers ...
Read more >
How to Publish an Open-Source Python Package to PyPI
PyPI, typically pronounced pie-pee-eye, is a repository containing several hundred thousand packages. These range from trivial Hello, World ...
Read more >
Building and Uploading to PyPi - The Sheer Joy of Packaging!
TestPyPI : a separate instance of the Python Package Index (PyPI) that allows you to try out the distribution tools and process without...
Read more >
Packaging and Distributing Your Python Project to PyPI for ...
When the package has the __init__.py file, the package can be imported as a regular library after being installed by either installer. Just...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found