-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Developer instructions are no longer valid #3327
Comments
There are at least two developer workflows that come to mind (not to mention the anticipated Bambo-CI release/deployment workflow)
The ">=" solution proposed in PR #3325 would introduce subtle incompatibilities for the nupic-only developer workflow by pulling in newer builds of nupic.bindings from PyPi that are incompatible with nupic master that they cloned. The premise of the new bamboo-ci-based workflow is that we would make more frequent nupic.bindings deployments to PyPi, including pre-releases, and update nupic's nupic.bindings dependency as needed. My initial idea (TLDR that didn't pan out) for a solution was based on the wheel maintainers' recommendations in https://bitbucket.org/pypa/wheel/issues/172/wheel-doesnt-support-environment-markers as well as discussions in https://packaging.python.org/requirements/ and https://caremad.io/2013/07/setup-vs-requirement/, involving the separation of requirements into abstract/loosely-versioned dependencies in Considering the two workflows described at the top of this comment, I am going to propose that we go with a simple workflow that doesn't involve any code changes, just documentation of the workflow:
|
Here is a more complete list of workflows that were discussed offline:
|
Considering the updated workflows described in my preceding comment, and in the interest of time, we decided to forego PR #3325 for the time being, and solve the problem by updating the developer workflow documentation. As we flesh out our formal bamboo-based build and release process, we may still revisit the concepts in PR #3325. The developer worflow documentation changes would consist of: The nupic.core/nupic.bindings developer who also needs to install nupic for modification and/or take advantage of nupic's various tests, would need to
|
I also posted a question about this on the wheel-builders list here: https://mail.python.org/pipermail/wheel-builders/2016-September/000220.html. And my original question in the python wheel bitbucket issue is here: https://bitbucket.org/pypa/wheel/issues/172/wheel-doesnt-support-environment-markers#comment-30414396 |
The original issue that was filed in nupic.core numenta/nupic.core-legacy#1069 asks to update the developer-installation documentation in nupic.core. Upon re-read of that documentation, I find no fault with it, since it focuses primarily on the standalone builds of
I am updating the |
@vitaly-krugl Sounds good Vitaly, thanks. |
I updated the https://github.com/numenta/nupic/wiki/Installing-and-Building-NuPIC#compiling section under "Installation from Source Code". Please review. |
Here is the diff. Looks okay to me. However, does it address this concern that @oxtopus brought up in the original issue he filed?
|
@rhyolight, the new instructions in the nupic wiki should address @oxtopus's concerns by reversing the installation order of nupic and nupic.bindings and adding the The various python mechanisms for package/installation management unfortunately are not fully compatible with each other, leaving room for getting an installation into an undesired state. |
No. It does not. As I documented in the original issue, the instruction to Only way I know, as I documented, is to manually remove it e.g. |
@oxtopus, if you start with a clean system, then install |
@rhyolight and @oxtopus: I updated https://github.com/numenta/nupic/wiki/Installing-and-Building-NuPIC#nupic: Added instructions for uninstalling nupic and nupic.bindings before beginning to install nupic from source in order to get a clean install. This would have been a good idea even before the latest dependency changes, since multiple installations from wheel (pip) and via |
@rhyolight, it sounds like we're okay with closing this issue? |
@rhyolight, the various build videos are a different story, though. We can't update those as easily as we can update the text in the wiki. What do you propose for them? |
@rhyolight and @oxtopus: I validated the updated build instructions from the nupic wiki on my dev laptop and ended up with a clean installation of both nupic and nupic.bindings, and the tests are doing well. I think that if someone has a wedged installation of something in site-packages, then our instructions won't help them, and they will need to rely on their python skills to unwedge things. That said, it might be worthwhile when we hove more time to understand how our nupic.bindings installations manage get wedged, such that we have to rely on |
Re:
Very easily. For example, by running Expecting the user to always start from a clean system is at odds with an incremental build system that is supposed to support in-place editing. We might as well not allow it at all and instead remove support for the |
#3327 (comment) describes the reasons behind pursuing the current approach versus the alternative. We will almost certainly revisit this in the very near future as part of our bamboo-ci build/release/deploy workflows. At that point, I hope that we will have a solution that we can all be happy with and proud of. |
I want to do a final pass on this today. Thanks @vitaly-krugl I will take responsibility for this from here. |
After uninstalling both # Nothing up my sleeve
> pip freeze | grep nupic
# virtualenv for nupic
> virtualenv venv
New python executable in venv/bin/python
Installing setuptools, pip...done.
> . venv/bin/activate
# First, install nupic
cd $NUPIC
python setup.py install
# The explicit version of nupic.bindings is installed now
> nupic-version
nupic 0.5.6.dev0
nupic.bindings 0.4.6
# So uninstall the version of nupic.bindings it installed
> pip uninstall nupic.bindings
Uninstalling nupic.bindings-0.4.6:
/Users/mtaylor/nta/nupic/venv/bin/nupic-bindings-check
/Users/mtaylor/nta/nupic/venv/lib/python2.7/site-packages/nupic.bindings-0.4.6-py2.7-macosx-10.9-intel.egg
Proceed (y/n)? y
Successfully uninstalled nupic.bindings-0.4.6
# Only nupic is installed now
> pip freeze | grep nupic
-e git+git@github.com:rhyolight/nupic.git@d2aad354226bba6b554c706e74e18b3ed4415a0f#egg=nupic
# So I'll go install nupic.bindings from source, deferring to the ncore readme as directed...
# First deactivate virtualenv to do the C++ build (I don't think it matters whether I do this
# within virtualenv or not, but jumping out anyway just to prove we don't need to be in one.)
> deactivate
> mkdir -p $NUPIC_CORE/build/scripts
> cd $NUPIC_CORE/build/scripts
> cmake $NUPIC_CORE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../release -DPY_EXTENSIONS_DIR=$NUPIC_CORE/bindings/py/nupic/bindings
> make -j6
> make install
# All output looks good
# Going back to $NUPIC to re-enter virtualenv before installing
> cd $NUPIC
> . venv/bin/activate
# Now heading to nupic.core source to install nupic.bindings at tip of master
> cd $NUPIC_CORE
> python setup.py install
> nupic-version
nupic 0.5.6.dev0
nupic.bindings 0.4.7.dev0
# Go into nupic dev mode
> cd $NUPIC
> python setup.py develop
running develop
running egg_info
writing requirements to src/nupic.egg-info/requires.txt
writing src/nupic.egg-info/PKG-INFO
writing namespace_packages to src/nupic.egg-info/namespace_packages.txt
writing top-level names to src/nupic.egg-info/top_level.txt
writing dependency_links to src/nupic.egg-info/dependency_links.txt
reading manifest file 'src/nupic.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'src/nupic.egg-info/SOURCES.txt'
running build_ext
Creating /Users/mtaylor/nta/nupic/venv/lib/python2.7/site-packages/nupic.egg-link (link to src)
nupic 0.5.6.dev0 is already the active version in easy-install.pth
Installed /Users/mtaylor/nta/nupic/src
Processing dependencies for nupic==0.5.6.dev0
Searching for nupic.bindings==0.4.6
Reading https://pypi.python.org/simple/nupic.bindings/
Downloading https://pypi.python.org/packages/a4/5c/2b97fe9235c044f2fa5a61885ca18c1757c516f9173a625727a0635945dc/nupic.bindings-0.4.6-py2.7-macosx-10.9-intel.egg#md5=295b607d4a598c115b174652ca988be6
nupicBest match: nupic.bindings 0.4.6
Processing nupic.bindings-0.4.6-py2.7-macosx-10.9-intel.egg
# Uh oh, we just went back to nupic.bindings==0.4.6
> nupic-version
nupic 0.5.6.dev0
nupic.bindings 0.4.6
# I can fix this by re-installing from nupic.core
> cd $NUPIC_CORE
> python setup.py develop
> nupic-version
nupic 0.5.6.dev0
nupic.bindings 0.4.7.dev0
|
So, given the above, there is still a problem with running I think I can update docs to indicate that when switching to "develop" mode in nupic, that |
I also want to show that we can move around to different version of # Still in venv because why not?
> cd $NUPIC_CORE
# Switch to older version of nupic.core
> git checkout 0.4.1
HEAD is now at 3c64788... Release 0.4.1.
> mkdir -p $NUPIC_CORE/build/scripts
> cd $NUPIC_CORE/build/scripts
> cmake $NUPIC_CORE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../release -DPY_EXTENSIONS_DIR=$NUPIC_CORE/bindings/py/nupic/bindings
> make -j6
> make install
# All output looks good
# Install nupic.bindings at 0.4.1
> cd $NUPIC_CORE
> python setup.py install
# version check
> nupic-version
nupic 0.5.6.dev0
nupic.bindings 0.4.1 When I run a hotgym example in this state, there is an error because of an API change in But every time With this knowledge, I'm going to run through the installation instructions in the NuPIC README and our wiki and do some cleanup before closing. |
After reviewing our compilation instructions for nupic, I added this paragraph immediately after the instruction to run
|
Another issue is that the https://github.com/numenta/nupic/wiki/Numenta-Developer-Setup is broken, but I'd rather defer that document update for now. I'm going to mark it as deprecated temporarily. |
See original issue, which was filed against nupic.core: numenta/nupic.core-legacy#1069
Please continue discussion of this issue here.
The text was updated successfully, but these errors were encountered: