我使用的是 linux 服务器,但我没有安装包的权限pip
,所以我下载了我需要的包:tsfresh
从https://github.com/blue-yonder/tsfresh,然后使用ftp
上传解压的文件夹我下载到Linux服务器,但我该怎么做import tsfresh
??
我把下载文件夹放在路径中/upload/tsfresh
,我的python工作目录在/upload/
.
以下是我的文件夹的子文件夹 upload
./tsfresh
./tsfresh/.github
./tsfresh/binder
./tsfresh/docs
./tsfresh/notebooks
./tsfresh/tests
./tsfresh/tsfresh
./tsfresh/docs/api
./tsfresh/docs/images
./tsfresh/docs/text
./tsfresh/docs/_static
./tsfresh/docs/_templates
./tsfresh/tests/integrations
./tsfresh/tests/units
./tsfresh/tests/integrations/examples
./tsfresh/tests/units/feature_extraction
./tsfresh/tests/units/feature_selection
./tsfresh/tests/units/scripts
./tsfresh/tests/units/transformers
./tsfresh/tests/units/utilities
./tsfresh/tsfresh/convenience
./tsfresh/tsfresh/examples
./tsfresh/tsfresh/feature_extraction
./tsfresh/tsfresh/feature_selection
./tsfresh/tsfresh/scripts
./tsfresh/tsfresh/transformers
./tsfresh/tsfresh/utilities
我的问题是:如何将其tsfresh
作为普通包导入。
它在您的项目文件夹中,对吗?然后
import tsfresh
如果它有一个init.py使其成为模块,它将起作用。
如果它不在该文件夹中,请将其附加到 sys.path
或者让您的管理员安装它。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句