All Sites & Public Resources...
Products & Services
Data Science Platform
Personal Analytics for Facebook
Products for Education
Wolfram|Alpha for Mobile
Course Assistant Apps
Paid Project Support
All Products & Services »
Revolutionary knowledge-based programming language.
Central infrastructure for Wolfram's cloud products & services.
Technology-enabling science of the computational universe.
Computable Document Format
Computation-powered interactive documents.
Software engine implementing the Wolfram Language.
Wolfram Natural Language Understanding System
Knowledge-based broadly deployed natural language.
Wolfram Data Framework
Semantic framework for real-world data.
Wolfram Universal Deployment System
Instant deployment across cloud, desktop, mobile, and more.
Curated computable knowledge powering Wolfram|Alpha.
All Technologies »
Aerospace & Defense
All Solutions for Education
Web & Software
Authoring & Publishing
Finance, Statistics & Business Analysis
Financial Risk Management
Internet of Things
All Solutions »
Support & Learning
Find an Answer
Ask for Help
Post a Question
Videos & Screencasts
Conferences & Seminars
All Support & Learning »
Work with Us
A New Kind of Science
Wolfram + Raspberry Pi
Wolfram Innovator Awards
All Company »
Mark as an Answer
How to load and use a package
Many apologies for another newbie question but what do I do with a package and where do I put it so that it will load and be usable? I want to use Combinatorica and I have saved NewCombinatorica.m in several places, mostly hanging off my main Mathematica program files directory and given them various names but no attempt to load the package has yet been successful. I get a msg Get::noopen: "Cannot open \!\(\"Combinatorica\"\)." (or something similar, depending on the filename I use).
When I write packages, I usually put them in the AddOns/Applications folder.
Also see the discussion about possible locations for packages in earlier posts on this group and also covered in the attached tutorial that I have posted a couple fo times (but which i burried in an old post by this point):
Many thanks for the replies. I've put Combinatorica in AddOns/Applications as suggested and it looks like something is making sense to Mathematica as I now get a stream of erro rmessages (attached). I realise I'm trying to run before I walk here, having only ever used Mathematica interactively rather than with programs and data but I really haven't got a clue how to proceed or what help and various tutorials are telling me.
Combinatorica is a package that is shipped with Mathematica so you do not need to download and install it. The version that you link to in your first posting is 2.0. The version shipped with mathematica is version 2.1. The error messages that you are getting may have to do with incompatibilities between the 2.0 version and Mathematica versions greater than 6.
ut also pay attention to this:
Thanks again for the reply. I'd visited both those links before I posted - it was them that led me to download Combinatorica: why that chose to download an okld version beats me. So, assuming one of my futile attempts to get this thing to do something has wiped the version shipped with Mathematica which Mathematica tells me it can't load, I am now truly up the creek. I think I'll dig out my version 8 DVD and reinstall everything and not bother with version 9.
Version 9 has Combinatorica as well. No need to go back to an older version of Mathematica.
This, by the way, is one good reason not to change things that are in the Mathematica distribution itself, but rather put them in in one of the folders that I describe in my notebook above. Then you will never overwrite something that is in Mathematica itself. You can then always choose to load the alternative package that is in on of those folders by pointing to it directly.
Thanks - going back to 8 fixed it. Must have been an install glitch. Having said that, Inversions doesn't give me the number of inversions in a vector A as I had expected so I've headed back to Python anyway. Methinks I should go back to watch all the Mathematica intro videos to lear more about the bits I've not used before.
Be respectful. Review our
to understand your role and responsibilities.
Data Science Platform
Volume & Site Licensing
Wolfram Language Documentation
Connected Devices Project
Wolfram + Raspberry Pi
© 2015 Wolfram. All rights reserved.
Learn how »