Skip to main content
Commonmark migration
Origen Enlace

###Actualización

Actualización

###Actualización

Actualización

Aviso eliminado Se requiere una respuesta canónica por ComunidadBot
Recompensa finalizada sin una respuesta ganadora por ComunidadBot
título editado
Enlace

Problema de instalación de numpy usando Anaconda en un VirtualEnv

Corregir nombre python
Origen Enlace
ChemaCortes
  • 8.9k
  • 22
  • 36

Intento utilizar sum en un programa PyhtonPython pero cuando ejecuto el siguiente script me dice que no tengo NumPy.

:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 10, in <module>
    import numpy as np
ImportError: No module named numpy
:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 10, in <module>
    import numpy as np
ImportError: No module named numpy
:~$ pip install numpy
Requirement already satisfied: numpy in ./anaconda2/lib/python2.7/site-packages
:~$ pip install numpy
Requirement already satisfied: numpy in ./anaconda2/lib/python2.7/site-packages
:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 10, in <module>
    import numpy as np
ImportError: No module named numpy
:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 10, in <module>
    import numpy as np
ImportError: No module named numpy
:~$ conda update conda
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2:
#
conda                     4.3.18                   py27_0  
:~$ conda update numpy
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2:
#
numpy                     1.12.1                   py27_0  
:~$ conda install numpy
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2:
#
numpy                     1.12.1                   py27_0  
:~$ conda update conda
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2:
#
conda                     4.3.18                   py27_0  
:~$ conda update numpy
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2:
#
numpy                     1.12.1                   py27_0  
:~$ conda install numpy
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2:
#
numpy                     1.12.1                   py27_0  
:~$ whereis python
python: /usr/bin/python3.5m-config /usr/bin/python /usr/bin/python3.5m /usr/bin/python3.5-config /usr/bin/python2.7 /usr/bin/python2.7-config /usr/bin/python3.5 /usr/lib/python2.7 /usr/lib/python3.5 /etc/python /etc/python2.7 /etc/python3.5 /usr/local/lib/python2.7 /usr/local/lib/python3.5 /usr/include/python3.5m /usr/include/python2.7 /usr/include/python3.5 /usr/share/python /home/antoine/anaconda2/bin/python /home/antoine/anaconda2/bin/python2.7 /usr/share/man/man1/python.1.gz
:~$ whereis python
python: /usr/bin/python3.5m-config /usr/bin/python /usr/bin/python3.5m /usr/bin/python3.5-config /usr/bin/python2.7 /usr/bin/python2.7-config /usr/bin/python3.5 /usr/lib/python2.7 /usr/lib/python3.5 /etc/python /etc/python2.7 /etc/python3.5 /usr/local/lib/python2.7 /usr/local/lib/python3.5 /usr/include/python3.5m /usr/include/python2.7 /usr/include/python3.5 /usr/share/python /home/antoine/anaconda2/bin/python /home/antoine/anaconda2/bin/python2.7 /usr/share/man/man1/python.1.gz
:~$ conda create --name pythontests python=2 numpy
Fetching package metadata .........
Solving package specifications: .

Package plan for installation in environment /home/antoine/anaconda2/envs/pythontests:

The following NEW packages will be INSTALLED:

    mkl:        2017.0.1-0   
    numpy:      1.12.1-py27_0
    openssl:    1.0.2k-2     
    pip:        9.0.1-py27_1 
    python:     2.7.13-0     
    readline:   6.2-2        
    setuptools: 27.2.0-py27_0
    sqlite:     3.13.0-0     
    tk:         8.5.18-0     
    wheel:      0.29.0-py27_0
    zlib:       1.2.8-3      

Proceed ([y]/n)? 

openssl-1.0.2k 100% |################################| Time: 0:00:02   1.60 MB/s
readline-6.2-2 100% |################################| Time: 0:00:00   1.65 MB/s
tk-8.5.18-0.ta 100% |################################| Time: 0:00:01   1.74 MB/s
zlib-1.2.8-3.t 100% |################################| Time: 0:00:00   1.77 MB/s
setuptools-27. 100% |################################| Time: 0:00:00   1.58 MB/s
wheel-0.29.0-p 100% |################################| Time: 0:00:00   1.91 MB/s
#
# To activate this environment, use:
# > source activate pythontests
#
# To deactivate this environment, use:
# > source deactivate pythontests
#

:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 8, in <module>
    import numpy as np
ImportError: No module named numpy
(pythontests) antoine@antoine-Inspiron-3543:~$ conda install numpy
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2/envs/pythontests:
#
numpy                     1.12.1                   py27_0  
(pythontests) antoine@antoine-Inspiron-3543:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 8, in <module>
    import numpy as np
ImportError: No module named numpy
:~$ conda create --name pythontests python=2 numpy
Fetching package metadata .........
Solving package specifications: .

Package plan for installation in environment /home/antoine/anaconda2/envs/pythontests:

The following NEW packages will be INSTALLED:

    mkl:        2017.0.1-0   
    numpy:      1.12.1-py27_0
    openssl:    1.0.2k-2     
    pip:        9.0.1-py27_1 
    python:     2.7.13-0     
    readline:   6.2-2        
    setuptools: 27.2.0-py27_0
    sqlite:     3.13.0-0     
    tk:         8.5.18-0     
    wheel:      0.29.0-py27_0
    zlib:       1.2.8-3      

Proceed ([y]/n)? 

openssl-1.0.2k 100% |################################| Time: 0:00:02   1.60 MB/s
readline-6.2-2 100% |################################| Time: 0:00:00   1.65 MB/s
tk-8.5.18-0.ta 100% |################################| Time: 0:00:01   1.74 MB/s
zlib-1.2.8-3.t 100% |################################| Time: 0:00:00   1.77 MB/s
setuptools-27. 100% |################################| Time: 0:00:00   1.58 MB/s
wheel-0.29.0-p 100% |################################| Time: 0:00:00   1.91 MB/s
#
# To activate this environment, use:
# > source activate pythontests
#
# To deactivate this environment, use:
# > source deactivate pythontests
#

:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 8, in <module>
    import numpy as np
ImportError: No module named numpy
(pythontests) antoine@antoine-Inspiron-3543:~$ conda install numpy
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2/envs/pythontests:
#
numpy                     1.12.1                   py27_0  
(pythontests) antoine@antoine-Inspiron-3543:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 8, in <module>
    import numpy as np
ImportError: No module named numpy

Intento utilizar sum en un programa Pyhton pero cuando ejecuto el siguiente script me dice que no tengo NumPy.

:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 10, in <module>
    import numpy as np
ImportError: No module named numpy
:~$ pip install numpy
Requirement already satisfied: numpy in ./anaconda2/lib/python2.7/site-packages
:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 10, in <module>
    import numpy as np
ImportError: No module named numpy
:~$ conda update conda
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2:
#
conda                     4.3.18                   py27_0  
:~$ conda update numpy
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2:
#
numpy                     1.12.1                   py27_0  
:~$ conda install numpy
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2:
#
numpy                     1.12.1                   py27_0  
:~$ whereis python
python: /usr/bin/python3.5m-config /usr/bin/python /usr/bin/python3.5m /usr/bin/python3.5-config /usr/bin/python2.7 /usr/bin/python2.7-config /usr/bin/python3.5 /usr/lib/python2.7 /usr/lib/python3.5 /etc/python /etc/python2.7 /etc/python3.5 /usr/local/lib/python2.7 /usr/local/lib/python3.5 /usr/include/python3.5m /usr/include/python2.7 /usr/include/python3.5 /usr/share/python /home/antoine/anaconda2/bin/python /home/antoine/anaconda2/bin/python2.7 /usr/share/man/man1/python.1.gz
:~$ conda create --name pythontests python=2 numpy
Fetching package metadata .........
Solving package specifications: .

Package plan for installation in environment /home/antoine/anaconda2/envs/pythontests:

The following NEW packages will be INSTALLED:

    mkl:        2017.0.1-0   
    numpy:      1.12.1-py27_0
    openssl:    1.0.2k-2     
    pip:        9.0.1-py27_1 
    python:     2.7.13-0     
    readline:   6.2-2        
    setuptools: 27.2.0-py27_0
    sqlite:     3.13.0-0     
    tk:         8.5.18-0     
    wheel:      0.29.0-py27_0
    zlib:       1.2.8-3      

Proceed ([y]/n)? 

openssl-1.0.2k 100% |################################| Time: 0:00:02   1.60 MB/s
readline-6.2-2 100% |################################| Time: 0:00:00   1.65 MB/s
tk-8.5.18-0.ta 100% |################################| Time: 0:00:01   1.74 MB/s
zlib-1.2.8-3.t 100% |################################| Time: 0:00:00   1.77 MB/s
setuptools-27. 100% |################################| Time: 0:00:00   1.58 MB/s
wheel-0.29.0-p 100% |################################| Time: 0:00:00   1.91 MB/s
#
# To activate this environment, use:
# > source activate pythontests
#
# To deactivate this environment, use:
# > source deactivate pythontests
#

:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 8, in <module>
    import numpy as np
ImportError: No module named numpy
(pythontests) antoine@antoine-Inspiron-3543:~$ conda install numpy
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2/envs/pythontests:
#
numpy                     1.12.1                   py27_0  
(pythontests) antoine@antoine-Inspiron-3543:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 8, in <module>
    import numpy as np
ImportError: No module named numpy

Intento utilizar sum en un programa Python pero cuando ejecuto el siguiente script me dice que no tengo NumPy.

:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 10, in <module>
    import numpy as np
ImportError: No module named numpy
:~$ pip install numpy
Requirement already satisfied: numpy in ./anaconda2/lib/python2.7/site-packages
:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 10, in <module>
    import numpy as np
ImportError: No module named numpy
:~$ conda update conda
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2:
#
conda                     4.3.18                   py27_0  
:~$ conda update numpy
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2:
#
numpy                     1.12.1                   py27_0  
:~$ conda install numpy
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2:
#
numpy                     1.12.1                   py27_0  
:~$ whereis python
python: /usr/bin/python3.5m-config /usr/bin/python /usr/bin/python3.5m /usr/bin/python3.5-config /usr/bin/python2.7 /usr/bin/python2.7-config /usr/bin/python3.5 /usr/lib/python2.7 /usr/lib/python3.5 /etc/python /etc/python2.7 /etc/python3.5 /usr/local/lib/python2.7 /usr/local/lib/python3.5 /usr/include/python3.5m /usr/include/python2.7 /usr/include/python3.5 /usr/share/python /home/antoine/anaconda2/bin/python /home/antoine/anaconda2/bin/python2.7 /usr/share/man/man1/python.1.gz
:~$ conda create --name pythontests python=2 numpy
Fetching package metadata .........
Solving package specifications: .

Package plan for installation in environment /home/antoine/anaconda2/envs/pythontests:

The following NEW packages will be INSTALLED:

    mkl:        2017.0.1-0   
    numpy:      1.12.1-py27_0
    openssl:    1.0.2k-2     
    pip:        9.0.1-py27_1 
    python:     2.7.13-0     
    readline:   6.2-2        
    setuptools: 27.2.0-py27_0
    sqlite:     3.13.0-0     
    tk:         8.5.18-0     
    wheel:      0.29.0-py27_0
    zlib:       1.2.8-3      

Proceed ([y]/n)? 

openssl-1.0.2k 100% |################################| Time: 0:00:02   1.60 MB/s
readline-6.2-2 100% |################################| Time: 0:00:00   1.65 MB/s
tk-8.5.18-0.ta 100% |################################| Time: 0:00:01   1.74 MB/s
zlib-1.2.8-3.t 100% |################################| Time: 0:00:00   1.77 MB/s
setuptools-27. 100% |################################| Time: 0:00:00   1.58 MB/s
wheel-0.29.0-p 100% |################################| Time: 0:00:00   1.91 MB/s
#
# To activate this environment, use:
# > source activate pythontests
#
# To deactivate this environment, use:
# > source deactivate pythontests
#

:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 8, in <module>
    import numpy as np
ImportError: No module named numpy
(pythontests) antoine@antoine-Inspiron-3543:~$ conda install numpy
Fetching package metadata .........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/antoine/anaconda2/envs/pythontests:
#
numpy                     1.12.1                   py27_0  
(pythontests) antoine@antoine-Inspiron-3543:~$ ./testPostreSQLPython.py 
Traceback (most recent call last):
  File "./testPostreSQLPython.py", line 8, in <module>
    import numpy as np
ImportError: No module named numpy
Aviso añadido Se requiere una respuesta canónica por Revolucion for Monica
Recompensa iniciada por un valor de 100 de reputación por Revolucion for Monica
se añadieron 543 caracteres en el cuerpo
Origen Enlace
Loading
se añadieron 543 caracteres en el cuerpo
Origen Enlace
Loading
Mejorando gramática y formato.
Origen Enlace
user13558
user13558
Loading
Loading
se eliminaron 250 caracteres en el cuerpo
Origen Enlace
Loading
se añadieron 268 caracteres en el cuerpo
Origen Enlace
Loading
se añadieron 992 caracteres en el cuerpo
Origen Enlace
Loading
Corrijo redacción y ortografía
Origen Enlace
FJSevilla
  • 62.1k
  • 7
  • 43
  • 68
Loading
se añadieron 136 caracteres en el cuerpo
Origen Enlace
Loading
Origen Enlace
Loading