Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems getting started on Ubuntu 12.10 #3

Open
phoebebright opened this issue Aug 15, 2015 · 2 comments
Open

Problems getting started on Ubuntu 12.10 #3

phoebebright opened this issue Aug 15, 2015 · 2 comments

Comments

@phoebebright
Copy link

Like the previous issue, I rushed into installing hitch into an existing virtualenv for an existing project. project uses python 2.7
Pip install hitch worked fine
hitch init gives this error

Traceback (most recent call last):
  File "/home/django/virtualenvs/board/bin/hitch", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/home/django/virtualenvs/board/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 2707, in <module>
    working_set.require(__requires__)
  File "/home/django/virtualenvs/board/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 686, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/django/virtualenvs/board/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 584, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: click

but click is installed and up to date

 pip install click
 Requirement already satisfied (use --upgrade to upgrade): click in /home/django/virtualenvs/board/lib/python2.7/site-packages

So I tried install outside the virtualenv:
Running setup.py install for psutil
Complete output from command /home/django/tcphb/tests/.hitch/virtualenv/bin/python3 -c "import setuptools, tokenize;file='/tmp/pip-build-ho7u3a/psutil/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-8iug73-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/django/tcphb/tests/.hitch/virtualenv/include/site/python3.2/psutil:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.2
creating build/lib.linux-x86_64-3.2/psutil
copying psutil/init.py -> build/lib.linux-x86_64-3.2/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-3.2/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.2/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.2/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-3.2/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.2/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-3.2/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-3.2/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.2/psutil
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.2
creating build/temp.linux-x86_64-3.2/psutil
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -DPSUTIL_VERSION=311 -I/usr/include/python3.2mu -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-3.2/psutil/_psutil_linux.o
psutil/_psutil_linux.c:12:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/home/django/tcphb/tests/.hitch/virtualenv/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-ho7u3a/psutil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-8iug73-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/django/tcphb/tests/.hitch/virtualenv/include/site/python3.2/psutil" failed with error code 1 in /tmp/pip-build-ho7u3a/psutil
r

I don't want to use python 3 generally as some modules I'm using are not compatible, so I'd rather find a way to install using python 2.7

Going to try installing on osx now as this looks like just what I need.

@crdoconnor
Copy link
Contributor

Hi,

It looks like you might not have the necessary packages installed.

Try "sudo apt-get install python-dev build-essential"

Then run hitch clean and then run hitch init again in your tests directory.

I'll update the docs to reflect the fact that you need these packages installed earlier on.

Thanks for reporting!

@crdoconnor
Copy link
Contributor

The DistributionNotFound problem you had in your virtualenv looks like it might be related to this:

https://stackoverflow.com/questions/19400370/easy-install-and-pip-broke-pkg-resources-distributionnotfound-distribute-0-6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants