我用pytest编写了测试,并使用pytest命令运行它们。我看了看其他的pytest模块,然后遇到了pytest-runner。这到底是干什么用的?
模块的描述如下,请解释..。
Setup scripts can use pytest-runner to add setup.py test support for pytest runner.
我在Windows10 (conda版本4.3.8)中运行Anaconda安装
这是我试图在python命令行中运行的代码:
import matplotlib.pyplot as plt
x = [1,2,3,4]
y = [5,6,7,8]
plt.figure(1)
plt.plot(x,y)
最后一行抛出以下错误:
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\font_manager.py:971: MatplotlibDeprecationWarning: The is_string_like function was
也许其他人也问了同样的问题。但这个问题很难回答。我什么都试过了。我陷入困境的地方是安装依赖关系。有些依赖项是旧的,不易获得。但我成功地安装了它们。
问题就在这里。有些依赖项需要从源代码中获取构建。我已经安装了Visual C++ Build和MSMPI。还为H5PY安装了H5PY,但它不允许我构建H5PY的旧版本。所以,我试着安装H5PY的最新版本,但仍然遇到了文件找不到之类的错误。构建过程找不到的一些文件是"h5py/h5f.pyx“、"mpi_c”、"mpi.h“。解决一个文件丢失的错误会导致另一个文件丢失,等等。
在努力解决这样的错误并安装一个或另一个软件包来完成
在尝试解决包依赖问题时,我使用conda卸载了openssl,因为它似乎是无法满足规范的包之一。然而,一旦我这样做了,conda、iPython和pip就会出现错误消息
ERROR:root:code for hash md5 was not found
我尝试使用自制软件包管理器重新安装openssl,但brew install openssl通知我openssl已经安装。
我试图通过pip安装MechanicalSoup包,但得到了以下错误:
Download error on https://pypi.org/simple/pytest-runner/: [SSL:
TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version
(_ssl.c:645) --
Some packages may not be found!
Couldn't find index page for 'pytest-runner' (mayb
我按照在Ubuntu18.04 LTS上用Python3.8 3.8开发上的说明下载python3.8。
在终端机运行python3.8很好。
问题是,当我试图制作一个在conda上使用python3.8的频道时,它就找不到了。也就是说,跑
conda create --name py38 python=3.8
返回:
PackagesNotFoundError: The following packages are not available from current channels:
Current channels:
- https://repo.anaconda.com/pk
我正在尝试通过在我的终端上执行pip install disptools来安装disptools包。disptools包在这里链接到https://github.com/m-pilia/disptools。它在安装过程中显示了一条很长的错误消息,主要错误显示在下面。 Building wheel for disptools (setup.py) ... error
ERROR: Command errored out with exit status 1:
...
CMake Error:
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS
我需要在Linux机器上安装LibXML,并且像其他帖子一样有下一个错误:
Can't locate XML/LibXML.pm in @INC
我看到了解决方案,但我遇到的问题是,当尝试使用cpan生成库时,显示找不到编译器的错误。我正在寻找我的问题的答案,我找到了安装的方法,使用apt-get或mcpan,但不能获得apt-get或aptitude命令,我只能使用ipkg安装perl_libXML或cpan。
cpan的错误如下:
perl -MCPAN -e shell
Terminal does not support AddHistory.
cpan shell -- C
我需要在Python中提取pdf注释。我所有的搜索都表明我需要Poppler来做这件事,比如运行
但是我在安装Poppler时遇到了很多问题。我在OS X (Yosemite)上使用Python 3.4。这是我到目前为止尝试过的:
pip
pip3 install python-poppler-qt4
这给了我们
ImportError: No module named 'sipdistutils'
接下来我尝试了
pip3 install pypoppler
并得到了
NameError: name 'file' is not defined
接下来,我尝试从
我试图使用Python中的matplotlib打开JPG映像。编者'Spyder',Python3.6,WIndows 7
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
# Read in the image and print some stats
image = mpimg.imread(r'C:\Users\xxx\Python Code\mountain.jpg')
print('This image is: ',t
我无法使用源代码发行版安装,所以我试图使用来安装。由于我使用的是Python的Ananconda发行版,所以我键入:
conda install -c https://conda.binstar.org/jacksongs pdfminer
但是,得到以下错误:
Fetching package metadata: ...
Error: No packages found in current win-32 channels matching: pdfminer
You can search for this package on Binstar with
binstar search -t
我是一名windows10用户,这是目前我的python版本。
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
当我尝试用pip安装tensorflow时,弹出
tensorflow_gpu-0.12.1-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.
我在互联网上看到,tensorflow现在只能在python 3.5.2上运行。是真的吗?如果不是,那么我如何绕过这个错误?
无需安装Anaconda,一切工作正常。也就是说,我能够导入上面提到的包。但是在安装Anaconda之后,我无法导入相同的包。下面是我得到的错误:-
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py", line 199, in <module>
from .