Install problem related to Python package dependencies.

293 views
Skip to first unread message

JD Erickson

unread,
Jun 22, 2016, 2:24:05 AM6/22/16
to CDR-Stats
Hello,

Currently the install script is broken. It allows pip to install extra dependencies on its own (is there a way to prevent this?) which causes pip to install (as a dependency for another pip-installed library) Django 1.9.7, in which the importlib function, which is a backward-compatibility function for Python 2.6, is no longer available. Later in the process, the install script then goes on to try to call that function multiple times, which throws multiple Python tracebacks, and it basically completely breaks the install.

It seems to me that there are certain python packages which need to have their version information forced, because the developers of those packages have changed their dependencies in newer releases, causing breakage for install scripts which require certain versions of things, like yours.

During install I did notice some pip install calls calling Package >= X.X.X, rather than using Package==X.X.X, which is probably the culprit for Django 1.9.7 eventually getting installed as part of the dependency chain.

Anyway, just wanted to let someone know that the install script needs to be fixed.

gl...@remote-shell.net

unread,
Jun 23, 2016, 2:01:40 PM6/23/16
to CDR-Stats
Hello,

Issue already opened on github and multiples subjects about that on the google group. It always has been a pain in my experience to install cdr-stats anyway, which is a little bit sad knowing that it can do some
good work but that blocks large adoption...

https://github.com/cdr-stats/cdr-stats/issues/43

Good luck :)

Areski

unread,
Jun 24, 2016, 11:15:07 AM6/24/16
to cdr-...@googlegroups.com
I just pushed a new release which solve the issue, the issue was related to some changes on one dependencie admin-tools which broke the install.

@gled@remove-shell, I would advice you to complain as much as you are willing to help, the code is open source and anyone can step in and try to solve a problem.
It's a complex platform, which depends of a lot of external packages, unfortunately it's impossible to control external packages although a good practice is to limit the use of them.

--
You received this message because you are subscribed to the Google Groups "CDR-Stats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cdr-stats+...@googlegroups.com.
To post to this group, send email to cdr-...@googlegroups.com.
Visit this group at https://groups.google.com/group/cdr-stats.
For more options, visit https://groups.google.com/d/optout.



--
Kind regards,
/Areski

----
Arezqui Belaid
Founder at Star2Billing (www.star2billing.com)
& Newfies-Dialer (www.newfies-dialer.org)

Tel: +34650784355
Twitter: http://twitter.com/areskib
LinkedIn: http://www.linkedin.com/in/areski

gl...@remote-shell.net

unread,
Jun 24, 2016, 2:54:38 PM6/24/16
to CDR-Stats
Hi Areski,

Sorry to report that it's still broken on a fresh Debian Jessie or Wheezie ( and btw, I was just saying that it's always quite a mess to install given all the dependencies, and the process is not seamless, just a hint for improvement, if you fell offended, that was not the intent at all ).

Attached is a Dockerfile you can use to check the installation process on a fresh install ( "docker build -t gled-rs/cdr-stats ." in the dir you have the Dockerfile and scripts, then "docker run -d --name cdr-stats -P gled-rs/cdr-stats" & finally "docker exec -ti cdr-stats bash" to enter the container and launch /usr/src/install-cdr-stats.sh manually, eventually, this would be also automated ).

Here is the things I found so far:

The activation of the virtualenv does not work:
  cdr-stats-functions.sh: line 272: /opt/miniconda/envs/cdr-stats/bin/activate: No such file or directory

Nodejs is installed twice: one from the debian repo ( along with nodejs-legacy ) and one from nodejs repo ( that removes the previously installed nodejs-legacy ). Is it intentional ?

During setup of django dependencies, we want django 1.7.7 but
  Collecting Django>=1.9 (from django-dajaxice-ng>=0.5.6.4->django-dajax-ng==0.9.4)
which results in
  ImportError: cannot import name memoize

At the end of the script deactivate does not work either:
  Error: deactivate must be sourced. Run 'source deactivate'
  instead of 'deactivate'.

I've corrected some of these issues in the install scripts attached ( do you prefer a PR ? ) and I am now going through the dependencies nightmare to get Django 1.7.7 to stay.

Best,

Gled.

PS: the paxctl bit is needed only on grsec kernels, and the goal of this DockerFile is to allow people to easily get a preview of cdr-stats by publishing a container ready to ship.
Dockerfile
install-cdr-stats.sh
cdr-stats-functions.sh

gl...@remote-shell.net

unread,
Jun 24, 2016, 3:20:14 PM6/24/16
to CDR-Stats
And here is the patch solving that last dependancie issue:

index f2a2665..4dca495 100644
--- a/requirements/django.txt
+++ b/requirements/django.txt
@@ -8,8 +8,8 @@ django-jsonfield==0.9.13
 django-countries==2.1.2
 git+http://github.com/cdr-stats/django-pagination.git
 django-admin-tools==0.7.2
+django-dajaxice-ng==0.5.6.4
 django-dajax-ng==0.9.4
-django-dajaxice-ng==0.7.0.1
 django-country-dialcode==0.6.3
 django-import-export==0.2.8
 django-cache-machine==0.9.1

Areski

unread,
Jun 27, 2016, 10:23:21 AM6/27/16
to cdr-...@googlegroups.com
Hi,

V3.1.3 released, big thanks to Tristan <gl...@remote-shell.net> for fixing the last issues.

Gregory Tsintaris

unread,
Aug 9, 2016, 1:41:18 AM8/9/16
to CDR-Stats
Hello all still the same issue using latest script on fresh debian 8.5 x64. Can access the default url but on the 8008 port I get error 404.
Message has been deleted

Wade Weppler

unread,
Sep 28, 2016, 10:17:52 AM9/28/16
to CDR-Stats
Same issue here with a fresh install of Debian 8.6

Nasir Bashir

unread,
Nov 15, 2017, 11:44:33 AM11/15/17
to CDR-Stats
Hi,

Can someone please help to guide the 404 error. Also, the script doesn't ask for any username/password. Do we need to run the script via root or a regular user?

Phillip Lewis

unread,
Dec 15, 2017, 4:38:59 PM12/15/17
to CDR-Stats
+1 for still occurring on latest Debian 8 build minimal install.
Reply all
Reply to author
Forward
0 new messages