I am trying to install sagemath package in my macbook. I entered
./configure followed by make. Here are the last few
lines of output. Couldn't debug the cause.
[sagelib-8.7] Finished cleaning, time: 0.40 seconds.
[sagelib-8.7] if [ "$UNAME" = "CYGWIN" ]; then \
[sagelib-8.7] sage-rebase.sh "$SAGE_LOCAL" 2>/dev/null; \
[sagelib-8.7] fi
[sagelib-8.7]
[sagelib-8.7] real 19m37.851s
[sagelib-8.7] user 59m16.416s
[sagelib-8.7] sys 2m58.759s
cp /Users/satya/Downloads/SageMath/src/bin/sage-env-config /Users/satya/Downloads/SageMath/local/bin/sage-env-config
cd ../.. && sage-logger -p './sage --docbuild --no-pdf-links all html ' logs/dochtml.log
[dochtml] Traceback (most recent call last):
[dochtml] File "/Users/satya/Downloads/SageMath/local/lib/python2.7/runpy.py", line 163, in _run_module_as_main
[dochtml] mod_name, _Error)
[dochtml] File "/Users/satya/Downloads/SageMath/local/lib/python2.7/runpy.py", line 111, in _get_module_details
[dochtml] __import__(mod_name) # Do not catch exceptions initializing package
[dochtml] File "/Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py", line 60, in <module>
[dochtml] import sage.all
[dochtml] File "/Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/all.py", line 98, in <module>
[dochtml] from sage.symbolic.all import *
[dochtml] File "/Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/symbolic/all.py", line 3, in <module>
[dochtml] from sage.libs.pynac.pynac import I
[dochtml] File "sage/symbolic/expression.pxd", line 4, in init sage.libs.pynac.pynac (build/cythonized/sage/libs/pynac/pynac.cpp:30147)
[dochtml] File "sage/symbolic/expression.pyx", line 161, in init sage.symbolic.expression (build/cythonized/sage/symbolic/expression.cpp:74075)
[dochtml] ImportError: dlopen(/Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/symbolic/ring.so, 2): Symbol not found: __ZNSt3__16vectorIN5GiNaC2exENS_9allocatorIS2_EEE11__vallocateEm
[dochtml] Referenced from: /Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/symbolic/ring.so
[dochtml] Expected in: flat namespace
[dochtml] in /Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/symbolic/ring.so
make[3]: *** [doc-html] Error 1
make[2]: *** [all-start] Error 2
real 19m41.468s
user 59m18.862s
sys 3m0.256s
***************************************************************
Error building Sage.
The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):
The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.
make[1]: *** [all-start] Error 1
make: *** [all] Error 2
Any help would be appreciated.
Running make for SageMath proceeds in two steps: make build
followed by make doc.
In your case, the make build phase seems to have completed,
and there was an issue only in the make doc phase.
This means you probably already have a functional SageMath,
with the drawback that the documentation failed to build.
So you might decide to try and use it as is.
Following #John Palmieri, I would recommend posting to sage-devel
or sage-support to get help debugging the make failure. It will
be useful to specify the operating system on which it occurred
(what version of macOS), if the buid was started from a directory
obtained by git clone or from a source tarball, what exact
sequence of operations were run.
Also, on your next attempt, you might want to move the SageMath
folder out of the Downloads folder before you run make, since
a Sage installation cannot be moved after it has been started once
(if Sage is moved, one has to run make again before it can be used).
Building off Samuel's answer, a different thing you might want to try is simply to run make doc-clean and then make doc again. I have found that (on Mac) there is sometimes a weird burp I can never track down, and this usually gets past it.
Related
I'm on Windows 10 and working in a git-bash terminal with anaconda environment. When I open a new terminal, I'm immediately presented with:
Error processing line 1 of C:\Users\e360769\AppData\Local\miniforge3\lib\site-packages\distutils-precedence.pth:
Traceback (most recent call last):
File "C:\Users\e360769\AppData\Local\miniforge3\lib\site.py", line 169, in addpackage
exec(line)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named '_distutils_hack'
Remainder of file ignored
This same error comes up any time I run "pip" or "python" on the command line. The command still executes correctly, but only after displaying that error. Note that this started after installing a collection of packages needed for a project I'm working with, and after investigating I found some people attributed this to the setuptools package (I have v41.2.0), but even when I uninstall it, the issue persists. Also note that this is the contents of my distutils-precedence.pth file:
import os; var = 'SETUPTOOLS_USE_DISTUTILS'; enabled = os.environ.get(var, 'local') == 'local'; enabled and __import__('_distutils_hack').add_shim();
I'm not sure this is actively (for now) causing any issues with executing my python scripts, etc., but I'd like to know what's going on and how to fix this. Would appreciate any help!
I have the edx-platform, ecommerce, ecommerce-themes, credentials and edx-theme directories. I have installed successfully tutor and devstack but I didn't find the way to replace these custom directories. So, what is the correct way to replace them ?
After devstack runned successfully, I tried replacing the default directories with the custom ones but when I runned make dev.provision I get this output
+ docker-compose exec -T lms bash -e -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && NO_PYTHON_UNINSTALL=1 paver install_prereqs'
/edx/app/edxapp/edxapp_env: line 13: manpath: command not found
---> pavelib.prereqs.install_prereqs
---> pavelib.prereqs.install_node_prereqs
npm install error detected. Retrying...
Captured Task Output:
---------------------
---> pavelib.prereqs.install_prereqs
---> pavelib.prereqs.install_node_prereqs
Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/paver/tasks.py", line 201, in _run_task
return do_task()
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/paver/tasks.py", line 198, in do_task
return func(**kw)
File "/edx/app/edxapp/edx-platform/pavelib/utils/timer.py", line 40, in timed
return wrapped(*args, **kwargs)
File "/edx/app/edxapp/edx-platform/pavelib/prereqs.py", line 332, in install_prereqs
install_node_prereqs()
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/paver/tasks.py", line 333, in __call__
retval = environment._run_task(self.name, self.needs, self.func)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/paver/tasks.py", line 219, in _run_task
return do_task()
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/paver/tasks.py", line 198, in do_task
return func(**kw)
File "/edx/app/edxapp/edx-platform/pavelib/utils/timer.py", line 40, in timed
return wrapped(*args, **kwargs)
File "/edx/app/edxapp/edx-platform/pavelib/prereqs.py", line 184, in install_node_prereqs
prereq_cache("Node prereqs", ["package.json"], node_prereqs_installation)
File "/edx/app/edxapp/edx-platform/pavelib/prereqs.py", line 111, in prereq_cache
install_func()
File "/edx/app/edxapp/edx-platform/pavelib/prereqs.py", line 154, in node_prereqs_installation
raise Exception("npm install failed: See {}".format(npm_log_file_path))
Exception: npm install failed: See /edx/app/edxapp/edx-platform/test_root/log/npm-install.log
make[1]: *** [Makefile:217: impl-dev.provision] Error 1
make[1]: Leaving directory '/home/pablo/Documents/prueba/devstack'
Would you like to assist devstack development by sending anonymous usage metrics to edX? Run `make metrics-opt-in` to learn more!
make: *** [Makefile:221: dev.provision] Error 2
EDIT
The directories that I have after run make dev.provision and make dev.up with the default project of devstack, are the following ones:
Directories of default project devstack openedx
The thing that I tried was replace the default directories with the custom directories (open-edx-platform, ecommerce, ..., etc).
If you look at your log, you'll see the following error:
/edx/app/edxapp/edxapp_env: line 13: manpath: command not found
This suggests (guessing here!) you're missing man. So try installing it, e.g.:
apt install man
Others have reported similar kinds of errors when using nvm, e.g. see here
It seems the npm install is failing.
I don't know if you already have node & npm installed but you could try installing it, and see what the result is afterwards.
sudo apt update
sudo apt install nodejs npm
If you posted the npm log file, it would help a lot. You should be able to find it, per the source code, in the directory specified by the environment variable GEN_LOG_DIR:
{Env.GEN_LOG_DIR}/npm-install.log'
I have installed all necessary dependencies on CentOS and Python levels and have thougt I'm near the finish but this is what I have got at the end. And now I have no idea how to make it work.
Installed /tmp/easy_install-3f76uq1w/bob.blitz-2.0.13/.eggs/bob.extension-2.4.5-py3.4.egg
In file included from /usr/include/python3.4m/pyatomic.h:8:0,
from /usr/include/python3.4m/Python.h:53,
from /tmp/easy_install-3f76uq1w/bob.blitz-2.0.13/bob/blitz/include/bob.blitz/capi.h:24,
from /tmp/easy_install-3f76uq1w/bob.blitz-2.0.13/bob/blitz/include/bob.blitz/cppapi.h:12,
from bob/blitz/api.cpp:9:
/usr/include/python3.4m/dynamic_annotations.h:472:3: error: template with C linkage
template <class T>
^
Traceback (most recent call last):
File "/usr/lib64/python3.4/distutils/unixccompiler.py", line 126, in _compile
extra_postargs)
File "/usr/lib64/python3.4/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib64/python3.4/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib64/python3.4/distutils/spawn.py", line 162, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
It seems this error somewhere inside Python or its libs. And unfortunately I'm not so familiar with C, Linux and Python to fix it by myself. Also I haven't found any workaround in google.
Does workaround for this really exist?
I know about Anaconda and using Bob via its environment. But I need to cythonize my python app for calling it from C. And I'm not sure that it will work fine.
This might be too late to answer.
The version of gcc you are using might be old and does not support new C++ features.
Also about your concern on not using conda, you can use cython with a conda installation as well.
Please take a look at https://www.idiap.ch/software/bob/install for the latest instructions on how to install Bob.
When I run the fully_connected_feed.py code:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/mnist/fully_connected_feed.py
I get an error:
Traceback (most recent call last):
File "C:/Users/AppData/Local/Continuum/Anaconda3/Lib/site-packages/tensorflow/examples/tutorials/mnist/fully_connected_feed.py", line 277, in <module>
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
File "C:\Users\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "C:/Users/AppData/Local/Continuum/Anaconda3/Lib/site-packages/tensorflow/examples/tutorials/mnist/fully_connected_feed.py", line 222, in main
run_training()
File "C:/Users/AppData/Local/Continuum/Anaconda3/Lib/site-packages/tensorflow/examples/tutorials/mnist/fully_connected_feed.py", line 120, in run_training
data_sets = input_data.read_data_sets(FLAGS.input_data_dir, FLAGS.fake_data)
File "C:\Users\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py", line 211, in read_data_sets
SOURCE_URL + TRAIN_IMAGES)
File "C:\Users\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\base.py", line 142, in maybe_download
gfile.Copy(temp_file_name, filepath)
File "C:\Users\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 316, in copy
compat.as_bytes(oldpath), compat.as_bytes(newpath), overwrite, status)
File "C:\Users\AppData\Local\Continuum\Anaconda3\lib\contextlib.py", line 66, in __exit__
next(self.gen)
File "C:\Users\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 469, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.OutOfRangeError: Read fewer bytes than requested
How do I resolve this issue?
After doing the following, I was able to run the script without errors. The key for getting it to work for me, was the version of tensorflow installed has to match the tutorial code, otherwise there were exceptions. Although, I got a different exception than you, at first.
After installing tensorflow, check version. Details of this step may be different if you installed it pip or some other method:
$ conda list tensorflow
# packages in environment at /Users/agr/miniconda3/envs/tensorflow:
#
tensorflow 0.11.0 py35_0 conda-forge
Clone the git repo
$ git clone https://github.com/tensorflow/tensorflow.git
Inspect the tags available and checkout the release matching your install:
$ cd tensorflow
$ git tag -l -n1
...
$ git checkout v0.11.0
Run script!
$ cd examples/tutorials/mnist/
$ python fully_connected_feed.py
The key point being, run the script from here, not from the link you posted in the original question.
TL; DR
Something else is altering your files as you create them. Find the process and stop it.
Research
I've just run the demo with Windows 10, Python 3.5, tensorflow 0.12.0 with no errors. It is therefore something about your environment.
Looking at the actual line of the error, you are failing to read the required number of bytes from the open file. Going further up the stack you can see that CopyFile is actually trying to read all the bytes of a file into a string in this function. This starts by finding out the current file size and then trying to read all the bytes.
The problem is that the file size at the start of this process doesn't match the size by the end of the copy. In other words, something else has altered your file.
What next?
Your best bet is to try to find out what else is accessing your file. I suggest you use the techniques explained here to see what else has the file open as you are running the copy.
I encountered the same problem on Windows 2012 Server.
As suggested in the previous post, I downloaded and launched Process Monitor, then set the filter: "Path contains mnist" see the image. The datasets were downloaded and unpacked correctly, while running code both from Spyder and Jupyter.
I suspect that there is a race condition in the library code, i.e. missing synchronization between downloading and unpacking operations. As Process Monitor introduced additional delays, the datasets were sucessfully downloaded before the next operation started, hence the hazardous behavior was not observed.
I have a project folder that is a git repository (has a .git folder). When I use the command pip freeze, pip tries to use git. However, I don't have git installed on my system so this causes an error:
(env) PS C:\Users\eclaird\work\myproject> pip freeze
Cannot find command 'git'
Storing complete log in C:\Users\eclaird\pip\pip.log
(env) PS C:\Users\eclaird\work\myproject>
pip.log:
------------------------------------------------------------
C:\Users\eclaird\work\env\Scripts\pip-script.py run on 01/09/14 11:54:42
Cannot find command 'git'
Exception information:
Traceback (most recent call last):
File "C:\Users\eclaird\work\env\lib\site-packages\pip\basecommand.py", line 134, in main
status = self.run(options, args)
File "C:\Users\eclaird\work\env\lib\site-packages\pip\commands\freeze.py", line 73, in run
req = pip.FrozenRequirement.from_dist(dist, dependency_links, find_tags=find_tags)
File "C:\Users\eclaird\work\env\lib\site-packages\pip\__init__.py", line 180, in from_dist
req = get_src_requirement(dist, location, find_tags)
File "C:\Users\eclaird\work\env\lib\site-packages\pip\vcs\__init__.py", line 249, in get_src_requirement
return version_control().get_src_requirement(dist, location, find_tags)
File "C:\Users\eclaird\work\env\lib\site-packages\pip\vcs\git.py", line 151, in get_src_requirement
repo = self.get_url(location)
File "C:\Users\eclaird\work\env\lib\site-packages\pip\vcs\git.py", line 122, in get_url
[self.cmd, 'config', 'remote.origin.url'],
File "C:\Users\eclaird\work\env\lib\site-packages\pip\vcs\__init__.py", line 110, in cmd
command = find_command(self.name)
File "C:\Users\eclaird\work\env\lib\site-packages\pip\util.py", line 108, in find_command
raise BadCommand('Cannot find command %r' % cmd)
BadCommand: Cannot find command 'git'
Is there a way to disable the git integration in pip?
(pip 1.4.1,
Python 2.7.6)
Unfortunately, no. There is no config option to enable/disable backends.
Details, found by digging in the code:
Git module is always registered: In pip/install.py, the git module is imported. At the end of it, it registers itself, and will thus be queried whenever one of the schemes declared in ´git.Git´ matches the url of the dependency.
schemes = ('git', 'git+http', 'git+https', 'git+ssh', 'git+git', 'git+file')
Exception is not handled Funnily, freezing anticipates that an error might occur when determining the dependency url to be frozen. Excerpt from pip.FrozenRequirement:
try:
req = get_src_requirement(dist, location, find_tags)
except InstallationError:
logger.warn("Error when trying to get requirement for VCS system %s, falling back to uneditable format" % ex)
InstallationError inherits from PipError. Unfortunately, an exception of type ´BadCommand´ is raised, which inherits from ´PipError´.
So, aside from hacking the source: Nothing you can do. If you need this to work, you need to install git, hack the source, or simulate a git executable. If you go for the latter, for starters you need to fake ´git config remote.origin.url´, which is called (and fails) in pip.vcs.git.Git.get_url.
Hope that helps, even though it's not a yes. ;)