python streamlit离线安装
python streamlit离线安装 怎么安装啊? pip install streamlit-0.71.0-py2.py3-none-any.whl 提示缺少很多库
安装numpy失败
Running from numpy source directory.
Note: if you need reliable uninstall behavior, then install
with pip instead of using setup.py install
:
pip install .
(from a git repo or downloaded sourcerelease)
pip install numpy
(last NumPy release on PyPi)
Cythonizing sources
numpy/random/_bounded_integers.pxd.in has not changed
numpy/random/_sfc64.pyx has not changed
numpy/random/_bounded_integers.pyx.in has not changed
numpy/random/_bounded_integers.pyx has not changed
numpy/random/mtrand.pyx has not changed
numpy/random/_common.pyx has not changed
numpy/random/_mt19937.pyx has not changed
numpy/random/_generator.pyx has not changed
numpy/random/_philox.pyx has not changed
numpy/random/bit_generator.pyx has not changed
numpy/random/_pcg64.pyx has not changed
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
FOUND:
libraries = ['mkl_rt', 'pthread']library_dirs = ['/root/anaconda3/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include', '/root/anaconda3/include']
FOUND:
libraries = ['mkl_rt', 'pthread']library_dirs = ['/root/anaconda3/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include', '/root/anaconda3/include']
non-existing path in 'numpy/distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
FOUND:
libraries = ['mkl_rt', 'pthread']library_dirs = ['/root/anaconda3/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include', '/root/anaconda3/include']
FOUND:
libraries = ['mkl_rt', 'pthread']library_dirs = ['/root/anaconda3/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include', '/root/anaconda3/include']
/root/anaconda3/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running install
running bdist_egg
running egg_info
running build_src
build_src
building py_modules sources
building library "npymath" sources
adding 'build/src.linux-x86_64-3.8/numpy/core/src/npymath' to include_dirs.
None - nothing done with h_files = ['build/src.linux-x86_64-3.8/numpy/core/src/npymath/npy_math_internal.h']
building library "npyrandom" sources
building extension "numpy.core._multiarray_tests" sources
building extension "numpy.core._multiarray_umath" sources
adding 'build/src.linux-x86_64-3.8/numpy/core/src/common' to include_dirs.
adding 'build/src.linux-x86_64-3.8/numpy/core/src/umath' to include_dirs.
numpy.core - nothing done with h_files = ['build/src.linux-x86_64-3.8/numpy/core/src/common/npy_sort.h', 'build/src.linux-x86_64-3.8/numpy/core/src/common/npy_partition.h', 'build/src.linux-x86_64-3.8/numpy/core/src/common/npy_binsearch.h', 'build/src.linux-x86_64-3.8/numpy/core/src/umath/funcs.inc', 'build/src.linux-x86_64-3.8/numpy/core/src/umath/simd.inc', 'build/src.linux-x86_64-3.8/numpy/core/src/umath/loops.h', 'build/src.linux-x86_64-3.8/numpy/core/src/umath/matmul.h', 'build/src.linux-x86_64-3.8/numpy/core/src/umath/clip.h', 'build/src.linux-x86_64-3.8/numpy/core/src/common/templ_common.h', 'build/src.linux-x86_64-3.8/numpy/core/include/numpy/config.h', 'build/src.linux-x86_64-3.8/numpy/core/include/numpy/_numpyconfig.h', 'build/src.linux-x86_64-3.8/numpy/core/include/numpy/__multiarray_api.h', 'build/src.linux-x86_64-3.8/numpy/core/include/numpy/__ufunc_api.h']
building extension "numpy.core._umath_tests" sources
building extension "numpy.core._rational_tests" sources
building extension "numpy.core._struct_ufunc_tests" sources
building extension "numpy.core._operand_flag_tests" sources
building extension "numpy.core._simd" sources
adding 'build/src.linux-x86_64-3.8/numpy/core/src/_simd' to include_dirs.
numpy.core - nothing done with h_files = ['build/src.linux-x86_64-3.8/numpy/core/src/_simd/_simd_inc.h', 'build/src.linux-x86_64-3.8/numpy/core/src/_simd/_simd_data.inc']
building extension "numpy.fft._pocketfft_internal" sources
building extension "numpy.linalg.lapack_lite" sources
building extension "numpy.linalg._umath_linalg" sources
building extension "numpy.random._mt19937" sources
building extension "numpy.random._philox" sources
building extension "numpy.random._pcg64" sources
building extension "numpy.random._sfc64" sources
building extension "numpy.random._common" sources
building extension "numpy.random.bit_generator" sources
building extension "numpy.random._generator" sources
building extension "numpy.random._bounded_integers" sources
building extension "numpy.random.mtrand" sources
building data_files sources
build_src: building npy-pkg config files
writing numpy.egg-info/PKG-INFO
writing dependency_links to numpy.egg-info/dependency_links.txt
writing entry points to numpy.egg-info/entry_points.txt
writing top-level names to numpy.egg-info/top_level.txt
reading manifest file 'numpy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'doc/build'
no previously-included directories found matching 'doc/source/generated'
no previously-included directories found matching 'benchmarks/env'
no previously-included directories found matching 'benchmarks/results'
no previously-included directories found matching 'benchmarks/html'
no previously-included directories found matching 'benchmarks/numpy'
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.swp' found anywhere in distribution
warning: no previously-included files matching '*.bak' found anywhere in distribution
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files found matching 'LICENSES_bundled.txt'
writing manifest file 'numpy.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running build_clib
customize UnixCCompiler
customize UnixCCompiler using new_build_clib
CCompilerOpt.__init__[758] : load cache from file -> /home/python1/numpy-1.20.1/build/temp.linux-x86_64-3.8/ccompiler_opt_cache_clib.py
CCompilerOpt.__init__[769] : hit the file cache
running install_lib
running build_py
copying numpy/version.py -> build/lib.linux-x86_64-3.8/numpy
copying build/src.linux-x86_64-3.8/numpy/__config__.py -> build/lib.linux-x86_64-3.8/numpy
copying build/src.linux-x86_64-3.8/numpy/distutils/__config__.py -> build/lib.linux-x86_64-3.8/numpy/distutils
running build_ext
customize UnixCCompiler
customize UnixCCompiler using new_build_ext
CCompilerOpt.__init__[758] : load cache from file -> /home/python1/numpy-1.20.1/build/temp.linux-x86_64-3.8/ccompiler_opt_cache_ext.py
CCompilerOpt.__init__[769] : hit the file cache
building 'numpy.core._multiarray_umath' extension
compiling C dispatch-able sources
CCompilerOpt.parse_targets[1741] : looking for '@targets' inside -> build/src.linux-x86_64-3.8/numpy/core/src/umath/loops_unary_fp.dispatch.c
CCompilerOpt._parse_target_tokens[1910] : skip targets (VSX2 NEON) not part of baseline or dispatch-able features
CCompilerOpt._parse_policy_not_keepbase[2022] : skip baseline features (SSE2)
CCompilerOpt._parse_target_tokens[1934] : policy 'MAXOPT' is ON
C compiler: gcc -pthread -B /root/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DSCIPY_MKL_H -DHAVE_CBLAS -I/usr/local/include -I/usr/include -I/root/anaconda3/include -Ibuild/src.linux-x86_64-3.8/numpy/core/src/common -Ibuild/src.linux-x86_64-3.8/numpy/core/src/umath -Inumpy/core/include -Ibuild/src.linux-x86_64-3.8/numpy/core/include/numpy -Ibuild/src.linux-x86_64-3.8/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/root/anaconda3/include/python3.8 -Ibuild/src.linux-x86_64-3.8/numpy/core/src/common -Ibuild/src.linux-x86_64-3.8/numpy/core/src/npymath -c'
extra options: '-std=c99 -O3 -msse -msse2 -msse3'
compiling C sources
C compiler: gcc -pthread -B /root/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DSCIPY_MKL_H -DHAVE_CBLAS -I/usr/local/include -I/usr/include -I/root/anaconda3/include -Ibuild/src.linux-x86_64-3.8/numpy/core/src/common -Ibuild/src.linux-x86_64-3.8/numpy/core/src/umath -Inumpy/core/include -Ibuild/src.linux-x86_64-3.8/numpy/core/include/numpy -Ibuild/src.linux-x86_64-3.8/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/root/anaconda3/include/python3.8 -Ibuild/src.linux-x86_64-3.8/numpy/core/src/common -Ibuild/src.linux-x86_64-3.8/numpy/core/src/npymath -c'
extra options: '-std=c99 -msse -msse2 -msse3'
gcc: build/src.linux-x86_64-3.8/numpy/core/src/multiarray/einsum.c
numpy/core/src/multiarray/einsum.c.src: 在函数‘get_combined_dims_view’中:
numpy/core/src/multiarray/einsum.c.src:406: 错误:#pragma GCC diagnostic 不允许用在函数体中
numpy/core/src/multiarray/einsum.c.src:407: 错误:#pragma GCC diagnostic 不允许用在函数体中
numpy/core/src/multiarray/einsum.c.src:408: 错误:#pragma GCC diagnostic 不允许用在函数体中
numpy/core/src/multiarray/einsum.c.src:423: 错误:#pragma GCC diagnostic 不允许用在函数体中
error: Command "gcc -pthread -B /root/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DSCIPY_MKL_H -DHAVE_CBLAS -I/usr/local/include -I/usr/include -I/root/anaconda3/include -Ibuild/src.linux-x86_64-3.8/numpy/core/src/common -Ibuild/src.linux-x86_64-3.8/numpy/core/src/umath -Inumpy/core/include -Ibuild/src.linux-x86_64-3.8/numpy/core/include/numpy -Ibuild/src.linux-x86_64-3.8/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/root/anaconda3/include/python3.8 -Ibuild/src.linux-x86_64-3.8/numpy/core/src/common -Ibuild/src.linux-x86_64-3.8/numpy/core/src/npymath -c build/src.linux-x86_64-3.8/numpy/core/src/multiarray/einsum.c -o build/temp.linux-x86_64-3.8/build/src.linux-x86_64-3.8/numpy/core/src/multiarray/einsum.o -MMD -MF build/temp.linux-x86_64-3.8/build/src.linux-x86_64-3.8/numpy/core/src/multiarray/einsum.o.d -std=c99 -msse -msse2 -msse3" failed with exit status 1
EXT COMPILER OPTIMIZATION
Platform :
Architecture: x64
Compiler : gcc
CPU baseline :
Requested : 'min'
Enabled : SSE SSE2 SSE3
Flags : -msse -msse2 -msse3
Extra checks: none
CPU dispatch :
Requested : 'max -xop -fma4'
Enabled : SSSE3 SSE41 POPCNT SSE42 AVX F16C
Generated : none
CCompilerOpt._cache_write[796] : write cache to path -> /home/python1/numpy-1.20.1/build/temp.linux-x86_64-3.8/ccompiler_opt_cache_ext.py
CLIB COMPILER OPTIMIZATION
Platform :
Architecture: x64
Compiler : gcc
CPU baseline :
Requested : 'min'
Enabled : SSE SSE2 SSE3
Flags : -msse -msse2 -msse3
Extra checks: none
CPU dispatch :
Requested : 'max -xop -fma4'
Enabled : SSSE3 SSE41 POPCNT SSE42 AVX F16C
Generated : none
CCompilerOpt._cache_write[796] : write cache to path -> /home/python1/numpy-1.20.1/build/temp.linux-x86_64-3.8/ccompiler_opt_cache_clib.py
[root@localhost numpy-1.20.1]#
回答:
可以找一个联网且有python的电脑,新建一个py文件写入以下内容
# encoding:utf-8# -*- coding: UTF-8 -*-
# Author:PC-Jruing
# FileName:testone
# DateTime:2021/7/23 18:54
# SoftWare: PyCharm
import os, sys
requires_set = []
def Dependent_query(pkg_name):
Output = os.popen(f"pip show {pkg_name}")
Requires = Output.readlines()
for line in Requires:
if "Requires:" in line:
requires_list = line.strip().split(':')[1].split(',')
requires_list = [i for i in requires_list if i]
if requires_list:
for requires in requires_list:
if requires:
requires_set.append(requires.strip())
Dependent_query(requires.strip())
def download(requires_set):
if isinstance(requires_set, list) and requires_set:
for pkg in requires_set:
print(f"==========开始下载{pkg}==========")
pkg_Output = os.system(f"pip download {pkg}")
print(pkg_Output)
if __name__ == '__main__':
pkg_name = sys.argv[1]
requires_set.append(pkg_name)
# 查询依赖包
Dependent_query(pkg_name)
print(f"安装顺序参考:{requires_set[::-1]}")
# 启用下载依赖包功能
# download(requires_set)
cmd中执行python testone.py 包的名称
以上是 python streamlit离线安装 的全部内容, 来源链接: utcz.com/p/938383.html