Repository navigation
[Caffe2] Fixing missing PyCObject_Type bug - #8467
Merged
Merged
Conversation
Contributor
Author
|
@pytorchbot retest this please |
Contributor
Author
orionr
approved these changes
Jun 14, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also includes the changes in #8434 because they both affect cmake/Dependencies.cmake
The changes to scripts/build_anaconda.sh were just to make it more consistent with other build scripts and unrelated to the bug.
The addition of python 3.5 and 3.6 to find_python and the addition of setuptools to the meta.yaml together seem to fix the problem. Without having python 3.5 and 3.6 as additional python versions, the find_python code sometimes picks up different python installations for the libraries and the executable.
With anaconda3, new environments come completely empty, even without python or setuptools. They will default to the first python version of the first package you install into them. When installing Caffe2 into such brand new environments, using distutils or setuptools will actually use the setuptools present in the root conda environment (since the new conda envs don't come with them), and so the sysconfig.get_python_lib() will actually be for root conda env instead of the activated env. This may not actually affect clean brand new conda caffe2 packages if they are all installed into neat conad envs, but it can cause strange behavior and be really annoying to debug if you don't expect it.