hootnot / oanda-api-v20

OANDA REST-V20 API wrapper. Easy access to OANDA's REST v20 API with oandapyV20 package. Checkout the Jupyter notebooks!
MIT License
402 stars 107 forks source link

import error. #138

Closed najeex closed 5 years ago

najeex commented 5 years ago

yes i am facing import error....

(oan) najeeb@najeeb:~/Music/repo/oandapyV20-examples/src$ pip install oandapyV20 Collecting oandapyV20 Using cached https://files.pythonhosted.org/packages/0d/d5/f69c978f485db3048886c447398e39c6ec18041e689656e6d31697ea4e7f/oandapyV20-0.6.3.tar.gz Building wheels for collected packages: oandapyV20 Running setup.py bdist_wheel for oandapyV20 ... done Stored in directory: /home/najeeb/.cache/pip/wheels/2c/b0/cd/49054320a6cc51db0ff4f1ee15d8840375f16cef57b81ebfc0 Successfully built oandapyV20 Installing collected packages: oandapyV20 Successfully installed oandapyV20-0.6.3

`(oan) najeeb@najeeb:~$ ipython Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) Type 'copyright', 'credits' or 'license' for more information IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import oandapyV20

ModuleNotFoundError Traceback (most recent call last)

in () ----> 1 import oandapyV20 ModuleNotFoundError: No module named 'oandapyV20' In [2]: `
hootnot commented 5 years ago

I think you installed oandapyV20 as a python2 package.

If you simply start python2.7 I guess you can do the import. To get it available under python3 use pip3. Please checkout the use of pip, pip3 and possibly virtual enviroments. If you have issues mayby drop a question at stackoverflow.

najeex commented 5 years ago

no this is not working

hootnot commented 5 years ago

that is a comment worth nothing. Did you run: pip3 install oandapyV20 also ?

You have an environment problem on your system related to the python version you (want to) use.

you can find where it is installed by running:

locate oandapyV20.py | grep site, you will get something like:

.../lib/python???/site-packages/oandapyV20/oandapyV20.py