Installation: activate_this.py "No such file"

2,208 views
Skip to first unread message

Peter STOTT

unread,
Mar 29, 2014, 4:19:02 PM3/29/14
to arches...@googlegroups.com
Friends --
As a novice, I was pleased that I have been able to get as far as I have, through installing PostgreSQL, GEOS, Python and the JDK. But I am now stumped by an error message running the bat file in archesproject/install, install_dependencies.bat (as well as install.py). 

Below is the error message. The directory "virtualenv" does not have a subdirectory "ENV" so I assume the directory and scripts are created on the fly?  This seems to be a command in the file virtualenv.py, but I am a little lost on how to troubleshoot this..

python: can't open file 'C:\Program': [Errno 2] No such file or directory
Traceback (most recent call last):
  File "C:\Program Files\arches-web\archesproject\install\install.py", line 48, in <module>
    execfile(activate_this, dict(__file__=activate_this))
IOError: [Errno 2] No such file or directory: 'C:\\Program Files\\arches-web\\archesproject\\virtualenv\\ENV\\Scripts\\activate_this.py'


Any help would be much appreciated.

Thanks

Peter Stott

Alexei Peters

unread,
Mar 31, 2014, 2:42:20 PM3/31/14
to Peter STOTT, arches...@googlegroups.com
Hi Peter,
Welcome to the Arches project.

The "ENV" directory should be created as part of running install_dependencies.bat
Are you sure there were no other errors when running that file?
Can you send an output of running that script?

Cheers,
Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


--
-- To post, send email to arches...@googlegroups.com. To unsubscribe, send email to archesprojec...@googlegroups.com. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en
---
You received this message because you are subscribed to the Google Groups "Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to archesprojec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexei Peters

unread,
Apr 1, 2014, 12:56:47 AM4/1/14
to Peter STOTT, arches...@googlegroups.com
Hi Peter,
Fyi, when responding to emails use "reply all" as we want the community to be able to benefit from anything learned in these email threads.

So, there isn't any more output then you've see already.  The ENV folder is indeed created dynamically.  Have you tried just double-clicking on the .bat file to run it?
Also, when you ran it from the command line, did you "cd" into the install folder?

I've actually never seen this issue before.  Could it be permissions?  Obviously the system will need to be able to create directories and run/execute scripts.

Let me know if I can help more.
Cheers,
Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


On Mon, Mar 31, 2014 at 12:20 PM, Peter STOTT <ph.s...@gmail.com> wrote:
Alexi --
As far as I know, that was all there was to the error message. I tried running the install.py by itself, and got the same message. I ran the bat and py files from the command prompt, and the error message arrived on the same screen. Is there a log file somewhere that would have a more extended output?

Peter
--
    Peter H. Stott
    7 Ocean View Drive, #108
    Dorchester, MA 02125-3565
    Tel: +1 (617) 877-4721 (cell/mob)
    Tel: +1 (617) 297-2395 (Skype incoming)
    Fax: +1 (617) 507-6450
   
    Skype: phstott
    E-mail:   ph.s...@gmail.com

Peter STOTT

unread,
Apr 1, 2014, 7:18:35 AM4/1/14
to Alexei Peters, arches...@googlegroups.com
Thanks, Alexi. My mistake (for not replying all). 

Double-clicking the .bat file does nothing (I assume it also produces the error message). And yes, I ran the command line file from within the inslall directory.

But yes, it COULD be a permissions issue. When I bought the laptop (a 64-bit system)  three months ago, I had the store replace Windows 8 with Windows 7. And occasionally, I have permissions issues and sometimes have had to run install programs "as administrator."  But running the .bat file as administrator doesn't produce a different result.  

But I have checked and already made sure that all subdirectories within archesproject are fully accessible.  Are there directories OUTSIDE of archesproject I should also check?  

Peter

Alexei Peters

unread,
Apr 1, 2014, 1:37:08 PM4/1/14
to Peter STOTT, arches...@googlegroups.com
Hi Peter,
Maybe we can try to run this manually which may give us some better errors.

Try this:

CD to the virtualenv directory and run the following command:

python virtualenv.py ENV

If that ran successfully, then you should have an "ENV" folder under the "virtualenv" directory.
If that works you could try re-running the install_dependencies.bat file again, or if you're really adventurous, you could run the remaining commands in the install.py file (starting from line 45).

Let me know if that works for you.
Cheers,
Alexei




Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


Peter STOTT

unread,
Apr 1, 2014, 4:27:08 PM4/1/14
to Alexei Peters, arches...@googlegroups.com
Alexi --

While I was home a few minutes ago, I ran virtualenv.py, as you suggested. It did run, and undoubtedly set set up some things, but there were a lot of "exceptions."  Not realizing at the time that it created a pip.log, I created a screen capture of the sequence, which I am attaching. I am back at work now, so I can't immediately check to see what was created - but perhaps you can tell from the log what might be missing. In the screen capture, I think I missed a line in the middle. (Let me know if that is critical for diagnosis./)

Peter


log.jpg

Alexei Peters

unread,
Apr 1, 2014, 5:10:50 PM4/1/14
to Peter STOTT, arches...@googlegroups.com
Hi Peter,
My guess is that this is because you're trying to install Arches in the "Program Files" directory.  My hint was this error: InvalidSchema: No connection adapters were found for 'c:\Program'

That space (in the directory name) may be causing a problem.  I've never tested installing arches there and I've seen issues with installing things there before.

Try moving the "arches-web" folder directly under the C drive.
Then re-run in the install_dependencies.bat file.

Let me know if that works.
Cheers,
Alexei




Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


Peter STOTT

unread,
Apr 1, 2014, 7:35:34 PM4/1/14
to Alexei Peters, arches...@googlegroups.com
Alexi --

That worked.  So I was able to run install_dependencies.bat, and then runserver.bat. From archesproject/build I then tried to run install_arches_db.bat

... and got the attached error.  Import error: cannot import name GEOSException.  etc.

Peter
install_arches_db.bat..jpg

Alexei Peters

unread,
Apr 2, 2014, 2:08:08 PM4/2/14
to Peter STOTT, arches...@googlegroups.com
Hi Peter,
Have you added this to your settings.py file:

GDAL_LIBRARY_PATH = “C:/OSGeo4W/bin/gdalxxx.dll” #<– make sure this path is correct and points to the actual dll, note the forward slashess

Page 6 of the docs has a little more information about this.
Cheers,
Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


Peter STOTT

unread,
Apr 2, 2014, 9:59:01 PM4/2/14
to Alexei Peters, arches...@googlegroups.com
Alexi --
Thanks for this. I added 
GDAL_LIBRARY_PATH = "C:/OSGeo4W/bin/gdal110.dll"
to the settings.py file. Does it matter where in the file? I added it to a new line 54, after ROOT_DIR.
Should there have also been a "#" sign ?

I had followed p.6 of the docs, but as I hadn't seen the 'GEOMETRY_BACKEND error, I hadn't at first tried to add the path. I also looked at the djagno docs reference to the GDAL_LIBRARY_PATH, but didn't see much help there.

But the sum result of adding the path as above was that there was no change. I got the same error message. I am attaching the full screen shot.

Peter  
install_arches_db.bat..jpg

Alexei Peters

unread,
Apr 3, 2014, 7:16:04 PM4/3/14
to Peter STOTT, arches...@googlegroups.com
HI Peter,
Have you added this to your system path?

"C:\OSGeo4W\bin"

Cheers,
Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


Peter STOTT

unread,
Apr 3, 2014, 8:19:36 PM4/3/14
to Alexei Peters, arches...@googlegroups.com
Yes. The tail end of my system path is:

C:\Program Files\PostgreSQL\9.3\bin;C:\Program Files\PostgreSQL\9.3\lib;C:\OSGeo4W\bin;C:\Python27\;C:\Python27\Scripts

Peter

Alexei Peters

unread,
Apr 4, 2014, 12:32:44 AM4/4/14
to Peter STOTT, arches...@googlegroups.com
Hi Peter,
I just realized that you're on a 64 bit system.  It looks like you downloaded the 32 bit version of OSGeo4W.
Also, you should confirm that you have the 64 bit version of Python installed as well.  You'll then need to update you system PATH and GDAL_LIBRARY_PATH variable once you do that.
Cheers,
Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


Peter STOTT

unread,
Apr 4, 2014, 6:58:42 AM4/4/14
to Alexei Peters, arches...@googlegroups.com
Alexei --

Well, that was the solution (so far!).  I HAD downloaded the 64-bit version of OSGeo4W (and Python), but I didn't notice that the directory was not the file name, but "OSGeo4W64" so when I added it to the PATH, and to the settings file, I took the installation manual literally, and wrote OSGeo4W/ and not OSGeo4W64 !  I have now changed both, and run install_arches_db.bat again (it worked, I think); and then build.bat.

That took me through "minification."

However, I am now at the "confirm" stage. When I typed http://localhost:8000/Arches/index.htm I got a "webpage not available" message (in Chrome).

Where should I look for this?  Is there a log file somewhere?

Peter

Alexei Peters

unread,
Apr 4, 2014, 12:44:47 PM4/4/14
to Peter STOTT, arches...@googlegroups.com
Hi Peter,
That's great. I'm glad we got that straightened out.

To use the site you'll need to run the runserver.bat file.  That should open 2 windows.  1 is for the built-in django server, the other for the Elasticsearch engine.

Once those are running, then you should be able to hit that url:http://localhost:8000/Arches/index.htm

FYI, their won't be much to see until you load a package.  The CDS package is available from the archesproject.org download page, here.

Cheers,
Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


Peter STOTT

unread,
Apr 4, 2014, 9:22:55 PM4/4/14
to Alexei Peters, arches...@googlegroups.com
Alexei, thanks for all your help. I AM making progress!  Running runserver.bat in the background, I did get Arches up and running. Hurrah!

I was less successful in installing the CDS package. Log attached. "No connection could be made because the target machine actively refused it."  Or should runserver.bat have been still running in the background?

Ignoring the error message, restarting runserver.bat and Arches, left me with Arches continually trying to initialize, but not succeeding. It appears that the CDS package installation is incomplete. 

What have I left out?  (Yes, I did add 'cds', to the INSTALLED_PACKAGES setting in settings.py)

Peter


install_packages.bat.jpg

Alexei Peters

unread,
Apr 4, 2014, 11:58:46 PM4/4/14
to Peter STOTT, arches...@googlegroups.com
Hi Peter,
Can you confirm the steps you took to install the cds package?
Thanks,
Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


Peter STOTT

unread,
Apr 5, 2014, 8:47:54 AM4/5/14
to Alexei Peters, arches...@googlegroups.com
From http://archesproject.org/downloads/ I chose the CDS "Stable version" - "latest official version" 1.0.0 from https://bitbucket.org/arches/cds/get/1.0.0.zip  

I unzipped arches-cds-82aea6bc1a54.zip to my desktop, and then copied the entire contents to the newly created directory archesproject/packages/cds. (I then trashed the zipped file.)
Using Notepad++ , I added 'cds', to archesproject/settings.py as below:  
INSTALLED_PACKAGES = (
    # entries here should correspond to folders within the packages directory
'cds',
)

As I DID plan to use the test data, I did NOT modify the LOAD_TEST_DATA line

From the command window, in archesproject/build I then ran install_packages.bat ... with the results that I sent last night.

Peter

Alexei Peters

unread,
Apr 7, 2014, 1:06:24 PM4/7/14
to Peter STOTT, arches...@googlegroups.com
Hi Peter,
It looks like you did everything correctly when installing the cds package.  We're probably just overlooking something obvious.

When running install_packages.bat, you need to have runserver.bat going (also leave up the other window that opens when running runserver.bat, that other window is running elasticsearch, which uses port 9200.  The error message seemed to reference that port, so maybe that window was closed).
After running runserver.bat, re-run install_archesdb.bat and install_packages.bat.

That should do it.
Cheers,
Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173


Peter STOTT

unread,
Apr 7, 2014, 7:19:18 PM4/7/14
to Alexei Peters, arches...@googlegroups.com
Alexei --
I was not running runserver.bat when I ran install_packages.bat (I wasn't sure if I could have THREE command windows open!) -- so that was clearly the error the first time around. But I have just run install_packages.bat with runserver.bat running -- but I THINK I may need to remove or uninstall something that was installed the first time I ran it?  I am getting a "duplicate key value" error message, and several entities that seem to already exist. (see attached log)

By the way, I am advised to quit the command windows with CONTRL-BREAK. I have no "BREAK" on my laptop so have been using CTR-C. I assume that is acceptable?

Thanks for all your help and support.

Peter
install_packages.bat-error.jpg
Reply all
Reply to author
Forward
0 new messages