首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在zlib中使用apt安装python3?或者我不能用它来做这个?

如何在zlib中使用apt安装python3?或者我不能用它来做这个?
EN

Ask Ubuntu用户
提问于 2019-10-11 16:05:37
回答 1查看 1.7K关注 0票数 0

我已经使用apt安装了python2和python3。

我试过用

代码语言:javascript
复制
$ virtualenv -p python3 testenv1

并获取

代码语言:javascript
复制
Running virtualenv with interpreter /usr/local/bin/python3
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 22, in 
    import zlib
ImportError: No module named 'zlib'

我已经搜索过了

代码语言:javascript
复制
$ sudo find / -name 'libz.*'
[sudo] password for x: 
find: ‘/run/user/1000/gvfs’: Permission denied
/snap/core/7917/lib/x86_64-linux-gnu/libz.so.1
/snap/core/7917/lib/x86_64-linux-gnu/libz.so.1.2.8
/snap/core/7713/lib/x86_64-linux-gnu/libz.so.1
/snap/core/7713/lib/x86_64-linux-gnu/libz.so.1.2.8
/snap/core18/1144/lib/x86_64-linux-gnu/libz.so.1
/snap/core18/1144/lib/x86_64-linux-gnu/libz.so.1.2.11
/snap/core18/1192/lib/x86_64-linux-gnu/libz.so.1
/snap/core18/1192/lib/x86_64-linux-gnu/libz.so.1.2.11
/usr/lib/x86_64-linux-gnu/libz.so
/usr/lib/x86_64-linux-gnu/libz.a
/lib/x86_64-linux-gnu/libz.so.1.2.11
/lib/x86_64-linux-gnu/libz.so.1

有什么方法可以使用apt来用zlib安装python3呢?

如果没有,请你指点我清楚说明如何进行?

谢谢!

EN

回答 1

Ask Ubuntu用户

发布于 2019-10-11 16:25:13

步骤1:使用apt的搜索功能

代码语言:javascript
复制
$ apt search python3 zlib

Sorting... Done
Full Text Search... Done
python3-netcdf4/disco 1.4.2-1build1 amd64
  Python 3 interface to the netCDF4 (network Common Data Form) library

第二步:使用apt的显示功能来确定它是否是您真正想要的包。

代码语言:javascript
复制
$ apt show python3-netcdf4

Package: python3-netcdf4
Version: 1.4.2-1build1
Priority: optional
Section: universe/python
Source: netcdf4-python
Origin: Ubuntu
Maintainer: Ubuntu Developers 
Original-Maintainer: Debian GIS Project 
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 1,599 kB
Depends: python3 (<< 3.8), python3 (>= 3.7~), python3-cftime, python3-numpy (>= 1:1.14.3), python3-numpy-abi9, python3:any, libc6 (>= 2.14), libhdf5-103, libnetcdf13 (>= 1:4.4.0)
Homepage: http://unidata.github.io/netcdf4-python/
Download-Size: 476 kB
APT-Sources: http://us.archive.ubuntu.com/ubuntu disco/universe amd64 Packages
Description: Python 3 interface to the netCDF4 (network Common Data Form) library
 NetCDF version 4 has many features not found in earlier versions of the
 library and is implemented on top of HDF5. This module can read and write
 files in both the new netCDF 4 and the old netCDF 3 format, and can create
 files that are readable by HDF5 clients. The API is modelled after
 Scientific.IO.NetCDF, and should be familiar to users of that module.
 .
 Most new features of netCDF 4 are implemented, such as multiple unlimited
 dimensions, groups and zlib data compression. All the new numeric data types
 (such as 64 bit and unsigned integer types) are implemented. Compound and
 variable length (vlen) data types are supported, but the enum and opaque data
 types are not. Mixtures of compound and vlen data types (compound types
 containing vlens, and vlens containing compound types) are not supported.
 .
 This package contains the netCDF 4 module for Python 3.

如果没有一个apt包提供您想要的,那么就开始查看pip包。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1180338

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档