python - MACOS python package installation problem
问题描述
I'm trying to install "supplychainpy" package for python but i get a gcc error. "error: command 'gcc' failed with exit status 1"
- Yes, I have installed the xcode devtools
xcode-select --install
- Yes, I'm sure gcc is present
gcc --version
- Yes, my pip is up to date
pip install --upgrade pip
- Yes, I have gcc installed (with
brew install gcc
). - Yes i have anaconda package installed with all the dependancies.
This does not help. This is the output i get:
running build_ext
building 'supplychainpy.simulations.sim_summary' extension
creating build/temp.macosx-10.7-x86_64-3.7
creating build/temp.macosx-10.7-x86_64-3.7/supplychainpy
creating build/temp.macosx-10.7-x86_64-3.7/supplychainpy/simulations
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -I/anaconda3/include/python3.7m -c supplychainpy/simulations/sim_summary.c -o build/temp.macosx-10.7-x86_64-3.7/supplychainpy/simulations/sim_summary.o
supplychainpy/simulations/sim_summary.c:6785:34: warning: variable '__pyx_v_f' is uninitialized when used here [-Wuninitialized]
__pyx_t_1 = PyFloat_FromDouble(__pyx_v_f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
^~~~~~~~~
supplychainpy/simulations/sim_summary.c:6771:18: note: initialize the variable '__pyx_v_f' to silence this warning
float __pyx_v_f;
^
= 0.0
supplychainpy/simulations/sim_summary.c:8290:65: error: too many arguments to function call, expected 3, have 4
return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include/stddef.h:105:16: note: expanded from macro 'NULL'
# define NULL ((void*)0)
^~~~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
Failed building wheel for supplychainpy
Running setup.py clean for supplychainpy
Failed to build supplychainpy
Installing collected packages: supplychainpy
Running setup.py install for supplychainpy ... error
Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/m2/c5429khn3pj5581m817y69qc0000gn/T/pip-install-nrjs0muv/supplychainpy/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/m2/c5429khn3pj5581m817y69qc0000gn/T/pip-record-md9iewfc/install-record.txt --single-version-externally-managed --compile:
解决方案
问题可能是 gcc 编译器配置。您可以从https://pypi.org/project/supplychainpy/#files下载编译后的.whl
文件。请注意,文件适用于 macosx。*-macosx_10_6_x86_64.whl
推荐阅读
- javascript - 如何在迭代到下一个循环之前等待每个内部完成?
- node.js - 如何在 NodeJS 服务器上使用 mongoose 同步查询
- javascript - Importing JavaScript files in Typescript, unable to access functions in TS, able to access them in html
- dart - Flutter 返回首页
- c# - ASP.Net Core: keep windows authentication
- java - JVM G1 FinalReference 很多时间
- python - 检查多个字符串是否连续存在于另一个字符串中
- python - Pandas read_excel() 导入 xlrd 失败
- angular - 如何在Angular 6中将异步管道的结果分配给没有*ngIf的变量
- android - JSONArray 中的项目总和在活动重新启动时翻倍