我的项目有这个 setup.py 文件,我正在使用 Python3.7 运行 Anaconda3:
from setuptools import setup, find_packages
from setuptools.command.install import install as InstallCommand
def parse_requirements(requirements):
with open(requirements) as f:
return [l.strip('\n') for l in f if l.strip('\n') and not l.startswith('#')]
class Install(InstallCommand):
""" Customized setuptools install command which uses pip. """
def run(self, *args, **kwargs):
from pip._internal import main as _main
_main(['install', '.'])
InstallCommand.run(self, *args, **kwargs)
setup(
name="NGF",
author="Ties van Rozendaal",
author_email="git@tivaro.nl",
maintainer="Thomas Evangelidis",
maintainer_email="tevang3@gmail.com",
description="\n*** An implementation of Convolutional Networks on Graphs for Learning Molecular …Run Code Online (Sandbox Code Playgroud) 我创建了一个 3D Pandas 数据框,如下所示:
A= ['ECFP', 'ECFP', 'ECFP', 'FCFP', 'FCFP', 'FCFP', 'RDK5', 'RDK5', 'RDK5']
B = ['R', 'tau', 'RMSEc', 'R', 'tau', 'RMSEc', 'R', 'tau', 'RMSEc']
C = array([[ 0.1 , 0.3 , 0.5 , nan, 0.6 , 0.4 ],
[ 0.4 , 0.3 , 0.3 , nan, 0.4 , 0.3 ],
[ 1.2 , 1.3 , 1.1 , nan, 1.5 , 1. ],
[ 0.4 , 0.3 , 0.4 , 0.8 , 0.1 , 0.2 ],
[ 0.2 , 0.3 …Run Code Online (Sandbox Code Playgroud) 这是我的问题:
fpaths=os.listdir(ligand_names_list[0].replace("'", "\\'"))
OSError: [Errno 2] No such file or directory: "5-iodoindirubin-3\\'-oxime"
Run Code Online (Sandbox Code Playgroud)
有一个名为5-iodoindirubin-3'-oxime但我无法os.listdir()找到它的文件.这是我用这个线程启发的另一个尝试添加反斜杠而不转义[Python]:
fpaths=os.listdir(ligand_names_list[0].__ repr __())
OSError: [Errno 2] No such file or directory: '"5-iodoindirubin-3\'-oxime"'
Run Code Online (Sandbox Code Playgroud)
在这种情况下的问题是领先的单引号,我不知道如何删除它们.任何的想法?