Skip to content
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

.rmtoo dependencies error #36

Open
channelsailing opened this issue Feb 26, 2020 · 10 comments
Open

.rmtoo dependencies error #36

channelsailing opened this issue Feb 26, 2020 · 10 comments

Comments

@channelsailing
Copy link

channelsailing commented Feb 26, 2020

Hi all, on first install, following instructions for VirtualEnv approach on RaspberryPi.
After make I receive the following error ```
Makefile:32: .rmtoo_dependencies: No such file or directory
rmtoo -j file://Config.json
--create-makefile-dependencies=.rmtoo_dependencies

Most grateful for any hints as to what I must have missed.

Thanks.
James 

Raspbian GNU/Linux 9 (stretch) running on RaspberryPi3
python --version
Python 2.7.13

![image](https://user-images.githubusercontent.com/16566973/75300168-f3307300-582e-11ea-81f2-1a074b0d0223.png)
@kown7
Copy link
Contributor

kown7 commented Mar 5, 2020

Have you tried to template project from contrib/template_project?

@scheitelhecht
Copy link

I also followed the "VirtualEnv approach"
If I run make I get the same error message like channellsailing. See below.
@kown7 :

  • 1st trial: I run 'make' in a copy of the template_project. Error, see below.
  • 2nd trial: Fetch the whole project with 'git clone' frome here. Then run 'make' directly in the directory /rmtoo/contrib/template_project. Got the same error. :-(

I appreciate any help.


Makefile:32: .rmtoo_dependencies: Datei oder Verzeichnis nicht gefunden
rmtoo -j file://Config.json
--create-makefile-dependencies=.rmtoo_dependencies
Traceback (most recent call last):
File "/usr/local/bin/rmtoo", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/rmtoo/lib/RmtooMain.py", line 89, in main
main_impl(sys.argv[1:], sys.stdout, sys.stderr)
File "/usr/local/lib/python2.7/dist-packages/rmtoo/lib/RmtooMain.py", line 81, in main_impl
exitfun(not mainfunc(args, mstdout, mstderr))
File "/usr/local/lib/python2.7/dist-packages/rmtoo/lib/RmtooMain.py", line 72, in main_func
config, input_mods = MainHelper.main_setup(args, mstdout, mstderr)
File "/usr/local/lib/python2.7/dist-packages/rmtoo/lib/main/MainHelper.py", line 37, in main_setup
config = MainHelper.main_setup_config(args)
File "/usr/local/lib/python2.7/dist-packages/rmtoo/lib/main/MainHelper.py", line 30, in main_setup_config
config.merge_cmd_line_params(args)
File "/usr/local/lib/python2.7/dist-packages/rmtoo/lib/configuration/Cfg.py", line 170, in merge_cmd_line_params
ldicts = CmdLineParams.create_dicts(args)
File "/usr/local/lib/python2.7/dist-packages/rmtoo/lib/configuration/CmdLineParams.py", line 124, in create_dicts
lresult.append(CmdLineParams.add_deprecated_values(args))
File "/usr/local/lib/python2.7/dist-packages/rmtoo/lib/configuration/CmdLineParams.py", line 63, in add_deprecated_values
mod_dir = distutils.sysconfig.get_python_lib()
AttributeError: 'module' object has no attribute 'sysconfig'
Makefile:38: recipe for target '.rmtoo_dependencies' failed
make: *** [.rmtoo_dependencies] Error 1

@kown7
Copy link
Contributor

kown7 commented Apr 3, 2020

From afar it seems to me, that there's something sketchy with your python installation. Also, why python 2.7?

I've tried to recreate your steps with the following commands in an empty directory

python2 -m virtualenv venv
source venv/bin/activate
pip install rmtoo
git clone git@github.com:florath/rmtoo.git
cp rmtoo/contrib/template_project -R .
cd template_project/
. setenv.sh `pwd`/../venv/  #  mind the dot

This doesn't work with python2 but should yield a different error. Replace LatexJinja2 with latex2 in the Config.json and continue as following.

export RMTOO_CONTRIB_DIR=`pwd`/../venv/rmtoo/ 
make

PS: I find this line supicious: AttributeError: 'module' object has no attribute 'sysconfig'. Could this also be related to #11 ?

@scheitelhecht
Copy link

Hi kown7,
first of all: Thank you for your fast response. :-)

Also, why python 2.7?
It was a leftover from a former Anaconda installation, I guess.
I cleaned up:
whereis python2
sudo apt-get remove --auto-remove python2.7

Check, if its done:
whereis python
result: python: /usr/bin/python3.6 /usr/bin/python3.6-config /usr/bin/python3.6m-config /usr/bin/python3.6m /usr/lib/python3.6 /usr/lib/python3.7 /usr/lib/python3.8 /etc/python3.6 /etc/python /usr/local/lib/python2.7 /usr/local/lib/python3.6 /usr/include/python3.6 /usr/include/python3.6m /usr/share/python

Yes, its done.

Your receipt:

python3 -m virtualenv venv
source venv/bin/activate
pip install rmtoo
git clone git@github.com:florath/rmtoo.git
cp rmtoo/contrib/template_project -R .
cd template_project/
. setenv.sh ../venv/  #  mind the dot

make

result:
Makefile:32: .rmtoo_dependencies: Datei oder Verzeichnis nicht gefunden ../venv//bin/rmtoo -m../venv/ -j file://Config.json \ --create-makefile-dependencies=.rmtoo_dependencies make: ../venv//bin/rmtoo: Command not found Makefile:38: recipe for target '.rmtoo_dependencies' failed make: *** [.rmtoo_dependencies] Error 127

From my point of view it looks very similar to the result of the python2 run.

No I tried an installation without a virtual environment:

pip3 install rmtoo
result: OK, no error messages
cd template_project/
make

Makefile:32: .rmtoo_dependencies: Datei oder Verzeichnis nicht gefunden
rmtoo -j file://Config.json \
	--create-makefile-dependencies=.rmtoo_dependencies
Traceback (most recent call last):
  File "/home/mst/.local/bin/rmtoo", line 11, in <module>
    sys.exit(main())
  File "/home/mst/.local/lib/python3.6/site-packages/rmtoo/lib/RmtooMain.py", line 89, in main
    main_impl(sys.argv[1:], sys.stdout, sys.stderr)
  File "/home/mst/.local/lib/python3.6/site-packages/rmtoo/lib/RmtooMain.py", line 81, in main_impl
    exitfun(not mainfunc(args, mstdout, mstderr))
  File "/home/mst/.local/lib/python3.6/site-packages/rmtoo/lib/RmtooMain.py", line 72, in main_func
    config, input_mods = MainHelper.main_setup(args, mstdout, mstderr)
  File "/home/mst/.local/lib/python3.6/site-packages/rmtoo/lib/main/MainHelper.py", line 37, in main_setup
    config = MainHelper.main_setup_config(args)
  File "/home/mst/.local/lib/python3.6/site-packages/rmtoo/lib/main/MainHelper.py", line 30, in main_setup_config
    config.merge_cmd_line_params(args)
  File "/home/mst/.local/lib/python3.6/site-packages/rmtoo/lib/configuration/Cfg.py", line 170, in merge_cmd_line_params
    ldicts = CmdLineParams.create_dicts(args)
  File "/home/mst/.local/lib/python3.6/site-packages/rmtoo/lib/configuration/CmdLineParams.py", line 124, in create_dicts
    lresult.append(CmdLineParams.add_deprecated_values(args))
  File "/home/mst/.local/lib/python3.6/site-packages/rmtoo/lib/configuration/CmdLineParams.py", line 63, in add_deprecated_values
    mod_dir = distutils.sysconfig.get_python_lib()
AttributeError: module 'distutils' has no attribute 'sysconfig'
Makefile:38: recipe for target '.rmtoo_dependencies' failed
make: *** [.rmtoo_dependencies] Error 1

I find this line suspicious: AttributeError: 'module' object has no attribute 'sysconfig'.
Yes. And it's here again. :-\

Could this also be related to #11 ?
Yes, it looks very similar. I will check the suggested solution and come back here.
Thank you for the hint. :-)

@kown7
Copy link
Contributor

kown7 commented Apr 6, 2020

You could always try installing the latest master version:

pip install git+https://github.com/florath/rmtoo.git@master

The pip version is about 3 years old...

@scheitelhecht
Copy link

pip install git+https://github.com/florath/rmtoo.git@master --> OK
make
result:

(cd artifacts && \
   gnuplot /usr/local/pkg/rmtoo/rmtoo/contrib/gnuplot_stats_reqs_cnt.inc && \
   epstopdf stats_reqs_cnt.eps)
"/usr/local/pkg/rmtoo/rmtoo/contrib/gnuplot_stats_reqs_cnt.inc", line 0: Cannot open script file '/usr/local/pkg/rmtoo/rmtoo/contrib/gnuplot_stats_reqs_cnt.inc'
Makefile:51: recipe for target 'artifacts/requirements.pdf' failed
make: *** [artifacts/requirements.pdf] Error 1

find -name gnuplot_stats_reqs_cnt.inc

/usr/local/rmtoo/contrib/gnuplot_stats_reqs_cnt.inc

After this I changed one line in the Makefile:

# old: RMTOO_CONTRIB_DIR ?= /usr/local/pkg/rmtoo/rmtoo
# changed to
RMTOO_CONTRIB_DIR ?= /usr/local/rmtoo

DinDong: Now it's running. Thank you.

Things I did beside:
sudo apt-get install texlive-font-utils # because epstopdf was missing
sudo apt-get install texlive-latex-base # because
sudo apt-get install texlive-font-utils # because: ! LaTeX Error: File tocloft.sty' not found. pip3 install unflatten# because: /bin/sh: 1: unflatten: not foundsudo apt-get install graphviz` # because: /bin/sh: 2: dot: not found

After all I found this useful list:
https://github.com/florath/rmtoo/blob/master/contrib/vmsetup/dib-elements/rmtoo-small/package-installs.yaml

@kown7
Copy link
Contributor

kown7 commented Apr 7, 2020

pip install git+https://github.com/florath/rmtoo.git@master --> OK
make
result:

(cd artifacts && \
   gnuplot /usr/local/pkg/rmtoo/rmtoo/contrib/gnuplot_stats_reqs_cnt.inc && \
   epstopdf stats_reqs_cnt.eps)
"/usr/local/pkg/rmtoo/rmtoo/contrib/gnuplot_stats_reqs_cnt.inc", line 0: Cannot open script file '/usr/local/pkg/rmtoo/rmtoo/contrib/gnuplot_stats_reqs_cnt.inc'
Makefile:51: recipe for target 'artifacts/requirements.pdf' failed
make: *** [artifacts/requirements.pdf] Error 1

find -name gnuplot_stats_reqs_cnt.inc

/usr/local/rmtoo/contrib/gnuplot_stats_reqs_cnt.inc

After this I changed one line in the Makefile:

# old: RMTOO_CONTRIB_DIR ?= /usr/local/pkg/rmtoo/rmtoo
# changed to
RMTOO_CONTRIB_DIR ?= /usr/local/rmtoo

DinDong: Now it's running. Thank you.

Good to hear it worked. That's why I put the
export RMTOO_CONTRIB_DIR=pwd/../venv/rmtoo/
there.

Things I did beside:
sudo apt-get install texlive-font-utils # because epstopdf was missing
sudo apt-get install texlive-latex-base # because
sudo apt-get install texlive-font-utils # because: ! LaTeX Error: File tocloft.sty' not found. pip3 install unflatten# because: /bin/sh: 1: unflatten: not foundsudo apt-get install graphviz` # because: /bin/sh: 2: dot: not found

After all I found this useful list:
https://github.com/florath/rmtoo/blob/master/contrib/vmsetup/dib-elements/rmtoo-small/package-installs.yaml

I'm working on my own project, that will have all of this covered, i.e., an appropriate Dockerfile. The Readme should be upgraded eventually.

@kown7
Copy link
Contributor

kown7 commented Apr 8, 2020

@florath is a new release in order?

Please close the issue.

@leonardoInf
Copy link

leonardoInf commented Apr 14, 2020

In Fedora it is

sudo dnf install gnuplot texlive-latex texlive-tocloft texlive-fancyhdr texlive-epstodpf texlive-metafont texlive-mfware

@kown7
Copy link
Contributor

kown7 commented May 23, 2020

Shameless plug for https://pypi.org/project/sltoo/

It fixes all the problems, except for the $RMTOO_CONTRIB_DIR, that one still has to be set manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants