Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Python error

39 views
Skip to first unread message

J Conrado

unread,
Apr 2, 2020, 2:19:16 PM4/2/20
to
Hi,

I have the version of python installed:
Python 3.7.6 and Python 3.8.1
If I type:
python
Python 3.7.6 (default, Jan  8 2020, 19:59:22)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy

it is Ok, no error, but if I did:

python3.8

Python 3.8.1 (default, Jan 31 2020, 15:49:05)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'

Please,
I would like to know why in the python3.8 version I have this error.


Thanks,


Conrado

Mirko

unread,
Apr 2, 2020, 2:59:44 PM4/2/20
to
Because you installed numpy only for 3.7.6. All Python installations
have their own module paths, so you need to install numpy for 3.8.1
too. Do it with:

python3.8 -m pip install numpy

MRAB

unread,
Apr 2, 2020, 3:08:27 PM4/2/20
to
On 2020-04-02 19:09, J Conrado wrote:
> Hi,
>
> I have the version of python installed:
> Python 3.7.6 and Python 3.8.1
> If I type:
> python
> Python 3.7.6 (default, Jan  8 2020, 19:59:22)
> [GCC 7.3.0] :: Anaconda, Inc. on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import numpy
>
> it is Ok, no error, but if I did:
>
> python3.8
>
> Python 3.8.1 (default, Jan 31 2020, 15:49:05)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import numpy
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ModuleNotFoundError: No module named 'numpy'
>
> Please,
> I would like to know why in the python3.8 version I have this error.
>
>
> Thanks,
>
It looks like you have the Anaconda distribution for Python 3.7 and the
standard distribution for Python 3.8.
The standard distribution comes with only the standard library.

The Anaconda distribution comes with a lot of extra stuff, which
includes numpy.

J Conrado

unread,
Apr 2, 2020, 4:15:28 PM4/2/20
to
Hi,

I have the version of python installed: Python 3.7.6 and Python 3.8.1
If I type:
python
Python 3.7.6 (default, Jan â 8 2020, 19:59:22) [GCC 7.3.0] :: Anaconda, Inc. on
linux Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy

it is Ok, no error, but if I did:

python3.8

Python 3.8.1 (default, Jan 31 2020, 15:49:05) [GCC 4.4.7 20120313 (Red Hat
4.4.7-23)] on linux Type "help", "copyright", "credits" or "license" for more
information.
>>> import numpy

Traceback (most recent call last):
â File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'

Please,
I would like to know why in the python3.8 version I have this error.


Thanks,


Conrado

MRAB

unread,
Apr 3, 2020, 2:15:30 PM4/3/20
to
On 2020-04-02 19:09, J Conrado wrote:
> Hi,
>
> I have the version of python installed:
> Python 3.7.6 and Python 3.8.1
> If I type:
> python
> Python 3.7.6 (default, Jan ā 8 2020, 19:59:22)
> [GCC 7.3.0] :: Anaconda, Inc. on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import numpy
>
> it is Ok, no error, but if I did:
>
> python3.8
>
> Python 3.8.1 (default, Jan 31 2020, 15:49:05)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import numpy
>
> Traceback (most recent call last):
> ā File "<stdin>", line 1, in <module>
> ModuleNotFoundError: No module named 'numpy'
>
> Please,
> I would like to know why in the python3.8 version I have this error.
>
>
> Thanks,
>

Mirko

unread,
Apr 3, 2020, 2:15:30 PM4/3/20
to
Am 02.04.2020 um 20:09 schrieb J Conrado:
> Hi,
>
> I have the version of python installed:
> Python 3.7.6 and Python 3.8.1
> If I type:
> python
> Python 3.7.6 (default, Jan 8 2020, 19:59:22)
> [GCC 7.3.0] :: Anaconda, Inc. on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import numpy
>
> it is Ok, no error, but if I did:
>
> python3.8
>
> Python 3.8.1 (default, Jan 31 2020, 15:49:05)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import numpy
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ModuleNotFoundError: No module named 'numpy'
>
> Please,
> I would like to know why in the python3.8 version I have this error.


0 new messages