Anaconda3 on a Windows 10 workstation Installation failure - python

Ok, dear friends, in the previous version of this message I had written "Despite my age (I'm almost 62 years!) I have had enough experience of programming in Pascal behind, but I'm an absolute novice in "Machine learning" and projecting Neural Networks in Python, as I would like. So, when I recently tried to download Anaconda3 4.2.0, Python version 3.5, and to install it in my Windows 10 Workstation, I received several error messages". I had obviously underestimated the effects of age ;-), because finally I realized I had to log in as Administrator, and launch the installation program from inside the "SysWOW64" directory. Now everything is Ok! Thank you everybody for your help!!!
P.S.: the error messages I received before to find the solution were: "unable to run mk_menus" & "unable to run mk_dirs" from _nsis.py file (in the Anaconda3/Lib directory) and "unable to add path Anaconda3 to Windows" from .cio-config.py (in the Anaconda3/pkgs directory).

Related

Workaround to successfully profile python script using scalene profiler on macOS? Just forget it and use machine with Windows or Linux?

Computational Science SE question How amenable is this 2D Frenkel–Kontorova-like energy minimization problem in Python to the use of a modest PC + GPU? (Heavy reliance on indexing) contains a short example script and note 3 links to my first attempt at profiling using scalene
The results were uninformative, so I followed a recommendation that I try the --profile-all option. After running for 30 minutes without finishing on a script that took seconds to run I added a CPU percent limit; what I assume means only things that used at least 2% of the CPU time would be profiled in depth.
scalene --html --outfile prof.html --profile-all --cpu-percent-threshold 2 myscript.py
I received a two line error and was exited from python in a normal way.
Error getting real path: 2
Scalene error: received signal SIGABRT
This issue was closed in scalene issue #110 and there are links there to
https://github.com/plasma-umass/scalene/commit/6636d95d7ea9a16adedaedbd4ff0926374798f2b
Q: How do I use Scalene with PyTorch?
A: Scalene works with PyTorch version 1.5.1. There's a bug in newer versions of PyTorch (https://github.com/pytorch/pytorch/issues/57185) that interferes with Scalene (discussion here: https://github.com/plasma-umass/scalene/issues/110).
there's more information there as well
and
Pytorch open issue #57185 Segmentation fault with ITIMER_REAL PyTorch throws SIGSEGV when running alongside timer on MacOS x86
Question: Is there a workaround to successfully profile python script using scalene profiler on macOS? Or should I just move to a machine with Windows or Linux and forget about trying for now?
The message, Error getting real path: 2, seems to have to do with scalene finding your script or a path internal to your script possibly.
Ensure you're referencing a full, valid path for myscript.py, taking into account which directory you're at in the terminal. You may need to change directory.
The SIGABRT message is different from the SIGSEGV issue listed, though, if you wanted to test it, you could uninstall PyTorch (pip uninstall torch) and reinstall a specific version (pip install 'torch==1.5.1').

xlwings 0.23.2 - Run-time error '53': File not found

I changed my conda system from anaconda to miniconda. Everything was working normally with anaconda but after the change xlwings stopped working.
Now I am getting the following error Run-time error '53': File not found.
On debugging through the VBA interface, I found that the routine was searching in the folder C:\Users\USERNAME\AppData\LocalTemp\ (not the project's folder) and coming up with a very long .log filename which changes each time I attempt to run it (eg. xlwings-374ABEE7-4C51-8622-AB5B-D42C5294C2B8.log)
Is this a bug which needs to be corrected? or have I done something incorrectly?
System: Windows 10; MS Office 365; xlwings ver: 0.23.2
I had a similar issue that drove me crazy.
After hours of debug and testing, I randomly click on the RunPython: Use UDF server checkbox and it worked

What is Killed:9 and how to fix in macOS Terminal?

I have a simple Python code for a machine learning project. I have a relatively big database of spontaneous speech. I started to train my speech model. Since it's a huge database I let it work overnight. In the morning I woke up and saw a mysterious
Killed: 9
line in my Terminal. Nothing else. There is no other error message or something to work with. The code run well for about 6 hours which is 75% of the whole process so I really don't understand whats went wrong.
What is Killed:9 and how to fix it? It's very frustrating to lose hours of computing time...
I'm on macOS Mojave beta if it's matter. Thank you in advance!
I faced this issue when I updated my Mac OS version from Catalina to Big Sur. I was trying to run a binary and facing the Killed: 9 issue.
I was able to resolve this issue by following the steps below (I referred to this Apple StackExchange post for these steps) :-
Download UPX via Homebrew - brew install upx
Then decompress the binary - upx -d /path/to/binary/file
Try to change the node version.
In my case, that helps.

Got errors, while running exe file built with pyinstaller and Google Cloud API integration in python

I am working one file python project.
I integrated google-cloud-API for realtime speech streaming and recognition.
It works with python aaa.py command well.
Now I need windows build file(.exe), so I used pyinstaller program and I got aaa.exe file successfully.
But I got this error while running speech streaming by using Google cloud API.
[Errno 2] No such file or directory:
'D:\AI\ai\dist\AAA\google\cloud\gapic\speech\v1\speech_client_config.json'
So I copied this speech_client_config.json file in needed path, after that I got below error again.
Exception in 'grpc._cython.cygrpc.ssl_roots_override_callback'
ignored E0511 01:13:14.320000000 3108
src/core/lib/security/security_connector/security _connector.cc:1170]
assertion failed: pem_root_certs != nullptr
Then, I can not find solution to get working version with google-cloud API.
I am using python version 2.7.14
I need your friendly help.
Thanks.
I had the same problem. If you are willing to distribute roots.pem with your executable (just search for the file - it should be buried deep within the installation directory of grpcio), I had luck fixing this by setting GRPC_DEFAULT_SSL_ROOTS_FILE_PATH environment variable to the full path of this roots.pem file.
Update 2021
To anyone who is experiencing this issue. I got it working thanks to these amazing people. See the full conversation on this github issue.
Here is the link
Step 1
Credits to #cbenhagen & #rising-stark on this github link.
A PyInstaller hook called hook-grpc.py looking like this would do the trick:
Create a python file named hook-grpc.py with this code.
from PyInstaller.utils.hooks import collect_data_files
datas = collect_data_files('grpc')
Step 2
Put the hook-grpc.py file in your \site-packages\PyInstaller\hooks directory of the python environment you are running on. So basically you can find it at
C:\Users\yourusername\AppData\Local\Programs\Python\Python37\Lib\site-packages\PyInstaller\hooks
Note:
Just change the yourusername and Python37 to your
respective username and python version you are using.
For Anaconda users it might be different. Check this site
to find the anaconda python environment path you are using.
Step 3
Once you've done that you can now convert your .py python program to .exe using pyinstaller and it should work.
This looks to me like a SSL credentials mistake. I think you are not being allowed to GC. Check this code snippet and this documentation.

How to retrain image on Windows

I'm a freshman, and have just started my trip toward machine learning. I followed a book and the video tutorial of Josh Gordon (https://www.youtube.com/watch?v=cSKfRcEDGUs), but was stopped at "TensorFlow for poets", in which says:
# In Docker
python tensorflow/examples/image_retraining/retrain.py \
--bottleneck_dir=/tf_files/bottlenecks \
--how_many_training_steps 500 \
--model_dir=/tf_files/inception \
--output_graph=/tf_files/retrained_graph.pb \
--output_labels=/tf_files/retrained_labels.txt \
--image_dir /tf_files/flower_photos
And I got 2 problems here:
there's no such directory called 'image_retraining' nor file called retrain.py;
the docker can't be opened.
The first problem seems easy to solve as I found the Tensorflow Retrain on Windows,
but the second one remain unsolved. Every time I start the "Boot2DockerStart", it will flash an error saying 'error in run: Failed to start machine "boot2docker-vm": exit status 1' and then quit. So I searched, most answers are saying that the Virtualization is disabled, but I checked that though the Task Manager, On which the Virtualization Status is 'Enable', which really confused me...
So I wonder: How to fix the docker problem? Is there a way that can run the Retrain without docker? And, if both the problems are difficult to solve, am I supposed to install a linux?
P.S. I'm using Win10, python version is 3.5 which is installed using Anaconda and coding in VS2015, tensorflow version is gpu-0.12.1
You can see a more complete set of instructions in "TensorFlow For Poets - Setting up" (for Linux and Mac)
On Windows, make sure your Docker Toolbox (the one using Boot2docker) is properly setup.
Make sure, on Windows 10, that you don't have the Hyper-V Windows already activated, as both Hyper-V and VirtualBox have some issues running together.

Categories