ValueError: not enough values to unpack (expected 2, got 1) when I try to import numpy in python3

116 Views Asked by At

I have python3.7.4 installed and when I install numpy using pip3 it says installation is successful. When I am in my main directory I run python3 and type in import numpy and it works fine working fine when I am running python3 from main directory. However, when I cd into my python3 directory where I keep all my .py files and I try to run a python file that imports numpy I get an error. If I am in this python3 directory and I run python3 I open the same version of python however when I try to run import numpy I get the same error. My homework3.py file only contains one line which is import numpy as np just to see if it runs which it does not.

1

There are 1 best solutions below

0
g3or3 On

I had a file in the same directory where Python is installed with the same name as "numbers.py" so I deleted the extra file and everything worked fine.