点升级后无法安装numpy

时间:2019-01-23 11:48:21

标签: python python-3.x numpy pip

由于某些原因,在将pip升级到19.0版之后,我无法安装最新版本的numpy(它仍然可以与pip版本18.1完美配合)。

我跑步时

package com.perfectcomputersolutions.pos.aspect

import org.aspectj.lang.JoinPoint
import org.aspectj.lang.annotation.Aspect
import org.aspectj.lang.annotation.Before
import org.aspectj.lang.reflect.CodeSignature
import org.springframework.core.annotation.Order
import org.springframework.stereotype.Component

@Aspect
@Order(0)
@Component
class NoNullArgsAspect {

    // Use this if writing in Java.
    // omitting the getMetaClass call is only for Groovy

    // @Before(
    //         value = "@within(com.perfectcomputersolutions.pos.annotation.NoNullArgs) || @annotation(com.perfectcomputersolutions.pos.annotation.NoNullArgs)"
    // )

    @Before(
            value = "!execution(* *.getMetaClass(..)) && @within(com.perfectcomputersolutions.pos.annotation.NoNullArgs) || @annotation(com.perfectcomputersolutions.pos.annotation.NoNullArgs)"
    )
    void requireNotNull(JoinPoint jp) {

        def method = (CodeSignature) jp.signature
        def types  = method.parameterTypes
        def names  = method.parameterNames
        def args   = jp.args

        for (int i = 0; i < types.length; i++)
            Objects.requireNonNull(args[i], "Parameter ${names[i]} must not be null" as String)
    }
}

我得到这个例外

pip install numpy --no-cache

我也在使用python 3.6版和virtualenvwrapper 16.0.0版。

UPD 0

Exception:
Traceback (most recent call last):
  File "/home/me/.venvs/_/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 176, in main
    status = self.run(options, args)
  File "/home/me/.venvs/_/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 346, in run
    session=session, autobuilding=True
  File "/home/me/.venvs/_/lib/python3.6/site-packages/pip/_internal/wheel.py", line 848, in build
    assert building_is_possible
AssertionError

给予this tremendous output

UPD 1 我在numpy问题跟踪器上打开了bug request

1 个答案:

答案 0 :(得分:9)

这是因为pip v19.0已发布yesterday,并且最近一次推送到numpy git rep是在10天之前。我认为我们必须等待与pip v19.0兼容的更新。

编辑1: 根据 @frmdstryr 的评论,已发布pip v19.0.1来解决此问题。