Package name
See original GitHub issueWhy is the package listed as python-louvain
but you have to use it with import community
?
- It is misleading as people try to do
pip install community
- It shadows the name of the other
community
python package .
You run into troubles if you use both at the same time. Which is likely to occur if users ran pip install community
in the first place
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Package name - Google AdMob Help
The package name of an Android app uniquely identifies your app on the device, in Google Play Store, and in supported third-party Android...
Read more >Package Name Viewer 2.0 - Apps on Google Play
This app show you package name and launcher class of all apps in your device. Features: 1. Application searching;
Read more >Configure the app module - Android Developers
Every Android app has a unique application ID that looks like a Java or Kotlin package name, such as com.example.myapp.
Read more >Naming a Package (The Java™ Tutorials > Learning the Java ...
Package names are written in all lower case to avoid conflict with the names of classes or interfaces. Companies use their reversed Internet...
Read more >How to determine the package name of an Android App
The package name is a unique name to identify a specific app. Generally, the package name of an app is in the format...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, you can stick to your name
python-louvain
on the PyPi repo. You shall just add a first folder ‘python_louvain’ at the root that would contain the ‘community’ folder. This way you just have to refactor your imports into :from python_louvain import community
, which is easy for every IDE.Also to avoid adding an extra module level, you could just rename the
community
intopython_louvain
I totally agree about virtualenv and would use it if I had to use both packages in different projects. The problem is that people may find your package in another snippet of code and see
import community
and then runpip install community
which will shadow the name unless they uninstall it.Broadly, I agree with the concerns raised by @mazzma12 . Relaying my experience in this thread in case others find it after encountering the same issue.
When using
pip
to installpython-louvain
inside a Google Colab notebook, I encountered the following error:This (also linked by @thisisreallife) suggests uninstalling
community
to avoid the package naming conflict discussed in this thread. It works within a virtual environment, but not on Colab.The way I was able to use the library was directly uploading the contents of
python-louvain/community/
to my Colab notebook. Then, inside ofcommunity_louvain.py
, I had to change the implicit reference tocommunity_status
so thatcommunity_louvain
’s contents would be callable: