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

Trackeback pkg problem #1

Closed
lbarberiscanoni opened this issue Feb 2, 2015 · 10 comments
Closed

Trackeback pkg problem #1

lbarberiscanoni opened this issue Feb 2, 2015 · 10 comments
Labels

Comments

@lbarberiscanoni
Copy link

I'll start by saying that this is awesome, and I love you guys for doing this.

I used the sudo pip install stackit command on my term (I use Iterm2 on a Mac that contains both Python2.7 and Python3.3) and it shows that everything was downloaded correctly, but when I try using it I get this:

Traceback (most recent call last):
File "/usr/local/bin/stackit", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests

Any idea as to why I get this reaction?

Thank you so much again for making this XD

@lukasschwab
Copy link
Owner

@lbarberiscanoni Hmmm...

I attempted to recreate your error––I use stock Terminal on a OSX with Python 2.6 and 2.7 installed. This is what I ran:

$ sudo pip uninstall requests
$ sudo pip uninstall stackit
$ sudo pip install stackit

During the stackit installation process, pip prints Downloading/unpacking requests (from stackit) Downloading requests-2.5.1-py2.py3-none-any.whl (464kB): 464kB downloaded––a successful download.

I suspect that your error might be a problem with Python3.3. We developed with Python2.7 in mind, so perhaps you're seeing errors because your default python version is different?

I'm still surprised, considering requests appears to support Python3.3. Have you tried to run sudo pip install requests separately from the stackit install sequence?

Leaving this open! Hopefully we can help you fix this.

@lbarberiscanoni
Copy link
Author

Hey Lukas,

The issue persists :( I tried both pip installing requests separately and just redoing stackit.

The unpacking of requests and the download works too which is what makes it weirder.

I use homebrew as my package manager, is that the problem maybe?

@lukasschwab
Copy link
Owner

I don't think your package manager should be an issue––pip is the package manager you're using to install the requests package.

You should be able to see what version of Python you run by default by simply entering python at the command line and checking the little blurb that shows up––e.g. Python 2.7.6 (default, Sep 9 2014, 15:04:36) indicates I'm running 2.7 by default.

The Python version you installed with Homebrew might not be your default; check out this StackOverflow to be sure you're using the version you intend.

@lbarberiscanoni
Copy link
Author

I have python 2.7.5 as default

And if I run python in the terminal I get this:

Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin

@WnP
Copy link
Contributor

WnP commented Feb 6, 2015

@lukasschwab try easy_install --upgrade requests

@lukasschwab
Copy link
Owner

Thanks!
@lbarberiscanoni give @WnP's solution a go!

Edit: I'd test it myself, but I'm having trouble replicating the problem.

@lbarberiscanoni
Copy link
Author

Thank you lukassschwab! It solved the issue, kind of...

Now the terminal recognizes stackit as a command, however I get a new error message:

Traceback (most recent call last):
File "/usr/local/bin/stackit", line 9, in
load_entry_point('stackit==0.1.3', 'console_scripts', 'stackit')()
File "/usr/local/lib/python2.7/site-packages/stackit/stackit_core.py", line 197, in main
searchTerm(term, tags)
File "/usr/local/lib/python2.7/site-packages/stackit/stackit_core.py", line 92, in searchTerm
questions = so.search_advanced(q = term, tagged = tags, sort = Sort.Votes)
AttributeError: 'Site' object has no attribute 'search_advanced'

@WnP
Copy link
Contributor

WnP commented Feb 7, 2015

@lbarberiscanoni seems related to #2

@lbarberiscanoni
Copy link
Author

Right, I just noticed that XD

@lukasschwab
Copy link
Owner

Well, if those two solutions work for you, I'm calling this thread closed!

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

No branches or pull requests

3 participants