前提・実現したいこと
ほぼ知識ゼロの状態から色んなサイトを巡ってcloud9からAPI接続しようとしましたが、
うまくいきませんので質問いたします。よろしくお願いします。
前提
・cloud9は初期状態のpython2からpython3への関連付け済
・ネットに出ている情報から、モジュールは
pip install git+https://github.com/oanda/oandapy.git
というコマンドでインストール試みましたがうまくいかず、
sudo pip install git+https://github.com/oanda/oandapy.git
で実行すると
sudo: pip: command not found
と出てしまい、ネットの情報でも解決できず。
pip install git+https://github.com/oanda/oandapy.git --user oandapy
として実行したらインストールできた。
発生している問題・エラーメッセージ
Traceback (most recent call last): File "/home/ec2-user/environment/test.py", line 13, in <module> oa = oandapy.API(environment="practice", access_token=API_KEY) AttributeError: module 'oandapy' has no attribute 'API'
該当のソースコード
python3.6
1import oandapy 2from datetime import datetime, timedelta 3 4ACCOUNT_ID = "***" 5API_KEY = "************************" 6 7oa = oandapy.API(environment="practice", access_token=API_KEY)
試したこと
・ファイル名、ディレクトリ名は被っていません。
・パッケージインストール時の--user oandapyがまずいのかと思い、oandapyをpip uninstallし、
他の方法でのインストールを試みたが、--user oandapyをつける以外にインストールできる方法が見当たらず。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。