Forums

"setuptools must be installed to install from a source distribution"

I am trying to install pandas and numpy on my virtualenv where I am using django18.

I get the error "setuptools must be installed to install from a source distribution" when I try to pip install and I have tried the installation commands for setuptools https://pypi.python.org/pypi/setuptools here, keep getting errors.

Extracting in /tmp/tmps3qdv1go Now working in /tmp/tmps3qdv1go/setuptools-19.2 Installing Setuptools Traceback (most recent call last): File "setup.py", line 21, in <module> exec(init_file.read(), command_ns) File "<string>", line 11, in <module> File "/tmp/tmps3qdv1go/setuptools-19.2/setuptools/init.py", line 12, in <module> from setuptools.extension import Extension File "/tmp/tmps3qdv1go/setuptools-19.2/setuptools/extension.py", line 8, in <module> from .dist import _get_unpatched File "/tmp/tmps3qdv1go/setuptools-19.2/setuptools/dist.py", line 18, in <module> from setuptools import windows_support File "/tmp/tmps3qdv1go/setuptools-19.2/setuptools/windows_support.py", line 2, in <module> import ctypes File "/usr/lib/python3.4/ctypes/init.py", line 7, in <module> from _ctypes import Union, Structure, Array ImportError: /home/bigintro/.virtualenvs/django18/lib/python3.4/lib-dynload/_ctypes.cpython-34m-x86_64-linux-gnu.so: undefined symbol: _PyTr aceback_Add Something went wrong during the installation. See the error message above.

We've seen this problem occasionally for people trying to install new packages into old virtualenvs after an upgrade late last year. The solution/workaround seems to be to delete and re-create the virtualenv (or just switch to a new virtualenv), and reinstall all your packages...

worked