On Tue, Feb 19, 2019 at 1:51 PM Andrew <andrew.mat...@gmail.com> wrote:
>
>
>
>> Do you mean that after installing Mojave you never again managed
>> to compile Sage? Do you still have a working version of Sage?
>> Which version is that?
>
>
> I no longer  have a working version of sage.
>>
>>
>> Have you tried installing the SageMath 8.6 binary for macOS from
>>
>>     http://www.sagemath.org/download-mac.html
>>
> I need the source distribution as  I am developing code (or at least I was...)
>>
>>
>> Have you re-installed XCode after installing macOS 10.14 Mojave?
>
> yes
>>
>>
>> What is the output of
>> ```
>> xcode-select --version
>
> As noted above I am running:
> ProductName:    Mac OS X
> ProductVersion:    10.14.2
> BuildVersion:    18C54
> Xcode 10.1
> Build version 10B61
> and have already installed xcode andthe system headers,
>
>
>> You could remove the pip tarball in case it is corrupted:
>> ```
>> rm /usr/local/src/sage/upstream/pip-18.1.tar.gz
>> rm -rf /usr/local/src/sage/local/var/tmp/sage/build/pip-18.1
>> ```
>> You could move the old build logs out of the way
>> ```
>> mv /usr/local/src/sage/logs /usr/local/src/sage/logs-old
>
>
> Good idea. Will try this.

Removing the old build logs wouldn't really do anything.  If anything,
it would be helpful to see your build logs for python3.

You might also try inspecting exactly what's going on when you try to
install the pip SPKG (and learn more about Sage's build process in so
doing).

The "pip" SPKG installs pip for both Python 2 and Python 3 (both of
which are dependencies of it, and should have been built and installed
into your $SAGE_LOCAL directory.

To start debugging this sort of thing I find it typically useful to be
in the Sage shell environment (so that environment variables like
$SAGE_ROOT and $SAGE_LOCAL are set, as well as having $SAGE_LOCAL/bin
on my $PATH).  From the Sage source root run:

    $ ./sage -sh

Then you can `cd` into the build directory for the failed "pip" build like:

    $ pushd $SAGE_LOCAL/var/tmp/sage/build/pip-18.1

>From there, you can also `cd` into the src/ directory which should
contain the contents from the pip-18.1 tarball:

    $ cd src/

There should be a `src/pip/` directory in here containing the source
tree for the `pip` Python package itself.  We normally install pip by
having pip install itself (which it can do).  You can see how it does
this by looking at the spkg-install script:

    $ cat ../spkg-install

First we make absolute sure that directory containing the `pip`
package is first on our Python sys.path, so run (as in the
spkg-install):

    $ export PYTHONPATH=`cd src && pwd`

Then double-check that actually worked:

    $ echo $PYTHONPATH
    /home/embray/src/sagemath/sage/local/var/tmp/sage/build/pip-18.1/src/src

We can go one further then, and try running python3 and make sure its
sys.path is sensible:

    $ python3 -c 'import sys; print(sys.path)'
    ['', 
'/home/embray/src/sagemath/sage/local/var/tmp/sage/build/pip-18.1/src/src',
...]

After the current directory ('') it should list the directory we just
set PYTHONPATH to, followed by some others.  If not, then something is
definitely wrong.

Also try running:

    $ python3 -c 'import pip; print(pip)'
    <module 'pip' from
'/home/embray/src/sagemath/sage/local/var/tmp/sage/build/pip-18.0/src/src/pip/__init__.py'>

to actually see if you can import the 'pip' module, and if so, where
is it being imported from.

If you made it that far, then everything should just work, so I
suspect something is going wrong before then.  But if we go through
these steps we might get some useful hints, because otherwise I have
no idea.

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

Reply via email to