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

import krakenex ImportError: No module named krakenex #37

Closed
troublesprouter opened this issue Jul 30, 2017 · 2 comments
Closed

import krakenex ImportError: No module named krakenex #37

troublesprouter opened this issue Jul 30, 2017 · 2 comments
Labels

Comments

@troublesprouter
Copy link

troublesprouter commented Jul 30, 2017

Versions

OS:       OSX Sierra
Python:   3.5
krakenex: 

What are you trying to achieve?

I'm trying to import krakenex and run it with cmd + b in Sublime Text on OSX.

# code sample

What do you expect to happen?

I expect to be able to run the example open-positions.py

What happens instead?

When pressing cmd + b, I get
"import krakenex
ImportError: No module named krakenex"

If I create a new file that just says "print 'hello world'" and then press cmd + b, it does print 'hello world'.

However, krakenex is not imported when I press cmd + b within open-positions.py.

The problem is probably very basic. I learned python yesterday, installed Anaconda today, and I have very little experience with APIs.

I downloaded the zip file from https://github.com/veox/python3-krakenex/, extracted it, then ran
python3 setup.py install within that extracted directory.
I then opened that whole extracted folder with Sublime Text 3.
Then, within open-positions.py, if I press cmd + b, I get said error message.

The full output is

raceback (most recent call last):
File "/Users/Norbert/Downloads/python3-krakenex-master/examples/open-positions.py", line 1, in
import krakenex
ImportError: No module named krakenex
[Finished in 0.1s with exit code 1]
[shell_cmd: "python" -u "/Users/Norbert/Downloads/python3-krakenex-master/examples/open-positions.py"]
[dir: /Users/Norbert/Downloads/python3-krakenex-master/examples]
[path: /usr/bin:/bin:/usr/sbin:/sbin]

Help much appreciated.

# error message
@veox
Copy link
Owner

veox commented Jul 31, 2017

If you don't install the package, Python won't know where to import it from.

For a one-off, you might go with just moving the example to the top-level directory, and try running it from there.

If you intend to use krakenex extensively, see the README for installation instructions.

@veox veox added the invalid label Jul 31, 2017
@troublesprouter
Copy link
Author

Thank you. I think the problem was due to my IDE.

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

2 participants