简体   繁体   English

手动安装python包但无法导入

[英]Manually installed python package but cannot import

I tried to install the keras_contrib package in a virtual machine which does not allow internet access.我试图在不允许互联网访问的虚拟机中安装 keras_contrib 包。 So I manually unzip the package, navigate to folder and using python setup.py install to install it.所以我手动解压缩包,导航到文件夹并使用python setup.py install安装它。 After that I can find the package using pip list , however when I import the package cannot be found.之后我可以使用pip list找到包,但是当我导入包时找不到。 And I cannot find the package folder in the anaconda/lib/site-packages .而且我在anaconda/lib/site-packages 中找不到包文件夹。 (link of the package: https://github.com/keras-team/keras-contrib ) (包的链接: https : //github.com/keras-team/keras-contrib

These are the screenshots at the beginning and ending during installation.这些是安装过程中开头和结尾的屏幕截图。 在此处输入图片说明

在此处输入图片说明

Any suggestion?有什么建议吗? Thanks very much.非常感谢。

You should look at your $PYTHONPATH environment variables.您应该查看您的 $PYTHONPATH 环境变量。 If you are using Mac or Linux, write which python command on your terminal.如果您使用的是 Mac 或 Linux,请在终端上写下which python命令。 Also, you can look at the link below for a setup that is similar to your problem https://github.com/sparklingpandas/sparklingpandas/wiki/setup.py-Install-for-Anaconda-Python此外,您可以查看下面的链接,了解与您的问题类似的设置https://github.com/sparklingpandas/sparklingpandas/wiki/setup.py-Install-for-Anaconda-Python

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

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