When I try to run a script in the .julia directory from the command line it fails, example below:
D:\MyProjects\Julia\.julia\v0.4\Mocha\tools>julia plot_statistics.jl
ERROR: could not open file d:\myprojects\julia\plot_statistics.jl
in include at boot.jl:261
in include_from_node1 at loading.jl:320
in process_options at client.jl:280
in _start at client.jl:378
D:\MyProjects\Julia\.julia\v0.4\Mocha\tools>julia "d:\MyProjects\Julia\.julia\v0.4\Mocha\tools\plot_statistics.jl"
ERROR: LoadError: ArgumentError: ArgParse not found in path
in require at loading.jl:249
in include at boot.jl:261
in include_from_node1 at loading.jl:320
in process_options at client.jl:280
in _start at client.jl:378
while loading d:\MyProjects\Julia\.julia\v0.4\Mocha\tools\plot_statistics.jl, in expression starting on line 2
Notice in the first attempt the error message is missing a significant portion of the path, everything from .julia on.
In the second attempt I try to give the full path, but Julia rejects that too.
Windows 10; Julia is on the path (e.g. julia enters the REPL); Julia ver. 0.4.5
Related
In my project, I am using tox with nosetests. Using PyCharm, my tox pipeline was passing completely including all the tests. When I execute tox on a Ubuntu18.04 container with python3, it gives me the following error:
ImportError: No module named 'my_project'
leading to the following error at the end:
ERROR: InvocationError for command /.tox/py36/bin/nosetests (exited with code 1)
my_project is the name of the module I am testing and the directory structure looks like this under /, the root dir from which I am executing tox:
my_project/
tests/
tox.ini
setup.cfg
other files
My tox.ini looks as follows:
[tox]
envlist = py36
[testenv]
commands = python3 setup.py build
nosetests
deps = -r{toxinidir}/test-requirements.txt
I have tried to provide the path to project in different ways to nosetests command but none of that works. One line that interests me is in the initial output of tox:
py36 installed: my_project # file:///.tox/.tmp/package/1/my_project-0.4.post52.dev256143400.zip,
which leads me to think if this is the reason that nosetests does not find my_project.
For details, the stack trace for the error is as follows:
ERROR: Failure: ImportError (No module named 'my_project')
Traceback (most recent call last):
File "/.tox/py36/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/.tox/py36/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/.tox/py36/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/.tox/py36/lib/python3.6/site-packages/nose/importer.py", line 79, in importFromDir
fh, filename, desc = find_module(part, path)
File "/usr/lib/python3.6/imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named 'my_project'
I see three possible offenders.
(1) python3 setup.py build should not exist in the commands section.
# the build command is redundant, there is a special option for this.
commands = python3 setup.py build
nosetests
# The install command with it's default
install_command=python -m pip install {opts} {packages}(ARGV)
deps = -r{toxinidir}/test-requirements.txt
(2) And with Pycharm you might have added your project as a sources root (right click folder > mark directory as > sources root). Or configured it otherwise (PATH variable perhaps?) that makes my_project available in context to running it in Pycharm? This should not happen inside tox though, unless you have whitelist externals or sitepackages turned to True..
So when installed on a container this link does not exist.
(3) I can't help but notice the abscence of a setup.py or pyproject.toml. Files used to install my_project. E.g. run this command locally and debug your installation if it doesn't work:
pip install .
Hello internet friends,
I am using the Julia Pro v.1.0.5-2 IDE to render animations for some Condensed Matter Physics data. When I attempt to run:
array = load("C:/Users/Kyle/Desktop/julia/data/Psi_L=89_W=0_0.01_500000-500/Psi_L=89_W=0_g=0.0_L^2.jld", "data")
#gif for i=1:7
array_2 = abs2.(array[i][:,:,1])
x=1:89
y=1:89
f(x,y) = array_2[x,y]
plot(x,y,f,st=:surface,camera=(0,30), title = "Wavefunction Density Animation, L=89, g=0, t = $(5*i)")
end
I get the following error:
[ Info: Precompiling GLM [38e38edf-8417-5370-95a0-9cbb8c7f171a]
ERROR: LoadError: No deps.jl file could be found. Please try running Pkg.bui
Currently, the build command might fail when Julia has been built from sourc
and the recommendation is to use the official binaries from julialang.org.
For more info see https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5.
ERROR: LoadError: LoadError: Failed to precompile Arpack [7d9fca2a-8960-54d3aPro_v1.0.5-2\compiled\v1.0\Arpack\X5VZL.ji.
in expression starting at C:\Users\Kyle\.juliapro\JuliaPro_v1.0.5-2\packages
in expression starting at C:\Users\Kyle\.juliapro\JuliaPro_v1.0.5-2\packages
ERROR: LoadError: Failed to precompile PDMats [90014a1f-27ba-587c-ab20-58faa-2\compiled\v1.0\PDMats\wuzEE.ji.
in expression starting at C:\Users\Kyle\.juliapro\JuliaPro_v1.0.5-2\packages
ERROR: LoadError: Failed to precompile Distributions [31c24e10-a181-5473-b8e_v1.0.5-2\compiled\v1.0\Distributions\xILW0.ji.
in expression starting at C:\Users\Kyle\.juliapro\JuliaPro_v1.0.5-2\packages
ERROR: LoadError: Failed to precompile GLM [38e38edf-8417-5370-95a0-9cbb8c7fcompiled\v1.0\GLM\6OREG.ji.
When I attempt to run:
Pkg.build("Arpack")
I get the following error:
Pkg.build("Arpack")
Building Arpack → `C:\Users\Kyle\.juliapro\JuliaPro_v1.0.5-2\packages\Arpa
┌ Error: Error building `Arpack`:
│ ┌ Warning: Platform `x86_64-w64-mingw32-libgfortran4` is not an officially
│ └ # BinaryProvider C:\Users\julia\AppData\Local\Julia-1.0.5\share\julia\st
It is important to mention that I had produced several animations with no problems with the same exact code. I stopped to go through some emails and when I tabbed back and ran the code with new parameters, it broke as I described. Furthermore, all the relevant packages are installed (except the ones that threw these errors) and "using [xpackage]" are sprinkled in appropriately.
Thanks for taking the time to read!
Unfortunately, Arpack >=0.3.2 is incompatible with JuliaPro 1.2.0-1. To work aound this issue, you can either ] add Arpack#0.3.1 or install JuliaPro version 1.2.0-2.
PHPUnit: 4.8.31
PhpStorm: 2016.1
I'm having issues running PHPUnit from within PhpStorm. From a CMD window, running the test works fine, but the PhpStorm output is this:
"C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php704vc14x86x161109103716\php.exe" C:/Users/username/AppData/Local/Temp/ide-phpunit.php --no-configuration "C:\tests"
Testing started at 5:30 PM ...
Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php704vc14x86x161109103716\ext\php_curl.dll' - The specified procedure could not be found.
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php704vc14x86x161109103716\ext\php_curl.dll' - The specified procedure could not be found.
Fatal error: Class 'PHPUnit_TextUI_ResultPrinter' not found in C:\Users\username\AppData\Local\Temp\ide-phpunit.php on line 253 in Unknown on line 0
PHP Fatal error: Class 'PHPUnit_TextUI_ResultPrinter' not found in C:\Users\username\AppData\Local\Temp\ide-phpunit.php on line 253
Process finished with exit code 255
I've included the folder with my phpunit.phar library in PhpStorm:
PhpStorm knows about the include paths, autocomplete works.
The run config looks like this:
The PHP version/install I'm using is the same one.
Windows:
PhpStorm:
Any ideas?
I tried running a script that uses curl from a CMD window and saw that the curl library wasn't loaded.
I did phpinfo(); and saw that the CMD window was using a different PHP installation (I had installed a new EasyPHP version).
I made the windows sys variable PATH point at my old one, then it started throwing some errors about not loading some libraries (php_curl.dll, libssh2.dll), so I moved them from the new install folder to the old one and to Windows\SysWOW64.
Miraculously, the PhpStorm run config was also fixed, which leads me to believe it doesn't use the interpreter I set in its options, but rather the one from PATH..
The PhpStorm output is now:
"C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php704vc14x86x161109103716\php.exe" C:/Users/username/AppData/Local/Temp/ide-phpunit.php --no-configuration "C:\tests"
Testing started at 9:22 AM ...
Warning: The use statement with non-compound name 'PHPUnit_Framework_TestCase' has no effect in C:\DummyTest.php on line 3
PHPUnit 4.8.31 by Sebastian Bergmann and contributors.
PHP Warning: The use statement with non-compound name 'PHPUnit_Framework_TestCase' has no effect in C:\DummyTest.php on line 3
No tests found in class "TestDummy".
Time: 372 ms, Memory: 10.00MB
FAILURES!
Tests: 1, Assertions: 0, Failures: 1.
Process finished with exit code 1
While I was attempting to use Requests in Julia, the following error was output:
julia> using Requests
INFO: Precompiling module Requests...
ERROR: LoadError: LoadError: error compiling version: could not load library "libz"
libz: cannot open shared object file: No such file or directory
while loading /home/michael/.julia/v0.4/Libz/src/lowlevel.jl, in expression starting on line 110
while loading /home/michael/.julia/v0.4/Libz/src/Libz.jl, in expression starting on line 11
ERROR: LoadError: Failed to precompile Libz to /home/michael/.julia/lib/v0.4/Libz.ji
while loading /home/michael/.julia/v0.4/Requests/src/Requests.jl, in expression starting on line 27
ERROR: Failed to precompile Requests to /home/michael/.julia/lib/v0.4/Requests.ji
in compilecache at ./loading.jl:400
I'm not knowledgeable enough in Julia to discern exactly what is happening, but here is the code from Libz.jl (line 11)...
include("lowlevel.jl")
...from lowlevel.jl (lines 103-110)...
# Functions
# ---------
function version()
return unsafe_string(ccall((:zlibVersion, zlib), Ptr{UInt8}, ()))
end
const zlib_version = version()
...and from Requests.jl (line 27)
using Libz
This problem has persisted after I've removed then reinstalled Libz, MbedTLS, and Requests, and after I've Pkg.update()'ed and restarted julia and my computer. Is anyone well enough versed in Julia to know how to fix this?
Per the comment by Gnimuc K and a tiny bit more research:
sudo apt-get install zlib1g-dev
installs zlib, which Julia needed. Once it was installed...
julia> Pkg.update()
julia> Pkg.build("Libz")
worked all the kinks out.
I get the following error when running NetSim v7.1 (from www.tetcos.com) via its command line interface. The input given is -
C:\Program Files\NetSim Standard\bin>NetSimCore.exe -apppath
C:\Program Files\NetSim Standard\bin -iopath
C:\Users\Sachin Kumar\AppData\Local\Temp\NetSim -license 5053#192.168.0.185
I/O warning:
failed to Load external entity C:\Users\Sachin "file:///C:\Users\Sachin/Configuration.xml"
I checked and the configuration file is present in the temp path (%temp%\NetSim)
Can someone please help?
Since the I/O path has white space, you should have it within double quotes. The correct way would be
C:\Program Files\NetSim Standard\bin>NetSimCore.exe -apppath ^
C:\Program Files\NetSim Standard\bin -iopath ^
"C:\Users\Sachin Kumar\AppData\Local\Temp\NetSim" -license 5053#192.168.0.185