Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 运行gym时,健全性检查返回numpy版本的属性错误___Python_Numpy_Openai Gym - Fatal编程技术网

Python 运行gym时,健全性检查返回numpy版本的属性错误__

Python 运行gym时,健全性检查返回numpy版本的属性错误__,python,numpy,openai-gym,Python,Numpy,Openai Gym,我正试图让开放式人工智能健身房工作,但我面临着一个非常持续的错误。 当我运行我的程序(只是简单的演示cartpole解算器)时,我得到了这个错误。(文件“gperm.py”是cartpole解算器) 这很奇怪,因为我对numpy进行了完整的pip安装,甚至尝试了git克隆,但都没有成功。我已经检查,以确保我没有其他文件称为numpy,一切似乎都在检查中 如果其他人也有同样的问题,或者有人有解决方案,我们将不胜感激 它还打印了一个“提示”,提示我尝试:pip install-U numpy

我正试图让开放式人工智能健身房工作,但我面临着一个非常持续的错误。
当我运行我的程序(只是简单的演示cartpole解算器)时,我得到了这个错误。(文件“gperm.py”是cartpole解算器)

这很奇怪,因为我对numpy进行了完整的pip安装,甚至尝试了git克隆,但都没有成功。我已经检查,以确保我没有其他文件称为numpy,一切似乎都在检查中

如果其他人也有同样的问题,或者有人有解决方案,我们将不胜感激

它还打印了一个“提示”,提示我尝试:pip install-U numpy

    logger.warn("You have 'numpy' version %s installed, but 'gym' requires at least 1.10.4. HINT: upgrade via 'pip install -U numpy'.", numpy.__version__)
我确实有一个版本的numpy>=1.10.4,所以不应该出现在屏幕上。(记不清确切的版本)

但是,使用pip安装-U numpy会返回“SNIMissingWarning”、“InsequrePlatformWarning”和以下内容:

The directory '/Users/sonyaferraro/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/sonyaferraro/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.

我真的不知道这是告诉我做什么,因为我有这些目录的权限

根据您的终端输出,我认为您正在将MacOS与brew结合使用

brew链接——覆盖numpy
似乎已经为我解决了这个问题

    logger.warn("You have 'numpy' version %s installed, but 'gym' requires at least 1.10.4. HINT: upgrade via 'pip install -U numpy'.", numpy.__version__)
The directory '/Users/sonyaferraro/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/sonyaferraro/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.