作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我尝试使用 !pip install 安装它
!pip install pyvttbl
它给了我这条信息
Requirement already satisfied: pyvttbl
Requirement already satisfied: dictset
Requirement already satisfied: pystaggrelite3
但是,当我将其导入为
import pyvttbl as pt
它给了我
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-7-89ef5f67d382> in <module>()
----> 1 import pyvttbl as pt
D:\Anaconda3\lib\site-packages\pyvttbl\__init__.py in <module>()
8 # This software is funded in part by NIH Grant P20 RR016454.
9
---> 10 from base import PyvtTbl, DataFrame
11
12 from misc import *
ModuleNotFoundError: No module named 'base'
当我尝试将 base 安装为
!pip install base
它给了我这个
Collecting base
Using cached base-1.0.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\User\AppData\Local\Temp\pip-build-u1xkw0lp\base\setup.py", line 40, in <module>
LONG_DESCRIPTION = read("README.rst")
File "C:\Users\User\AppData\Local\Temp\pip-build-u1xkw0lp\base\setup.py", line 21, in read
return codecs.open(os.path.join(os.path.dirname(__file__), fname)).read()
File "D:\Anaconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5: character maps to <undefined>
谁能帮我理解这个问题?
最佳答案
Pyvttbl 不再积极维护,这就是您遇到一些困难的原因。
我假设您使用的是 python 3.x,在我看来 pyvttbl 现在只适用于 python 2.7。
我设法让它在我的 python 2.7 环境中工作。但是我无法在新环境中重现有效安装。所以我将我的 py27 env 导出为 .yml
文件,您可以通过这些步骤克隆该文件;
1) 从this gist 下载并解压.yml
env
2) cd 到解压缩的.yml
文件的位置。
3) 使用以下命令创建我的 py27 环境的克隆;
conda env create -f py27.yml
4) conda 完成安装后激活环境;
activate py27
5) 然后这个 env 到你的 jupyter notebook 内核列表中;
ipython kernel install --name py27
现在,当您启动 jupyter notebook 时,您可以选择在单击新建按钮时创建一个 py27
notebook。之后您应该能够运行 pyttbl。
如果您仍有问题,请在下方评论。
关于python-3.x - Python-如何在 jupyter notebook 中安装 pyvttbl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45816541/
我是一名优秀的程序员,十分优秀!