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

AttributeError: module 'numpy.core' has no attribute 'numerictypes' #432

Closed
AureliusMarcusHu opened this issue Jul 30, 2021 · 10 comments
Closed
Assignees
Labels
bug Something isn't working compatibility-issue Identified as a compatibility issue either during installation or during usage

Comments

@AureliusMarcusHu
Copy link

AureliusMarcusHu commented Jul 30, 2021

Hi Guys,

I'm very new in python and in I have installed investpy by pip. I get the notes all dependent packages are installed succesfully included investpy. I always get an error from numpy when I run the command [investpy.get_stock_information(stock='AAPL', country='United States', as_json=True)]

File "C:\Program Files (x86)\Python39-32\lib\site-packages\numpy_init_.py", line 200, in core.numerictypes.typeDict,
AttributeError: module 'numpy.core' has no attribute 'numerictypes'

I have uninstalled and reinstalled the packages whitout succes. Always the same error.
Can someone help me please, what do I wrong ?

Thanks in advance.

@ghost
Copy link

ghost commented Aug 17, 2021

I am facing the same issue. Please help!

@alvarobartt alvarobartt self-assigned this Aug 24, 2021
@alvarobartt alvarobartt added bug Something isn't working compatibility-issue Identified as a compatibility issue either during installation or during usage labels Aug 24, 2021
@alvarobartt alvarobartt added this to To do in investpy v1.1.0 via automation Aug 24, 2021
@alvarobartt alvarobartt added this to the investpy v1.0.8 milestone Aug 24, 2021
@alvarobartt
Copy link
Owner

Hi @AureliusMarcusHu and @lone-wolf07 🤗

Thanks for reporting this issue! Are you both using Python 3.9? Which OS? And, finally, can you check which numpy version do you have installed?

Once you provide me that information I'll solve this ASAP 👍

@alvarobartt
Copy link
Owner

alvarobartt commented Aug 24, 2021

Besides that, can you try to re-install numpy as it follows pip install numpy -U

@nathan3leaf
Copy link

I'm assuming this is still in the broken phase?

@alvarobartt
Copy link
Owner

Hi @nathan3leaf, can you provide me more details? I think this is not happening anymore, just that the issue was not closed back in the day.

Is this function the one that is failing?

information = investpy.get_stock_information(stock='AAPL', country='United States', as_json=True)

Thanks! 🤗

@nathan3leaf
Copy link

@alvarobartt
I did encounter it, but just gave in and updated to python 3.9 and it's not occurring anymore. I believe I experienced it when I was on 3.6 but to be honest I don't recall all the circumstances that went into it popping up. It may have been related to the arcgis package, but again, sadly I don't recall. Thank you for your time though and for the quick reply.

@vmendezs
Copy link

Hey guys, I was having the same problem but then I made the next changes and it works for me:

  1. Check the version of numpy and tensorflow with pip show numpy and pip show tensorflow (in my case I have 1.19.5 for numpy and 2.6.0 for tensorflow)
  2. Also check the version of python, it is not necessary but just in case that you were working on python2.7 it won't work
  3. Restart your machine, it helps the system to save the changes for the version of the packages
    In case you don't know how to change the version of the packages, I changed them on the terminal with python3 -m pip install numpy=1.19.5

Hope it works for u, bye.

@alvarobartt
Copy link
Owner

Thanks for your suggestion @vmendezs, I'll try to re-run the unit tests with the latest version of numpy to see whether that works or not, and as soon as the unit tests are working I'll consider this issue closed. 👍🏻

alvarobartt pushed a commit that referenced this issue Oct 15, 2021
@GiorgioPeng
Copy link

GiorgioPeng commented Oct 28, 2021

Well, I have the same problem, but I've solved it by a method like the solution from @vmendezs.

  1. The first key is to install the right version of "numpy". For example, I have checked the 1.19.5 version, and there is a "numerictypes.py" (at path ~/anaconda3/lib/python3.8/site-packages/numpy/core/) in numpy.
  2. The second key is restart the conda environment. (I tried switching to another conda environment, and then switching back.)
    Hope these tips can help u.

@alvarobartt
Copy link
Owner

Thanks for the information @GiorgioPeng! 🤗 Closing this for now, hopefully, everything's solved already!

investpy v1.1.0 automation moved this from To do to Done Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compatibility-issue Identified as a compatibility issue either during installation or during usage
Projects
Development

No branches or pull requests

5 participants