Some functions of apps requires Python 2.7.12 others require 2.7.5 Is it possible to use both of them? The directory in Pythons Framework (/System/Library/Frameworks/Python.framework/Versions) does not indicate the individual build. Only the main build. (2.7 = 2.7.5) How apps handle different builds?
OK, so the solution for this problem is... when you download the python updater for OS X from the python website, the folder "Extras" is not included. Manually copy the folder from the previous version e.g. /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/ to /System/Library/Frameworks/Python.framework/Versions/2.7/ will solve the problem. Don't forget to restore the access rights after copying the folder.
Related
I have installed Anaconda recently in a new Windows computer. I have no experience with managing installed packages in Windows, but in Linux. I created a new project with PyCharm and chose to use as interpreter Python 3.7 that I installed separate from the Python 3.6 version that Anaconda comes with. Now I want to be able to use Anaconda modules such as numpy or pandas in my PyCharm Project, that is using a virtual environment set up in a PyCharmProjects folder.
I fail to understand how exactly should I do it. What is that I have to copy or run to migrate the Python packages installed in Conda to my Virtual environment created from a clean independent install of Python 3.7? When I try to import them they don't work. Do I have to create a new project and migrate the files or can I do it without that?
Edit
Also, I am very unclear about how I can run Python36 that Anaconda installed. There is no conda command in Windows and python runs python27. How do I do this?
So it seems that using Python in Windows goes a bit differently than in Linux/MacOS. In order to change the default version that runs when python command is executed, one has to run the command regedit and Find (Ctrl+F) Python.exe, and change the path to default Python interpreter that one wants to use. Python installed by Anaconda can be found in Anaconda's folder in C:\ProgramData (if installation was for all users, if not its probably in some other folder in C:\Users\[User].
As for the other part of the question, I'm not sure but I think packages have to be re-installed in the virtual environment, unless you know how to copy the files one by one. Also, it's important to be careful with the version compatibility. In my case, the two Python installations are different versions, so it might not work the trick to copy the files. Other option is to change where the interpreter runs; if in that folder the packages are installed, the installation will succeed. You can also change Python's path to find packages; but that is something that must be done programatically and is not very handy to have to be running those lines of code each time.
When creating a project (or even when the project is already created) you can choose to change the interpreter to Anaconda's Python, even if you are not using conda as a package manager, but virtualenv by Python. That'd be the trick for me. Aditionally, PyCharm also natively integrates package installation into the virtual environment in a GUI menu.
If anyone has a better answer/explanation, I'm looking forward to getting to know it, but in the meanwhile that is the conclusion I have arrived to.
I am using yt 3.1 on a cluster and the current version is installed in a directory /work/../../sw/yt-3.1/yt-x86_64/bin/yt , now I would like to try the new version 3.3.1 but I still want to use the older version in parallel to compare. Please let me know what is the procedure to get a different version in a different directory.
Just run the latest version of the install script in a folder like /work/../../sw/yt-3.3. The install script creates an isolated environment that is entirely contained in the installation folder.
Keep in mind that the install script was updated for yt 3.3 to build a conda environment by default. This makes the install script run much more quickly and is also more robust on most machines, particularly ones with old or nonexistent OpenSSL installs. If you want to make the install script build everything from source like it did for yt 3.1, set INST_YT_SOURCE=1 and INST_CONDA=0 in the install script.
What is the equivalent of .deb and .rpm in Mac OS X?
I am trying to create a package in Mac OS X which will include necessary libraries and scripts.
There are several approaches for Mac installation.
Simplest: self-contained application (Foo.app). You put everything in a directory (in a particular hierarchy), give the directory the .app extension, and ask the user to copy it into /Applications. All necessary libraries and scripts should be included inside the directory. It is commonly distributed inside a .dmg file, which is a disk image.
Installer: Uses a .pkg archive, which will be opened by Apple's Installer. It has capability to install libraries in root-restricted areas (after asking the user for the password).
Homebrew/Fink/MacPorts - open-source projects that provide functionality ranging from that of Debian's Aptitude to that of BSD's Ports. Authors write down recipes that the installer executes, which resolve dependencies and install necessary related packages. I believe Homebrew is now the most popular of these, with recipes being written in a Ruby DSL.
I have created a installation package for mac os x using iceberg, which was successful and working fine.
But i have many version of my application.
So My question is how to make a upgrade package using iceberg?,
During upgrade some of the directories inside the installation directory should be untouched(not to be replaced)
In your installer, leave out the directories which shouldn't be touched and they will be ignored. I've noticed that existing directories and files not targeted with changed/added bits aren't touched.
In the previous Mac release of our software, we foolishly put the major version number in the application bundle name: /Applications/CellProfiler2.0.app
Now we are about to release version 2.1. Is it possible to have pkgbuild make a .pkg package that installs the new version as /Applications/CellProfiler.app but removes the old /Applications/CellProfiler2.0.app?
It is; and in fact, You have, as we see it, two options here:
1) Use pre-install scripts in the pkg to either detect your old version and ask the user to remove it, or remove it yourself (or first just rename the directory to be without the 2.0)
2) Package your installer in a DMG, and run the installer as a separate file altogether, and do either of the above.