Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing a python module

I am trying to install a python module with the standard python setup.py install but I get the following error. I am fairly new to python but I have been able to install other modules in this way in the past. I am under the impression this module setuptools is not something I am supposed to have gotten separate from my python installation. Do I need to be in a specific directory or something?

Error:
Traceback (most recent call last):
  File "setup.py", line 3 in <module>
    from setuptools import setup, find_packages
ImportError: No module named setuptools
like image 754
Andrew Hubbs Avatar asked Jan 09 '11 19:01

Andrew Hubbs


People also ask

Why can't I install Python packages?

The first reason that prevents you from installing the latest package versions is dependency error. A possible solution is to check the latest versions of the package and to install one which is: supported by your version. doesn't have dependency issues.

Why won't Python recognize my module?

This is caused by the fact that the version of Python you're running your script with is not configured to search for modules where you've installed them. This happens when you use the wrong installation of pip to install packages.


2 Answers

Apparently, that package requires you to have setuptools to install it. Setuptools is a module that provides easy installation of Python packages. You can get it on pypi, here.

like image 123
interjay Avatar answered Oct 11 '22 22:10

interjay


Surprisingly, setuptools does NOT come pre-packaged with Python, despite how often and casually everyone refers to it. I also had this problem when learning Python.

Setuptools is available on the Python Package Index.

like image 45
Pakars Avatar answered Oct 11 '22 20:10

Pakars