lecture-python.myst icon indicating copy to clipboard operation
lecture-python.myst copied to clipboard

Unable to create conda environment

Open schwabts opened this issue 3 years ago • 5 comments

using https://github.com/QuantEcon/lecture-python.myst/blob/main/environment.yml

  • Well, the message is clear but why would I want to install MS's C++ compiler in order to create the Anaconda environment?
  • Is there a work around this requirement?

I'm mainly asking in order to eventually build my fork with GitLab CI but I still don't even manage to build the project locally.

I was running the following on a Windows laptop much the same way that works for most other Jupyter Book sample projects. I even wrote a batch file that extracts the environment's name from the YAML file, activates it, and runs jb build %1. Otherwise, a Makefile or at least instructions for how to build would be extremely helpful.

  • Unfortunately, .github/workflows/ci.yml copied to ./.gitlab-ci.yml does not yield a valid CI configuration, either.
Book>conda env create -f environment.yml
...
Preparing transaction: done
Verifying transaction: done
Executing transaction: -

    Windows 64-bit packages of scikit-learn can be accelerated using scikit-learn-intelex.
    More details are available here: https://intel.github.io/scikit-learn-intelex

    For example:

        $ conda install scikit-learn-intelex
        $ python -m sklearnex my_application.py


done
Installing pip dependencies: \ Ran pip subprocess with arguments:
[ ... installl ... requirements.txt]
Pip subprocess output:
...
  Attempting uninstall: docutils
    Found existing installation: docutils 0.17.1
    Uninstalling docutils-0.17.1:
      Successfully uninstalled docutils-0.17.1
    Running setup.py install for libsass: started
    Running setup.py install for libsass: finished with status 'error'

Pip subprocess error:
...
  You probably need Visual Studio 2015 (14.0) or higher
  running bdist_wheel
...
  running build_ext
  building '_sass' extension
  ERROR: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for libsass
    ERROR: Command errored out with exit status 1:
...
    You probably need Visual Studio 2015 (14.0) or higher
    running install
  

schwabts avatar Sep 05 '22 15:09 schwabts

hi @schwabts you may need a c++ compiler due to https://github.com/QuantEcon/lecture-python.myst/blob/411cd08cf14e62e191be88b6fdd658257bff88c1/environment.yml#L21 as it is largely a python interface to connects down into c libraries.

mmcky avatar Sep 06 '22 03:09 mmcky

Unfortunately, .github/workflows/ci.yml copied to ./.gitlab-ci.yml does not yield a valid CI configuration, either.

I am not sure what the gitlab syntax is for their CI but it is probably a bit different to GitHub's

mmcky avatar Sep 06 '22 03:09 mmcky

If you are running on Windows I would recommend looking at wsl2 as that will provide you with a full ubuntu kernel and a very useful programming stack. The windows platform should work - but some packages are different in that context and the best compatibility is with linux or OS X

mmcky avatar Sep 06 '22 03:09 mmcky

Thank you very much @mmcky for your explanations. Focusing on contents I failed to get involved deeper with technical issues and will probably reach my goals quicker by moving to another project. Nonetheless, I like this project very much and still hope to get the pipeline running on GitLab a little later!

schwabts avatar Sep 06 '22 08:09 schwabts

Unfortunately, .github/workflows/ci.yml copied to ./.gitlab-ci.yml does not yield a valid CI configuration, either.

I am not sure what the gitlab syntax is for their CI but it is probably a bit different to GitHub's

Indeed, there are some differences:

  1. Converting GitHub Action to Gitlab CI/CD
  2. How can We use GitHub Actions in Gitlab?
  3. Write GitHub Actions for Gitlab Too

Item 3. concludes with the line In the end, the Docker image has one script for both. You would not even notice what CI service it was written for originally.

schwabts avatar Sep 06 '22 09:09 schwabts