在其他文件夹中安装Python熊猫

在其他文件夹中安装Python熊猫,python,pandas,Python,Pandas,我想在特定目标中安装Python库“Pandas”,因为我的应用程序使用他的Python解释器。 通常我会: pip install --target=path/to/folder/lib pandas Pandas很好地安装在lib文件夹中,但是当我添加我的库时,我有一个错误 import os,sys dir_path = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(dir_path, '

我想在特定目标中安装Python库“Pandas”,因为我的应用程序使用他的Python解释器。
通常我会:

pip install --target=path/to/folder/lib pandas
Pandas很好地安装在lib文件夹中,但是当我添加我的库时,我有一个错误

import os,sys
dir_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(dir_path, 'lib'))


ImportError: C extension: No module named 'pandas._libs.interval' not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first. 

尝试使用Venv或Virtualenv(如果您使用的是2.7版)


这将安装在管理员文件夹内的文件夹中(默认情况下)

您可以尝试使用pip进行安装,并查看pypi:


试试看它是否有效。

它不能解决我的问题。当我创建一个venv时,它只生成一个孤立的环境。但我不需要那个。我需要在一个特定的文件夹中安装pandas,当我将路径添加到我的文件夹中时,python“正常”将能够解析路径。我的错误是无法正确安装pipOk的pandas。它似乎已经下载了源代码并要求首先构建它,我就是这么做的:pip install--target=path/to/folder/lib。在“导入熊猫”之前,我更新sys.path以附加“lib”路径。错误总是存在的。谢谢@super byte,我发现了问题。我的皮普坏了。更新后,可以将这些软件包安装到您的管理文件夹中,并在需要时将其复制粘贴到项目目录中。