Installing two different yt versions in two different directories - yt-project

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.

Related

installation pip install dbt-postgres

I guess just installed dbt-postgres according to the article https://docs.getdbt.com/dbt-cli/install/pip
using command pip install dbt-postgres
after the installation I have everywhere Requirements already satisfied
When I try the command to see the version I have an error
''dbt' is not recognized as an internal or external command,
operable program or batch file.'
Does this mean that I didn't downloaded this?
How to check the version?
pip is saying that you already have dbt-postgres installed ("Requirement already satisfied") in your local Python 3.10 environment.
Windows is complaining because that Python's site-packages directory is not on your PATH. This is typical; depending on how you install Python on Windows, it is not automatically added to your PATH. (PATH is an environment variable that tells your shell where to search for the commands you type in -- each command is the name of an executable file in a folder somewhere, and PATH is a list of folders to search in for those executable files).
There are a few ways to add Python to your PATH -- see the official docs on this subject. If you're new to all of this, your best bet might be to uninstall and re-install Python. The Windows Store is now the best way to do this.
HOWEVER there is another issue here too -- you're trying to run dbt on Python 3.10, but currently dbt only supports older versions of Python (3.7-3.9). So when you re-install Python, you're going to want to specify 3.9 (which I linked to above).
Managing multiple versions of Python on your machine can be a real pain, especially on Windows. If you have someone more experienced in your organization (like an engineer who knows Python well), it's well worth your time to get someone to pair with you on this while you work it out.

Migrate Anaconda packages to `venv` virtual environment

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.

How can I install older version (0.13.x) sbt on my MAC?

I need sbt version 0.13.x for a course in Scala and I am having difficulties installing it. I tried with the brew install sbt#0.13 command, but when I then check with sbt about it gives a message No such file or directory. 
However, if I again try and do brew install sbt#0.13, it gives Warning: sbt#0.13 0.13.16 is already installed, although sbt about does not find anything.
In addition to that, I tried installing the latest version of sbt with brew install sbt and then manually changing the version each of my projects is using by entering sbt.version=0.13.12 in a given build.properties file. This seemed to work initially, when I check with the terminal the version of sbt inside the project. However, I am still not able to import already existing projects.
Finally, I downloaded the version from http://www.scala-sbt.org/download.html but then I need to do some corrections to my PATH from what I've read online and I am not sure what that means.
So, I would be grateful if someone could help me with the installation of an older version.
The way sbt works is that it will look in project/build.properties for the sbt version to use to build your project. So the way you described - installing the latest sbt and set the version you want to use for the build in project/build.properties - should work just fine.
Regarding
not able to import already existing projects
these existing projects also should have project/build.properties indicating the sbt version.
Note that even with installing 0.13.12 locally, when building your project sbt will still use the version specified in project/build.properties, it will just download it as necessary.
If you absolutely want to run a specific version from the command line, as you already discovered, you can download it. Regarding updating your PATH - PATH is an environment variable that tells your command line where to look for executable files. It's a list of directories, so if you unpacked the downloaded file in say "$HOME/tools", you have so say something like export PATH=$HOME/tools/sbt/bin:$PATH. See https://www.cyberciti.biz/faq/appleosx-bash-unix-change-set-path-environment-variable/ for a more detailed description.

Can a .pkg replace an application bundle with a different name?

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.

How do I manually install an old cygwin package?

A project I am working on requires an old version of SLAPD (the LDAP
server) and must run on Windows, hence I am using cygwin packages:
I've found a binary package of slapd version I need 2.2.x here:
http://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/release/...
How do I manually install it in cygwin? It does not seem to be a package-manager file format (like an RPM or a Deb), but is there a tool to install it for me?
FYI, I'm operating behind a corporate firewall that prevents me from viewing the main cygwin site (including the documentation), so please nobody tell me to RTFM - I wish I could!
Thanks
If you need an older version, the Cygwin time machine might help. To use it, I had to invoke setup.exe from the command line, giving it the --no-verify/-X option and it still wouldn't let me downgrade the "cygwin" package itself but at least it is, albeit very slowly, allowing me to install the version I wanted to test as a parallel installation.
If you are using the cygwin package installer to install this package, usually if you select to view the full info and scroll to the package you need you will see some info about the version.
Now if you click on the version number you will see that it changes from the oldest in the repository to the current. If your repository has the version you need then just finish the wizard.
Some cygwin mirrors keep old package files, for example, http://mirror.isoc.org.il/pub/cygwin/
You can use Sonatype nexus to mirror an existing cygwin repository, but provide your own setup.ini .
Copy the already downloaded repo content to c:\progs\nexus\sonatype-work\nexus\storage\mirror.isoc.org.il-pub-cygwin\
Put your own setup.ini and setup.bz2 there.
Start setup.exe with --no-verify
Paste
http://localhost:8081/nexus/content/repositories/mirror.isoc.org.il-pub-cygwin/
into the mirror selection box and click "Add"

Resources