- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to Install two python modules with same name?
This is not possible with the pip. All of the packages on PyPI have unique names. Packages often require and depend on each other, and assume the name will not change. Even if you manage to put the code on Python path, when importing a module, python searches the paths in sys.path by order and stops at first match. So whatever module it finds first, it'll stop at that.
You best bet is to copy all the code from the libraries to you codebase, change the module name of either and then import it.
If you're importing modules with same name from different packages, you can do it as follows:
>>> from foo import bar as first_bar >>> from baz import bar as second_bar
- How to install libxml2 with python modules on Mac?
- How to install Python modules in Cygwin?
- How to install python modules without root access?
- How to install python modules and their dependencies easily?
- How do we use easy_install to install Python modules?
- How to install and import Python modules at runtime?
- How to use pip to install python modules in easy way?
- How install Selenium Webdriver with Python?
- What is the most compatible way to install python modules on a Mac?
- How to use multiple modules with Python import Statement?
- How to use remote python modules?
- How can create a table having the name like a^b along with same column name? name?
- How to restrict inserting an item with the same name in MongoDB?
- How do Python modules work?
- How to check version of python modules?