PSLmodels / Tax-Calculator

USA Federal Individual Income and Payroll Tax Microsimulation Model
https://taxcalc.pslmodels.org
Other
262 stars 157 forks source link

Are root permissions needed in Linux? #2719

Closed feenberg closed 8 months ago

feenberg commented 8 months ago

I ran this command at the Linux shell prompt: conda install -c conda-forge taxcalc and the lengthy response ended with these lines:

pytz-2024.1          | 184 KB    | ##################################################### | 100%
lerc-3.0             | 196 KB    | ##################################################### | 100%
Preparing transaction: done
Verifying transaction: failed

EnvironmentNotWritableError: The current user does not have write permissions to the target environment.
  environment location: /usr/local/miniconda
  uid: 1079
  gid: 2292

The installation instuctions do say the root permission is not required for Anaconda, but are silent about the taxcalc package itself. I do recall that Anaconda itself may not have installed correctly. It end with "done" but did not return control to the shell, and there was no shell prompt.

jdebacker commented 8 months ago

@feenberg I haven't seen this before and it may be an issue with how you installed Anaconda. If so, this Stack Overflow thread may offer a solution.

Conda seems to have gotten increasingly flakey, with long wait times to resolve packages for an environment.

As an alternative, you might try pip install -U taxcalc, as we also release the package on PyPI.

feenberg commented 8 months ago

Nothing on the StackOerflow page seemed relevant - it is all about windows or if Anacaonda is owned by root.

I did try the pip method. The install seemed fine (there was one warning for issue 10151) but "tc --test" yielded the following error message:

bash-5.1$ tc --test
Traceback (most recent call last):
  File "/homes/nber/feenberg/.local/bin/tc", line 5, in <module>
    from taxcalc.cli.tc import cli_tc_main
  File "/homes/nber/feenberg/.local/lib/python3.9/site-packages/taxcalc/__init__.py", line 4, in <module>
    from taxcalc.calculator import *
  File "/homes/nber/feenberg/.local/lib/python3.9/site-packages/taxcalc/calculator.py", line 13, in <module>
    import paramtools
ModuleNotFoundError: No module named 'paramtools

It looks like paramtools may be part of Anaconda - do I need to have Anadconda installed?

jdebacker commented 8 months ago

@feenberg ParamTools is also on PyPI, so can be installed with pip install paramtools

I've opened in an issue to make sure we require paramtools with taxcalc installed from PyPI.