• asia~wz[]niubilit...
    2018-11-07
    我是mac,那numpy的安装包下载包有区别吗?

    作者回复: 没有区别的whl格式是pip封装的和平台无关

    
     1
  • 积土$而沃
    2018-08-09
    老师 为什么我的numpy安装不了 pip3显示如下:
    bogon:~ Jason$ sudo pip3 install numpy
    Password:
    The directory '/Users/Jason/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    The directory '/Users/Jason/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    Collecting numpy
      Downloading https://files.pythonhosted.org/packages/6a/d5/218414f0f41cb3f183d55d68dbcd996fa3602d5849bdf2ad6c059e98fa68/numpy-1.15.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (24.5MB)
        2% |▊ | 532kB 8.0kB/s eta 0:49:43Exception:
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 331, in _error_catcher
        yield
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 413, in read
        data = self._fp.read(amt)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
        data = self.__fp.read(amt)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 449, in read
        n = self.readinto(b)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 493, in readinto
        n = self.fp.readinto(b)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto
        return self._sock.recv_into(b)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1009, in recv_into
        return se
    展开
    
     1
  • Serendipity
    2019-10-11
    老师,MAC 系统,使用 pip3 install numpy 命令报错,使用 pip install numpy 命令正常,这是什么原因呢?是因为默认就是 python 3 吗?谢谢。

    作者回复: 你好,在linux 中 pip 如果是用rpm 安装,会产生 pip3 pip3.6和 pip 三个文件(当然一个是真正的命令,其他两个是快捷方式),在mac 中,如果程序没自动创建就没办法执行了,如果你使用pip比较习惯也可以手动创建

    which pip <---找到pip命令的完整路径在哪里
    ln -s /完整路径/pip /完整路径/pip3 <---创建个快捷方式即可

    另外,一般mac系统只有pip3 没有pip命令,这种情况可能是使用了一些软件工具安装,并非官方安装包

    
    
  • NO.9
    2019-08-20
    mac 安装失败之后的解决办法:
    1 python get-pip.py --user
    2 pip3 install numpy --user
    为什么好用不知道,不熟悉cmdl
    
    
  • Dream
    2019-07-12
    win10中安装不了numpy
    D:\untitled\1\Scripts>pip stall numpy
    Fatal Python error: Py_Initialize: unable to load the file system codec
    ModuleNotFoundError: No module named 'encodings'

    Current thread 0x00000d28 (most recent call first):


    这样也不行
    D:\untitled\1\Scripts>pip install numpy-1.16.4-cp36-cp36m-win_amd64.whl
    Fatal Python error: Py_Initialize: unable to load the file system codec
    ModuleNotFoundError: No module named 'encodings'

    Current thread 0x00000c20 (most recent call first):

    展开

    作者回复: 使用 pip install numpy-1.16.4-cp36-cp36m-win_amd64.whl 这种方式安装,第一种方式需要安装编译器,比较麻烦
    另外错误提示encodings 也要用pip先安装上, 使用pip install encodings 看看提示什么错误,根据错误来排查一下原因

     1
    
  • 人の初
    2019-06-27
    老师,安装不了啊,报错(Windows的):
    Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
    pip3 install numpy
      File "<input>", line 1
        pip3 install numpy
                   ^
    SyntaxError: invalid syntax
    展开

    作者回复: pip3 install numpy 要在终端执行, 不要再python提示符下运行,它是一条类似 ping、 python 这类的命令,不是python 的函数

    
    
  • 王涛
    2019-03-17
    老师好,我的import numpy
    python 异常退出
    显示 process finished with exit code 139 (interrupted by signal 11:SIGSEGV)

    作者回复: free() close() 多次和引用空指针都会导致SIGSEGV ,建议你使用pip 重新安装 numpy

    
    
  • asia~wz[]niubilit...
    2018-11-06
    Collecting numpy
      Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x108120da0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/numpy/
      Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x108120cc0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/numpy/
      Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x108120a58>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/numpy/
      Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x108120a20>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/numpy/
      Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x1081206a0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/numpy/
      Could not find a version that satisfies the requirement numpy (from versions: )
    No matching distribution found for numpy
    老师,不知道这是什么原因
    展开

    作者回复: 网络原因导致安装包在线安装失败,可以通过搜索引擎找numpy的离线安装包,下载下来的格式是whl扩展名的,打开命令行,使用pip加完整路径安装,如:
    pip install /path/to/install/numpy-version-cp36-platform.whl

    
    
  • 积土$而沃
    2018-08-09
    出现问题了,安装不了numpy,如下:
    bogon:~ Jason$ sudo pip3 install numpy
    Password:
    The directory '/Users/Jason/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    The directory '/Users/Jason/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    Collecting numpy
      Downloading https://files.pythonhosted.org/packages/6a/d5/218414f0f41cb3f183d55d68dbcd996fa3602d5849bdf2ad6c059e98fa68/numpy-1.15.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (24.5MB)
        2% |▊ | 532kB 8.0kB/s eta 0:49:43Exception:
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 331, in _error_catcher
        yield
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 413, in read
        data = self._fp.read(amt)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
        data = self.__fp.read(amt)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 449, in read
        n = self.readinto(b)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 493, in readinto
        n = self.fp.readinto(b)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto
        return self._sock.recv_into(b)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1009, in recv_into
        return self.read(
    展开

    作者回复: 更新pip,然后将numpy的whl安装包下载到本地安装,很多软件源在国外,网络不稳定会导致安装失败。

    
    
我们在线,来聊聊吧