English 中文(简体)
采用不同的LBDIR途径来铺设含水层
原标题:Having a different LIBDIR path for Python in Linux

我愿改变第2条第2款在含水层下的道路,把模块/图书馆装上。 我试图从没收档案中改写。 在此之前:

BINLIBDEST=     $(LIBDIR)/python$(VERSION)
LIBDEST=        $(SCRIPTDIR)/python$(VERSION)
INCLUDEPY=      $(INCLUDEDIR)/python$(VERSION)
CONFINCLUDEPY=  $(CONFINCLUDEDIR)/python$(VERSION)
LIBP=           $(LIBDIR)/python$(VERSION)

我试图将其改为:

BINLIBDEST=     $(LIBDIR)
LIBDEST=        $(SCRIPTDIR)
INCLUDEPY=      $(INCLUDEDIR)
CONFINCLUDEPY=  $(CONFINCLUDEDIR)
LIBP=           $(LIBDIR)

主要从路名中删除Python%(VERSION),以便它不使用lib/python<27>/em>,而只是将其模块从lib上装。 但是,即使启动<>小规模><>和 > 安装<>/strong>与改动有关,pythonpython27。 粉碎本文档没有从新道路上装载单元。 这与这一产出相对应:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
 import site  failed; use -v for traceback

Is there a way on forcing the Python binary itself (if must) to load up the modules from a new path set by me, instead of the default one as "$(LIBDIR)/python$(VERSION)"?

问题回答

你不得不对平流源和 re变作几处改动,但我会认为这是一种oka,因为这样做是完全不符合标准的事情。

查阅文件<代码> 模块/植被。 案卷一开始的评论中详细介绍了确定校准员的步骤。 可查阅。 我认为,你想研究如何使用这一定义:

#define PYTHONPATH PREFIX "/lib/python" VERSION ":" 
          EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"

我并不认为,将它简单地改为<条码>是容易的。 附录FIX“/lib/:”[...],但将照此办理。

我要感谢地毯:我得以在运行时间铺设探照灯:从lib/改为lib64/。 而在X86_64-my_distro-gnu-linux的建筑中, 更改 模块/植被。

For the record, I tried --libdir at configure time (works for the shared library but not for python modules install paths), modifying Makefile, modifying pyconfig.h, tweaking $PYTHONPATH, $PYTHONHOME, nothing worked.

只是细节,但安装设备并不能正确存放图书馆,因此,你不得不做一点小笔——耳聋和 yourself。

THANK YOU CARLPETT!!!





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...