相关疑难解决方法(0)

SciPy构建/安装Mac Osx

我在我的mac os x上为python 2.7.3成功构建/安装了NumPy.现在我想建立/安装scipy.我从git hub下载了它.进入目录.Ran python setup.py build,它似乎一直在工作,直到遇到这个错误:

customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize NAGFCompiler
customize AbsoftFCompiler
Could not locate executable f90
Could not locate executable f77
customize IBMFCompiler
Could not locate executable xlf90
Could not locate executable xlf
customize IntelFCompiler
Could not locate executable ifort
Could not locate executable ifc
customize GnuFCompiler
Could not locate executable g77
customize G95FCompiler
Could not locate executable g95
customize PGroupFCompiler
Could not locate executable pgfortran
don't …
Run Code Online (Sandbox Code Playgroud)

python macos fortran scipy python-2.7

33
推荐指数
1
解决办法
3万
查看次数

无法通过自制软件安装gfortran

当我试图安装gfortran时,我收到了此消息.

~$ brew install gfortran
Error: No available formula for gfortran
GNU Fortran is now provided as part of GCC, and can be installed with:
  brew install gcc
Run Code Online (Sandbox Code Playgroud)

我的问题是如何用自制软件或端口安装gfortran?

要么

如果现在GNU Fortran是GCC的一部分我如何使用gcc编译fortran代码?

我不确定我是否误解了一些我记得上次我仍然可以使用gfortran编译我的代码但现在它不起作用的东西.

更多的信息:

当我使用命令时,brew list我仍然看到gfortran在那里,但不能使用它.

更多信息(最新):

好的,现在我可以使用gfortran命令,但另一个问题来了

~$ gfortran-4.9 hello.f
dyld: Library not loaded: /usr/local/lib/libcloog-isl.4.dylib
  Referenced from: /usr/local/Cellar/gcc/4.9.2/libexec/gcc/x86_64-apple-darwin14.0.0/4.9.2/f951
  Reason: image not found
gfortran-4.9: internal compiler error: Trace/BPT trap: 5 (program f951)
Abort trap: 6
Run Code Online (Sandbox Code Playgroud)

homebrew fortran gfortran fortran90

19
推荐指数
1
解决办法
2万
查看次数

如何使用python和Java运行Docker?

我需要在docker容器中同时使用java和python来运行一些代码。

这是我的dockerfile:如果我不添加FROM openjdk:slim,它将正常运行

#get python
FROM python:3.6-slim

RUN pip install --trusted-host pypi.python.org flask

#get openjdk

FROM openjdk:slim


COPY . /targetdir
WORKDIR /targetdir

# Make port 81 available to the world outside this container
EXPOSE 81

CMD ["python", "test.py"]
Run Code Online (Sandbox Code Playgroud)

test.py应用程序位于同一目录中:

from flask import Flask

import os
app = Flask(__name__)


@app.route("/")

def hello():
    html = "<h3>Test:{test}</h3>"
    test = os.environ['JAVA_HOME']

    return html.format(test = test)


if __name__ == '__main__':
    app.run(debug=True,host='0.0.0.0',port=81)
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

D:\MyApps\Docker Toolbox\Docker Toolbox\docker.exe: Error response from daemon: OCI runtime create failed: …
Run Code Online (Sandbox Code Playgroud)

python java python-3.x docker

12
推荐指数
4
解决办法
9216
查看次数

pip 无法为 scipy 构建轮子

我刚刚下载了新的python 3.8,我正在尝试scipy使用以下方法安装软件包:

pip3.8 install scipy
Run Code Online (Sandbox Code Playgroud)

但是构建失败并出现以下错误:

**Failed to build scipy**

**ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly**
Run Code Online (Sandbox Code Playgroud)

我该如何安装它pip?我尝试使用该--no-binary版本:

pip3.8 install --no-binary :all: scipy
Run Code Online (Sandbox Code Playgroud)

但最终出现了一个更可怕的错误:

**ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8p/01_5ykld02v61rtjl8k_8j200000gp/T/pip-install-wlnk_0jg/scipy/setup.py'"'"'; __file__='"'"'/private/var/folders/8p/01_5ykld02v61rtjl8k_8j200000gp/T/pip-install-wlnk_0jg/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/8p/01_5ykld02v61rtjl8k_8j200000gp/T/pip-record-01j_ddt8/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.**
Run Code Online (Sandbox Code Playgroud)

pip scipy pep python-3.8

3
推荐指数
1
解决办法
1万
查看次数