Check if Chocolatey Package is Install or Upgrade - installation

Is there any way, within the chocolateyinstall.ps1 file, to check if the process was triggered with the Upgrade command versus the Install command?
I tried using things like "choco list --lo" and "choco outdated", but those kept bringing up the package currently being installed - even if it hadn't yet been fully installed. I was hoping there was some sort of environment variable or something easy that I've overlooked.
Thanks!

Related

idb-companion: command not found after installing via homebrew

I have installed idb-companion in line with the instructions in their docs, but when I run idb list-targets I get idb: command not found. idb-companion shows up when I brew list. I also tried installing and running the universal .tar.gz folder from their latest release, but got no where. Although I only ran that via the Finder GUI, because I wasn't sure how to execute that from the CLI.
I understand there is some homebrew path I may have to change. I have actually had homebrew issues before and so have usually resorted to installing everything via node where possible. In this case it's not, so I tried the .tar.gz file.
How can I get idb-companion to start working properly?
Most likely it is the case, your python path is not set. You need to set your python path. Faced the same issue was resolved with setting python path.

pip install psd-tools3 => FileNotFoundError: [Errno 2] No such file or directory

I was trying to install Ursina but I was having trouble getting all the required packages I needed to run my code properly. Come to find out, there's a package that refuses to install called 'psd-tools3' that won't install, no matter what I do.
I've been using cmd commands like 'pip install psd-tools3' and 'pip3 install psd-tools3' but no other commands work (i.e. 'sudo pip install psd-tools3' doesn't work because my PC doesn't know what 'sudo' means and doesn't run). I've tried installing required packages for this package, but nothing works. It just keeps giving me this error:
enter image description here
I would really appreciate the help with this problem. All I can really assume is that the Python file '_version' hasn't been created and that's what's throwing the whole program off. If there is a way to add this manually and then install it, I would appreciate steps to do that as well.
I was running this on a Lenovo Thinkpad (Windows 10) on Python 3.10 (I also have Python 3.8.3 but that was installed with the 3.10) and I made sure all packages and pip are up-to-date. Still having this problem and I don't know why.
Seems to me like the issue is on the side of the maintainers of psd-tools3.
For example, looking at the content of the latest source distribution on PyPI, we can see that it does not contain any _version.py file.
This needs to be solved by the project's maintainers, but they do not have a ticket tracker. On the other hand there seems to be an "Author" email address on the project's PyPI page as well as in the project's setup.py script.
A solution might be to clone the project's source code repository (with git), and try to install from the local clone.
Just simply try
pip install psd-tools3==1.9.0
Or
pip install psd-tools3==1.8.2
This should work on your pc as well. I was having same issue, and then I tried this It worked for me

No module named 'xlsxwriter'

I'm trying to install xlsxwriter. I'm using VS Code. I installed two different versions of python when I set this up. When I use 'pip install xlsxwriter' it says it's successfully installed, but when I run the code it brings back the above error. (No module named 'xlsxwriter') I'm using 'import xlsxwriter'.
I've tried uninstalling it, installing wheel, and then trying to install it again, but I'm getting the same error.
How do I make sure I'm installing xlsxwriter correctly?
thank you!
I've been able to get the file to run by typing, 'python3 (file name)' but is there a way to change what vs code automatically runs? when I type, 'python --version' it comes back as 2.7.
I'm looking in the command palette, but I'm not seeing python3. I'll keep looking around online, but any help would be wonderful.

How can I do a fresh installation of Python and Jupyter Lab?

I have been using venv to create virtual environments to work with Jupyter Lab. I tried Anaconda for awhile, but couldn't get the widgets working. I went back to a pip,venv setup and everything worked. Then after not using the setup for awhile, Jupyter Lab was freezing when I pressed CTRL+F to find where a variable was being used. It proceeded to freeze even after restarting the kernel, even after deactivating and reactivating the environment. The folder the environment was in won't let me delete it. Creating a new environment to start from scratch didn't fix it. Reinstalling Python and creating a new environment didn't fix it. I see that Pip has cached a lot of the packages and so installing things are pulled from the cached, event after reinstalling Python.
I want to remove everything related to the previous installation and start fresh, but am having trouble doing that. Any advice would be helpful.
Windows 10
Python 3.8.5 is the most recent version used.
Use pip list to list all package (from the old python the one you want to uninstall). Then copy all the packages and put the in a --requirement file with all the packages installed in it. (how to specify --requirement file) Then use the following command to uninstall all the old packages.
pip uninstall [options] -r <requirements file>

How to install eclim with brew or other package manager?

I am trying to install eclim to my system for code completion in vim. But as far as the eclim website has mentioned, the only installation method seems to be downloading the bin or source code to your system and executing the installation command manually. But I really hate installing stuff in this way as it pollutes your system directories. I tried to use brew but there doesn't seem to be a formula named "eclim". So is there really no way for me to install eclim with a package manager on mac?
I tried to use brew but there doesn't seem to be a formula named "eclim". So is there really no way for me to install eclim with a package manager on mac?
Write the missing formula.

Resources