Fix Python – How to install Python packages from the tar.gz file without using pip install

Long story short my work computer has network constraints which means trying to use pip install in cmd just leads to timing out/not finding package errors.
For example; when I try to pip install seaborn:

Instead I have tried to download the tar.gz file of the packages I want, however, I do not know how to install them. I’ve extracted the files fr….

Fix Python – Whats the difference between a module and a library in Python?

I have background in Java and I am new to Python. I want to make sure I understand correctly Python terminology before I go ahead.
My understanding of a module is: a script which can be imported by many scripts, to make reading easier. Just like in java you have a class, and that class can be imported by many other classes.
My understanding of a l….

Fix Python – What is the most compatible way to install python modules on a Mac?

I’m starting to learn python and loving it. I work on a Mac mainly as well as Linux. I’m finding that on Linux (Ubuntu 9.04 mostly) when I install a python module using apt-get it works fine. I can import it with no trouble.
On the Mac, I’m used to using Macports to install all the Unixy stuff. However, I’m finding that most of the python modules ….

Fix Python – How to import classes defined in __init__.py

I am trying to organize some modules for my own use. I have something like this:
lib/
__init__.py
settings.py
foo/
__init__.py
someobject.py
bar/
__init__.py
somethingelse.py

In lib/__init__.py, I want to define some classes to be used if I import lib. However, I can’t seem to figure it out without separating the classes i….

Fix Python – Is there a standard way to list names of Python modules in a package?

Is there a straightforward way to list the names of all modules in a package, without using __all__?
For example, given this package:
/testpkg
/testpkg/__init__.py
/testpkg/modulea.py
/testpkg/moduleb.py

I’m wondering if there is a standard or built-in way to do something like this:
>>> package_contents(“testpkg”)
[‘modulea’, ‘moduleb’]

The manu….

Fix Python – Check if Python Package is installed

What’s a good way to check if a package is installed while within a Python script? I know it’s easy from the interpreter, but I need to do it within a script.
I guess I could check if there’s a directory on the system that’s created during the installation, but I feel like there’s a better way. I’m trying to make sure the Skype4Py package is inst….