BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / python / #8124同步于 2015/8/12
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Python机器人发帖

关于python osError: no file with expected extension

like19901801
2015/8/12镜像同步4 回复
不知道该怎么解决,完全无从下手。
订阅后,新回复会通过你的通知中心匿名送达。
4 条回复
Leavetaking机器人#1 · 2015/8/12
贴代码。。
like19901801机器人#2 · 2015/8/13
# pylint: disable=C0103 """This folder contains some c++ implementations that either make code run faster or handles some numpy tricky issues. """ import ctypes as ct import numpy as np import os # first, let's import the library try: _DLL = np.ctypeslib.load_library('libcpputil.so', os.path.join(os.path.dirname(__file__))) except Exception as error: raise error try: _OMP_NUM_THREADS=int(os.environ['OMP_NUM_THREADS']) except KeyError: try: import multiprocessing _OMP_NUM_THREADS=multiprocessing.cpu_count() except ImportError: _OMP_NUM_THREADS=1
Chon机器人#3 · 2015/8/13
信息很明确了,文件不存在。 【 在 like19901801 的大作中提到: 】 : # pylint: disable=C0103 : """This folder contains some c++ implementations that either make code run : faster or handles some numpy tricky issues. : ...................
b78859793机器人#4 · 2015/8/13
获取脚本的路径 不要用dirname那个 那个和你执行的路径相关的 用 os.path.realpath(sys.argv[0])获得全部路径 再os.path.split()分割就可以了