I'm trying to import a github repository in my travis build. I do this by calling
install:
- pip install -r requirements.txt
in .travis.yml
. My requirements file looks like this:
git+ssh://git@github.com/my_account/repository_test.git@development
git+ssh://git@github.com/my_account/repository_test_ii.git@development
This seems to work, because both repositories are listed when I call pip freeze
. However, when I do:
import repository_test
import repository_test_ii
the second import fails. Both github repositories have a correct setup.py file, and I can install everything locally without any problem. I ran out of ideas of things to check.
I think the problem is probably with my github repository, I suspect probably the module is being imported under a slightly different name. How can I check this? What other things could I check?
问题是我在我的github存储库中缺少__init__.py文件,因此无法导入它。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.