-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OG-UK set up #21
Comments
Hmm, I tried this yesterday and (commenting out OG-USA) |
Thanks @nikhilwoodruff ! I tried your suggestion, installing openfisca-core, after having opened the oguk-calibrate-dev environment. This time, well, actually I got a massive litany of errors. I'm looking in why that happened, but unfortunately, I'm not quite there yet. The errors involve lib files and other files not available (x100s), numpy modules not available, not locating executables. I uninstalled Anaconda and reinstalled it, in case my version was out of date, which unfortunately hasn't helped. For the record, I'm attaching my conda output. |
Seems like the error happens when it tries to install numpy as an openfisca-core dependency. Not 100% sure but maybe it's something to do with the --user option, but I don't know why it fails without that. Also thanks for the pathlib comment - I think I need to add that to the dependency list, didn't realise it wasn't a built-in module. |
I've run into a similar error. When running the "No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/" That error showed up directly after it began building library "npymath" sources. The process seems to blow up directly following that line. Maybe there is a requested package in that library that no longer exists and is crashing the whole process? |
@rickecon @jdebacker @nikhilwoodruff @MaxGhenis @MrColdBeverage Continuing with attempts to get OpenFisca to install on Windows, this time with help from Rick. Below is the conda output from trying to install with the following command: It's a huge litany of errors. I certainly got the "No module named 'numpy.distutils._msvccompiler' in numpy.distutils" a few dozen times, as Noah did (see previous comment). The puzzle remains ...
|
In PR #22, I add a matrix to test on both Linus and Windows. Given the reports above, the Windows tests failed as expected. Looking at the build logs, it appears it has to do with the installation of OpenFisca-core:
Can a Windows user just try to I have no troubling installing the package as above on a Mac or Linux machine. |
Another few thoughts:
|
@hdoupe suggested trying the manual install approach for pip install --no-deps [package] Note that we might need to use the --user option still. @jpycroft @nikhilwoodruff @MrColdBeverage @jdebacker @MaxGhenis |
Thanks all for the suggestions! I'm travelling today and tomorrow, but I'll try them out on Friday. |
@jdebacker Just noting that I played with this some and still am not quite sure how it interacts with |
Hi Jason, Hank, Rick, Jason,
Hank, Rick, It worked in that all the packages installed successfully. It didn't work in that when I try to run run_og_uk.py, I get the error that the "dpath" module is not found. I think this means that at least some of the dependencies were needed. Conda output copied below. Now I'll move on to Jason's 3rd suggestion. Thanks all for the ideas!
|
@jpycroft - does it work if you manually install |
@nikhilwoodruff - thanks! I tried a manual install of dpath, and got the following error message:
Basically, it claims that OpenFisca requires earlier versions of dpath, numpy, pytest, etc. I guess I could try downgrading, but I'm a little worried about downgrading say numpy or pytest ... I also tried directly installing OpenFisca directly, i.e. |
@nikhilwoodruff
The commands I tried were:
All had the same problem. |
@jpycroft I know it's not ideal, but since I think these errors are more warnings than errors, is it worth trying OG-UK even with slightly off requirements? |
@jpycroft OK, still not sure about your library issues, but I compiled a wheel file for the openfisca-core fork that should work on both Windows and Linux. Could you let me know if this works: pip install https://github.com/nikhilwoodruff/openfisca-core/raw/master/dist/OpenFisca_Core-35.0.0week-py3-none-any.whl instead of: pip install git+https://github.com/nikhilwoodruff/openfisca-core Thanks |
Thanks Nikhil, The install happened with some errors. I've attached the conda output for the install. It did install:
but then the output is missing 'labellines' (and possibly other modules):
Best, |
@jpycroft could you try again? I just removed matplotlib-label-lines from microdf |
Thanks Max! |
Thanks @jpycroft - feel free to correct me anyone but it seems from this and the above errors that this is an issue caused by:
I think we can fix this by preventing either 2 or 3, and it's probably best to try and fix 2. This issue suggests maybe you might need to run |
OK, another strange thing here: I just tried the same command you tried on my machine: pip install numpy==1.18.5 and got: (base) nikhil@nikhil-pc:~/ubicenter/openfisca-uk$ pip install numpy==1.18.5
Collecting numpy==1.18.5
Using cached numpy-1.18.5-cp38-cp38-manylinux1_x86_64.whl (20.6 MB)
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.17.5
Uninstalling numpy-1.17.5:
Successfully uninstalled numpy-1.17.5
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
openfisca-uk 0.3.0 requires numpy==1.17.5, but you have numpy 1.18.5 which is incompatible.
openfisca-uk 0.3.0 requires pyyaml==5.3.1, but you have pyyaml 5.4.1 which is incompatible.
Successfully installed numpy-1.18.5
To the best of my knowledge all NumPy releases should be available on all platforms, so I think this supports the idea that this is due to a |
I found an old Windows machine around the house that I had forgotten about. Fresh install of Anaconda and I ran into the same issues noted above, so was able to replicate (took about 4 hours after Reading through the traceback, I began to wonder:
@nikhilwoodruff Is it possible to use ">=" rather than hard pins for package versions in OpenFisca-UK? |
Thanks for the tips @jdebacker , so here's what I've done:
|
I just updated my fork of OG-UK yesterday, deleted my old
|
Ok, so this is I actually understand. What you'll need to do is remove the git dependency on my fork of openfisca core in the environment yaml file (the nikhilwoodruff/frs dependency is also unnecessary. Hopefully that works @rickecon Also, by the way the environment yaml file on my fork of OG-UK has the changes I made to get it working for me. |
@jpycroft, and everyone else with openfisca-uk install issues: I've just managed to get openfisca-uk installable from PyPI. That is, I can do the following: conda deactivate
conda create -n test python=3.7
pip install openfisca-uk
ipython
from openfisca_uk import Microsimulation
sim = Microsimulation() # using the synthetic dataset
sim.calc("tax").sum() Does that work for you? |
Hi @nikhilwoodruff, This works great! The punchline is:
which I assume is the total taxes paid & collected. It seems to be working great! full conda output attached. |
@rickecon @jdebacker @nikhilwoodruff
I'm starting an issue to try to resolve my set up issues and to keep a record which may help others.
First, creating the oguk-calibrate-dev environment from the yml file gives a litany of errors. Basically, the dependencies loaded fine, but the pip install commands ran into a series of problems.
I was able to pip install the packages separately as follows:
$ python -m pip install git+https://github.com/PSLmodels/OG-USA.git
$ python -m pip install git+https://github.com/nikhilwoodruff/frs
$ python -m pip install git+https://github.com/PSLmodels/microdf
These three worked normally.
The OpenFisca files, I could only install them with the "--user" option (otherwise access was denied to some files):
$ python -m pip install --user git+https://github.com/nikhilwoodruff/openfisca-core
$ python -m pip install --user git+https://github.com/PSLmodels/openfisca-uk
At some point, I did need to install pathlib to get the above to work:
$ pip install pathlib
Then I follow this up with activating oguk-calibrate-dev:
$ conda activate oguk-calibrate-dev
And the pip install command:
$ pip install -e .
As the model didn't run, I uninstalled and reinstalled the oguk-calibrate-dev environment with the pip commands commented out, just in case.
I still cannot run the code, because the installed packages are not found:
(oguk-calibrate-dev) C:\Users\jonat\repos\OG-UK-Calibration>python run_og_uk.py
Traceback (most recent call last):
File "C:\Users\jonat\repos\OG-UK-Calibration\run_og_uk.py", line 6, in
from openfisca_core.model_api import Reform
ModuleNotFoundError: No module named 'openfisca_core'
I think the question is how to get the installed packages to be "seen", given that they are not part of the environment?
Any thoughts would be much appreciated!
The text was updated successfully, but these errors were encountered: