简体   繁体   English

如何使用Anaconda安装自定义的本地Python包?

[英]How to install a custom, local Python Package with Anaconda?

I have Anaconda2 running smoothly on Eclipse's PyDev environment. 我让Anaconda2在Eclipse的PyDev环境中顺利运行。

I have received a custom package from a colleague in the form of a folder with a "library" sub-directory that contains many ".pyc" files (which I presume are the function files) and a " init .py" file. 我收到了一个同事的自定义包,其形式为一个文件夹,其中包含“library”子目录,其中包含许多“.pyc”文件(我认为是函数文件)和“ init .py”文件。 But no matter what I do, I cannot seem to install the folder as a package. 但无论我做什么,我似乎无法将文件夹作为包安装。

I have tried everything posted here in the Anaconda Prompt (which I'm assuming was the correct way of implementing the instructions) http://conda.pydata.org/docs/using/pkgs.html#install-non-conda-packages but nothing worked. 我已经尝试了Anaconda Prompt中发布的所有内容(我假设这是实现指令的正确方法) http://conda.pydata.org/docs/using/pkgs.html#install-non-conda-packages但没有任何效果。

I am very new to really working with Anaconda, Python, Eclipse, and PyDev (I have only written simple scripts with the default IDLE IDE in the past). 我非常擅长使用Anaconda,Python,Eclipse和PyDev(过去我只使用默认的IDLE IDE编写了简单的脚本)。

All I really want to be able to do is to use the package of functions given to me - even if they are not properly "installed", although that would be ideal. 我真正希望能够做的就是使用给我的功能包 - 即使它们没有正确“安装”,尽管这是理想的。 If anyone out there can help me with this I would be very grateful! 如果有人可以帮助我,我将非常感激!

Pyc are precompiled files, you dont need them. Pyc是预编译的文件,你不需要它们。 You should simply import package folder with 你应该简单地导入包文件夹

import folder-name

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM