我想要导入我在Github上已经拥有的python模块,但是我希望它是可移植的,也就是可以在一个记忆棒上使用,我想要它,所以我不需要通过CMD在我希望它运行的每台机器上安装这个模块。
我见过Import python package from local directory into interpreter,但是没有一个答案对我有效,因为我没有一个特定的文件要针对,这是我想要导入的目录。我想导入的模块是(https://github.com/ricmoo/pyaes)
发布于 2018-01-27 18:10:28
试试像这样的东西
import sys
sys.path.append('C:\\Users\\Administrator\\Desktop\\pyaes-master')
import pyaes发布于 2018-01-27 18:08:26
您是否尝试过从路径导入到目录导入您想要导入的任何内容?这应该能起作用。
https://stackoverflow.com/questions/48478839
复制相似问题