I'm trying to use the ReadIM package with an anaconda environment (anaconda 4.7.12, python 3.8, pip 19.3.1), thus requiring me to use pip install readIM
which succeeds, with the package found in conda list
and pip list
.
(我正在尝试在Anaconda环境(anaconda 4.7.12,python 3.8,pip 19.3.1)中使用ReadIM软件包,因此要求我使用成功的pip install readIM
,并在conda list
和pip list
找到该软件包。)
I have read a lot of posts talking about using the correct python and pip paths, my python where
shows only my anaconda path, where I ran conda install pip
beforehand, and then pip -V
shows my pip is in my conda path.
(我读过很多关于使用正确的python和pip路径的文章,我的python where
仅显示我的anaconda路径,我事先在其中运行conda install pip
,然后pip -V
显示我的pip在我的conda路径中。)
I have tried conda update --all
and pip uninstall readIM
.
(我尝试了conda update --all
和pip uninstall readIM
。)
python
then import readIM
, which still gave me the same import error. (我还阅读到Jupyter笔记本可能存在问题,因此在conda命令提示符下,我尝试了python
然后import readIM
,仍然给了我同样的导入错误。)
As advised on the source page, I tried installing by running python setup.py build install
/ python setup.py install
in the source directory, however this gave me an error
(根据源页面上的建议,我尝试通过在源目录中运行python setup.py build install
/ python setup.py install
,但这给了我一个错误)
cygwin TypeError: '>=' not supported between instances of 'NoneType' and 'str'
(cygwin TypeError:'NoneType'和'str'的实例之间不支持'> =')
I am at a loss, any ideas?
(我很茫然,有什么想法吗?)
Thanks, Mustafa.
(谢谢,穆斯塔法。)
UPDATE:
(更新:)
Managed to compile it from source successfully, but still get the same error:
(设法成功地从源代码编译了它,但仍然收到相同的错误:)
(base) C:>python -m pip install ReadIM-0.8.2.tar.gz Processing c:\readim-0.8.2.tar.gz Building wheels for collected packages: ReadIM Building wheel for ReadIM (setup.py) ... done Created wheel for ReadIM: filename=ReadIM-0.8.2-cp37-cp37m-win_amd64.whl size=219546 sha256=90f8960a6f1f80ae62dc18eab4bcd31fb2a6dfd7da364a5c15fc37e6e2ce0360 Stored in directory: C:\Users\mi4517\AppData\Local\pip\Cache\wheels\d6\a9\11\936e986255027bb654601b322a3431f9bcc3fde72ebb406835 Successfully built ReadIM Installing collected packages: ReadIM Successfully installed ReadIM-0.8.2
((基本)C:> python -m pip install ReadIM-0.8.2.tar.gz处理c:\ readim-0.8.2.tar.gz收集包的构建轮:ReadIM ReadIM构建轮(setup.py)。 ..完成为ReadIM创建了转盘:filename = ReadIM-0.8.2-cp37-cp37m-win_amd64.whl size = 219546 sha256 = 90f8960a6f1f80ae62dc18eab4bcd31fb2a6dfd7da364a5c15fc37e6e2ce0360存储在目录中:C:\ Apps \ ips \ pip d6 \ a9 \ 11 \ 936e986255027bb654601b322a3431f9bcc3fde72ebb406835成功构建ReadIM安装收集的软件包:ReadIM成功安装ReadIM-0.8.2)
(base) C:>python Python 3.7.5 (default, Oct 31 2019, 15:18:51) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information.
((基本)C:> python Python 3.7.5(默认,2019年10月31日,15:18:51)[MSC v.1916 64位(AMD64)] ::在Win32上的Anaconda,Inc.键入“ help”,“ copyright ”,“信用”或“许可证”以获取更多信息。)
import readIM Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'readIM'>
(导入readIM Traceback(最近一次调用):ModuleNotFoundError中的文件“”,第1行:没有名为“ readIM”的模块)
Following their instructions ( python setup.py build install
then python setup.py test
) yields a successful build but a failed test:
(按照他们的指示( python setup.py build install
然后python setup.py test
)产生成功的构建但失败的测试:)
C:\ReadIM-0.8.2>python setup.py test Traceback (most recent call last): File "setup.py", line 41, in assert os.path.isdir(testFileDir) AssertionError
(C:\ ReadIM-0.8.2> python setup.py测试回溯(最近一次调用为最新):文件“ setup.py”,第41行,在断言os.path.isdir(testFileDir)中出现AssertionError)
SOLUTION
(解)
It was installing correctly, just that I was importing it incorrectly in Python.
(它安装正确,只是我在Python中错误地导入了它 。)
I was doingimport readIM
or import readim
when it should be import ReadIM
I did not know it was case sensitive! (我是做import readIM
或import readim
当它应该是import ReadIM
我不知道它是区分大小写的!)
Thank you for your help, apologies for the trivial mistake on my part.
(感谢您的帮助,对于我的小失误深表歉意。)
ask by Mustafa Iqbal translate from so