alpha_vantage: 'alpha_vantage' is not a package

Hi!

I saw people had similar issues which was resolved by updating to latest version 0.1.9. I am currently trying to install/run your latest version 2.0.0 and getting the issue:

>  sudo pip install alpha_vantage
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
Collecting alpha_vantage
  Using cached https://files.pythonhosted.org/packages/90/62/c48ff7e3c7b6d7d6b50aefa48166abc3617fa724dba4bb51dab27c6288e4/alpha_vantage-2.0.0.tar.gz
Requirement already satisfied: requests in /usr/lib/python2.7/site-packages (from alpha_vantage)
Requirement already satisfied: simplejson in /usr/lib64/python2.7/site-packages (from alpha_vantage)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests->alpha_vantage)
Requirement already satisfied: idna<2.7,>=2.5 in /usr/lib/python2.7/site-packages (from requests->alpha_vantage)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests->alpha_vantage)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests->alpha_vantage)
Installing collected packages: alpha-vantage
  Running setup.py install for alpha-vantage ... done
Successfully installed alpha-vantage-2.0.0
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

>  sudo pip3 install alpha_vantage
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting alpha_vantage
  Using cached https://files.pythonhosted.org/packages/90/62/c48ff7e3c7b6d7d6b50aefa48166abc3617fa724dba4bb51dab27c6288e4/alpha_vantage-2.0.0.tar.gz
Requirement already satisfied: requests in /usr/lib/python3.6/site-packages (from alpha_vantage)
Requirement already satisfied: simplejson in /usr/local/lib64/python3.6/site-packages (from alpha_vantage)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3.6/site-packages (from requests->alpha_vantage)
Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests->alpha_vantage)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/lib/python3.6/site-packages (from requests->alpha_vantage)
Installing collected packages: alpha-vantage
  Running setup.py install for alpha-vantage ... done
Successfully installed alpha-vantage-2.0.0
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

>  python3
Python 3.6.5 (default, Apr  4 2018, 15:01:18) 
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import alpha_vantage
>>> exit()

>  python3 alpha_vantage.py
Traceback (most recent call last):
  File "alpha_vantage.py", line 1, in <module>
    from alpha_vantage.timeseries import TimeSeries
  File "alpha_vantage.py", line 1, in <module>
    from alpha_vantage.timeseries import TimeSeries
ModuleNotFoundError: No module named 'alpha_vantage.timeseries'; 'alpha_vantage' is not a package

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 19 (5 by maintainers)

Most upvoted comments

Hi, @RomelTorres

No issue anymore! 😃

That was a definately stupid mistake from me by naming file same as module. Even After I removed it, I still had some problems as I did not noticed leftover .pyc file. All good now, works as expected! Thank you!