3
Contributors
6
Replies
56
Views
9 Months
Discussion Span
Last Post by pty
1

Of course it is possible, third party modules need to be installed with a tool such as pip, then they can be imported. For example if we want to use module unidecode that we find in the python package index, we can open a terminal (or cmd console) and type (on my system, pip for python 3 is named pip3)

pip3 install unidecode

Then in python, we can use (tested with python 3)

>>> import unidecode
>>> unidecode.unidecode("Déjà")
'Deja'

Edited by Gribouillis

0

What if I want to modify the third party module? Where can I find it?
And what should I do when I get the following message when I want to install a module:

Could not find a version that satisfies the requirement quakelib (from versions: ) No matching distribution found for quakelib

And, if the only way is installing the module, why should a software provide the module files? Does it mean there is a way of installing a module when you have its code?

Thanks

Edited by pywriter

0

What if I want to modify the third party module? Where can I find it?

pip show unidecode

Metadata-Version: 2.0
Name: Unidecode
Version: 0.4.20
Summary: ASCII transliterations of Unicode text
Home-page: UNKNOWN
Author: Tomaz Solc
Author-email: tomaz.solc@tablix.org
Installer: pip
License: GPL
Location: /usr/local/lib/python2.7/site-packages
Requires:
Classifiers:
  License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
  Programming Language :: Python
  Programming Language :: Python :: 2
  Programming Language :: Python :: 3
  Topic :: Text Processing
  Topic :: Text Processing :: Filters
Entry-points:
  [console_scripts]
  unidecode = unidecode.util:main

And, if the only way is installing the module, why should a software provide the module files? Does it mean there is a way of installing a module when you have its code?

The answers to these questions and more can be found in one of thousands of Python tutorials, manuals, books and instructional videos online.

Edited by pty: Example output

0

And what should I do when I get the following message when I want to install a module

Third party modules don't need to be referenced in the python package index. You must know something about this quakelib module, otherwise you wouldn't try to install it. Use what you know and search engines to find its source code. For example if you find a git repository, you can clone it or fork it and you can install it manually if it has a setup.py file by typing

python setup.py install

in the directory containing this file. If you want to modify the module, you can install it in development mode with python setup.py develop instead.

Edited by Gribouillis

0

The answers to these questions and more can be found in one of thousands of Python tutorials, manuals, books and instructional videos online.

So could you give a link to one of them?
I couldn't find anything in my searches.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.