PyCall fails to build in julia under Linuxmint 17.2 - matplotlib

Trying out julia-0.4 in Linuxmint 17.2, from the live disk. Installed it ok, added the ODE package ok and used it, tried to add PyPlot but it fails, even after suggested check and rebuild:
julia> Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: No packages to install, update or remove
julia> Pkg.build("PyCall")
INFO: Building PyCall
INFO: Recompiling stale cache file /home/mint/.julia/lib/v0.4/Conda.ji for module Conda.
WARNING: Module BinDeps uuid did not match cache file
WARNING: deserialization checks failed while attempting to load cache from /home/mint/.julia/lib/v0.4/Conda.ji
INFO: Precompiling module Conda...
INFO: Recompiling stale cache file /home/mint/.julia/lib/v0.4/Conda.ji for module Conda.
WARNING: Module BinDeps uuid did not match cache file
===============================[ ERROR: PyCall ]================================
LoadError: __precompile__(true) but require failed to create a precompiled cache file
while loading /home/mint/.julia/v0.4/PyCall/deps/build.jl, in expression starting on line 12
================================================================================
================================[ BUILD ERRORS ]================================
WARNING: PyCall had build errors.
- packages with build errors remain installed in /home/mint/.julia/v0.4
- build the package(s) and all dependencies with `Pkg.build("PyCall")`
- build a single package by running its `deps/build.jl` script
================================================================================

Related

lpdf luarocks dependency installation external dependency error

I want to use lpdf dependency in the luarocks. When I am trying to install it using rockspec file following error has occurred .
lpdf - https://luarocks.org/modules/tomasguisasola/lpdf/20130702.51-1
Error: Failed installing dependency: https://luarocks.org/lpdf-20130702.51-1.src.rock
- Could not find header file for PDFLIB
No file pdflib.h in /usr/local/include
No file pdflib.h in /usr/include
No file pdflib.h in /include
You may have to install PDFLIB in your system and/or pass PDFLIB_DIR or PDFLIB_INCDIR
to the luarocks command.
Example: luarocks install lpdf PDFLIB_DIR=/usr/local
Makefile:110: recipe for target 'install' failed
make: *** [install] Error 1
I want to install in on a docker container. Can anyone share an idea on this?

Podfile install failed - Can't find node modules

Command `pod install` failed.
└─ Cause: Invalid `Podfile` file: cannot load such file -- ./scripts/autolinking.
# from /Users/developer/Documents/Project1/ios/Podfile:1
-------------------------------------------
> require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
# require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
-------------------------------------------
sh: node: command not found
I've been trying to figure this out all day and still can't figure out what the issue is. I've got node in my paths so it can find the command.
I figured out if I were to change the first require line to File.join('node_modules/expo/scripts/autolinking') it manages to execute, however then it throws the same issue for a file within the node modules, which i can't go through and change all the node_modules manually.
Does anyone know why this is happening?
On Mac M1
Install CocoaPod from HomeBrew to your terminal in the project folder or globally
Delete existing Podfile if any .
If none, good dont worry
run pod init
This will create a new Podfile
Then in ios folder run pod install or npx pod-install
if you get errors below, you probably have wrong .env
ERROR: SyntaxError: JSON Parse error: Unexpected identifier "undefined"
ERROR: Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.`
Hope this helps :)

log4js fs dependency error

I am trying to integrate the latest version of log4js (techically log4js-node but it seems log4js is now used for the latter) into a React Native project. I installed the package using Yarn 1.0.2 and wrote a few lines of code just to test the concept of configuring a logger and seeing some logs. When I tried to start the React Native packager and open the app in my emulator, I got the following exception:
error: bundling failed: Error: Unable to resolve module 'fs' from 'C:\path_to_project\node_modules\log4js\lib\log4js.js': Module 'fs' does not exist in the Haste module map
I looked at the above file and noticed that there is a variable that depends on the fs package. I installed the fs package and tried again, but got this error:
error: bundling failed: Error: While trying to resolve module 'fs' from file 'C:\path_to_project\node_modules\log4js\lib\log4js.js', the package 'C:\path_to_project\node_modules\fs\package.json' was successfully found. However, this package itself specifies a 'main' module field that could not be resolved ('C:\path_to_project\node_modules\fs\index'). Indeed, none of these files exist:
* ‘C:\path_to_project\node_modules\fs\index.js(.native||.android.js|.native.js|.js|.android.json|.native.json|.json)’
* ‘C:\path_to_project\node_modules\fs\index.js\index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json)’
at ResolutionRequest.resolveDependency (C:\path_to_project\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:103:15)
at DependencyGraph.resolveDependency (C:\path_to_project\node_modules\metro\src\node-haste\DependencyGraph.js:272:4579)
at dependencies.map.relativePath (C:\path_to_project\node_modules\metro\src\DeltaBundler\traverseDependencies.js:376:19)
at Array.map (native)
at resolveDependencies (C:\path_to_project\node_modules\metro\src\DeltaBundler\traverseDependencies.js:374:16)
at C:\path_to_project\node_modules\metro\src\DeltaBundler\traverseDependencies.js:212:33
at Generator.next (<anonymous>)
at step (C:\path_to_project\node_modules\metro\src\DeltaBundler\traverseDependencies.js:297:313)
at C:\path_to_project\node_modules\metro\src\DeltaBundler\traverseDependencies.js:297:473
I am aware that the fs package is not currently in use but if that's the case, how is the log4js package being used? It seems to be regularly updated, looking at its Github repository.
I noticed that when I do install fs, I get the graceful-fs package in my node_modules folder instead. (but in package.json I see the fs package, not graceful-fs)
As well as doing the above, I tried cleaning Gradle, installing graceful-fs explicitly and installing react-native-fs but all these things made no difference.

how to install tensorflow serving offline

My server is in my company network which disconnected to the internet. I can only downloads the required files in other office computer and upload them.
I git clone
git clone --recurse-submodules https://github.com/tensorflow/serving
cd serving
cd tensorflow
./configure cd ..
Configuration is ok as the default advices.
But when I want to bazel the repository.
[root#centos7 /data/mig_predictor/pre_installation/serving]# bazel build -c opt ... --package_path /data/mig_predictor/pre_installation .........
```
ERROR: error loading package 'serving/tensorflow/tensorflow/tools/pip_package': Extension file not found. Unable to load package for '//tensorflow/core:platform/default/build_config_root.bzl': BUILD file not found on package path. ERROR: error loading package 'serving/tensorflow/tensorflow/tools/pip_package': Extension file not found. Unable to load package for '//tensorflow/core:platform/default/build_config_root.bzl': BUILD file not found on package path. INFO: Elapsed time: 0.481s
How can I pointed the local repository for the predownloaded packages?
Thank you!

Distributed tensorflow fails with "BUILD file not found on package"

When attempting to build in the core/distributed_runtime module using:
$ bazel build -c opt
//tensorflow/core/distributed_runtime/rpc:grpc_tensorflow_server
We get the following error:
ERROR: error loading package 'tensorflow/core/distributed_runtime/rpc':
Extension file not found. Unable to load package for
'//google/protobuf:protobuf.bzl': BUILD file not found on package path.
INFO: Elapsed time: 0.097s
Are there additional steps required (and not mentioned in the README.md) ?
This sounds like a git submodule issue—and it would affect building any part of TensorFlow from source. To recover, run the following command in your git repository:
$ git submodule update --init --recursive
(There are many other ways to do the same thing: see this question for some suggestions.)