Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Enthought 32 vs. 64 bit version

I want to execute the following command...

scrapy startproject resultScrapper

However, the following error shows up...

-bash: /Users/usrname/Library/Enthought/Canopy_64bit/User/bin/scrapy: /Users/usrname/Library/Enthought/Canopy_32bit/User/bin/python: bad interpreter: No such file or directory

which scrapy

/Users/usrname/Library/Enthought/Canopy_64bit/User/bin/scrapy

Here's $PATH

echo $PATH
/Users/usrname/Library/Enthought/Canopy_64bit/User/bin:/Users/usrname/Library/Enthought/Canopy_64bit/System/bin:/Users/usrname/Library/Enthought/Canopy_64bit/User/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin

I have deleted Canopy_32bit version...how is it still being referenced? $PATH does not contain a link to it either.

like image 407
babalu Avatar asked Sep 14 '26 06:09

babalu


1 Answers

I suspect that the interpreter is set incorrectly in the shebang line of the scrapy script.

If the output of

head -n1 /Users/usrname/Library/Enthought/Canopy_64bit/User/bin/scrapy

is

#! /Users/usrname/Library/Enthought/Canopy_32bit/User/bin/python

then you should change it to either

#! /usr/bin/env python

(more portable, but it may not call the python you want) or

#! /Users/usrname/Library/Enthought/Canopy_64bit/User/bin/python

(less portable, but forces the 64bit Enthought python; assuming that path is correct for your system)

More interesting is that a 64bit installation would link to the 32bit interpreter. There are a number of possible explanations, but the one I would worry about would be that there is some dependency that won't work on 64bit. For pure python (according to the website, Scrapy is), this shouldn't be a problem.

like image 102
Livius Avatar answered Sep 16 '26 19:09

Livius