I’m trying to install Miniconda on a debian linux, running on Arm Cortex A-53.
I’ve downloaded Miniconda3-latest-Linux-aarch64.sh, and now trying to install using
bash Miniconda3-latest-Linux-aarch64.sh
Getting the following error:
[/home/analog/miniconda3] >>>
PREFIX=/home/analog/miniconda3
Unpacking payload …
Miniconda3-latest-Linux-aarch64.sh: line 406: /home/analog/miniconda3/conda.exe: No such file or directory
Miniconda3-latest-Linux-aarch64.sh: line 409: /home/analog/miniconda3/preconda.tar.bz2: No such file or directory
Any ideas?
It’s strange that there is a conda.exe involved on a linux…
Additional Info
Tried running as root - same behavior.
Trying to install full Anaconda - same behavior.
Sanity Check:
Running uname -m returns "aarch64"
Checking the created directory with ls -l confirms that there is a conda.exe file present there.
Related
I have a library that told me that my Python3.5 provided by my google cloud hosted virtual machine wassn't sufficient:
(scr_env) mikempc3#instance-1:~/scrapy-scraper$ scrapy crawl nosetime -a /pinpai/2-a.html
/home/mikempc3/scrapy-scraper/scr_env/lib/python3.5/site-packages/OpenSSL/crypto.py:12: CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release of cryptography. Please upgrade your Python.
from cryptography import x509
Usage
=====
scrapy crawl [options] <spider>
crawl: error: Invalid -a value, use -a NAME=VALUE
So I downloaded Python3.6.5 because it worked locally for the project I'm doing but I'm not yet able to use the virtual environment I created, necessary to run my scrapy scraper.
mikempc3#instance-1:~/scrapy-scraper/nosetime_scraper$ virtualenv -p /tmp/Python36/Python-3.6.5 scr_env36
RuntimeError: failed to query /tmp/Python36/Python-3.6.5 with code 13 err: 'Permission denied'
mikempc3#instance-1:~/scrapy-scraper/nosetime_scraper$ sudo virtualenv -p /tmp/Python36/Python-3.6.5 scr_env36
RuntimeError: failed to query /tmp/Python36/Python-3.6.5 with code 13 err: 'Permission denied'
mikempc3#instance-1:~/scrapy-scraper/nosetime_scraper$ virtualenv mypython
created virtual environment CPython3.6.5.final.0-64 in 833ms
creator CPython3Posix(dest=/home/mikempc3/scrapy-scraper/nosetime_scraper/mypython, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/mikempc3/.local/share/virtualenv)
added seed packages: pip==20.2.4, setuptools==50.3.2, wheel==0.35.1
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
^C
mikempc3#instance-1:~/scrapy-scraper/nosetime_scraper$ virtualenv tes_env
created virtual environment CPython3.6.5.final.0-64 in 161ms
creator CPython3Posix(dest=/home/mikempc3/scrapy-scraper/nosetime_scraper/tes_env, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/mikempc3/.local/share/virtualenv)
added seed packages: pip==20.2.4, setuptools==50.3.2, wheel==0.35.1
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
mikempc3#instance-1:~/scrapy-scraper/nosetime_scraper$ tes_env/bin/activate
-bash: tes_env/bin/activate: Permission denied
mikempc3#instance-1:~/scrapy-scraper/nosetime_scraper$ sudo tes_env/bin/activate
sudo: tes_env/bin/activate: command not found
So how can I use the virtual environement created by my downloaded Python3.6
The first problem is yet only a warning. But it would be useful to upgrade your python. Python is a so wonderful technology, that you only command a pip upgrade and everything will be done, automatically to the latest stable, with each other compatible versions, and everything will run seamlessly; you can even upgrade python 2.6 to 3.9 without any problem. (irony)
It is very unlikely that it would be caused by some virtualization thingy. Upgrade your python. Activate should not be called so.
The activate script can not be called in this way. The correct call is
. x/bin/activate
and not x/bin/active. The difference is that the correct version commands your current shell to execute the commands/settings in x/bin/activate. The bad version (without the . prefix) starts a new shell, whose only task is to execute x/bin/activate as a script.
For the second, you need both read and execution access. For the first, you only need read access. This activate script, probably exactly on this reason, has no execution flag.
If a file has no execution flag, not even the root can execute it (but he can give +x for it on need). This is why it still did not work, even with sudo. (After a chmod +x tes_env/bin/activate, it had worked but the settings where applied in a subshell which exits after the command is run, so it had not done anything.)
Environment
Python 3.7
Mac OS Catalina 10.15
Problem
I am developing a software with Python for Mac OS X. I will compile it with Nuitka.
When I run my compiled program, it doesn't work.
When I was searching for solutions on Google, some people speak about checking the log system of the Mac OS.
So I found it here: Finder > Applications > Utilities > Console
The console is full of logs system messages. My problem is I don't know how can I filter all these logs to show only the ones connected to the execution of my software.
I use the logging module to create a log file for my python script but this log file is not produced. I guess program bug before it can create a log file.
Is there another way to check the logs?
Edit:
To compile my code, I execute this Nuitka command:
sudo python3 -m nuitka --standalone --plugin-enable=gevent --plugin-enable=qt-plugins --plugin-enable=pylint-warnings --show-progress --show-scons --follow-imports --recurse-all --windows-icon=phonebot_icon.icns MyApp.py
The result is 2 folders:
MyApp.build
MyApp.dist
MyApp.dist contains the executable file "MyApp" and some .so files.
From Finder, I can't browse MyApp.dist as it is seen as unknown file. So the only way to run the executable file is from terminal. I do:
sudo open MyApp
A new terminal window open and I get this output:
Last login: Thu Sep 3 12:46:32 on ttys001
/Users/gauthierbtz/Dropbox/cff/Python/MyApp/MyApp.dist/MyApp ; exit;
(base) gauthierbtz#MacBook-de-Gauthier ~ % /Users/gauthierbtz/Dropbox/cff/Python/MyApp/MyApp.dist/MyApp ; exit;
Password:
LSOpenURLsWithRole() failed for the application /Applications/MyApp.app with error -10810.
It looks like it try to go to Applications folder to open the MyApp.app which doesn't exist.
I have an out-of-tree Linux kernel module that I need to compile. When I execute "make" in the kernel module directory I am getting:
"fatal error: stdarg.h: No such file or directory"
Before starting the build I installed the header file based on my Linux distribution.
$sudo apt-get install kernel-headers-$(uname -r)
How can I solve this compilation error? (my distribution is Ubuntu 16.04 with linux-headers-4.15.0-42-generic)
I ran a search of stdarg.h with the "locate" command to see if I can sport the file on the system.
I got:
/usr/include/c++/5/tr1/stdarg.h
/usr/lib/gcc/i686-linux-gnu/5/include/cross-stdarg.h
/usr/lib/gcc/i686-linux-gnu/5/include/stdarg.h
...
It tells me there is at least one stdarg.h provided by the compiler.
I tried to include the path "/usr/lib/gcc/i686-linux-gnu/5/include" in the kernel module Makefile so stdarg.h can be picked up. It did not work (while building, another reference to stdarg.h in the official kernel header was not being resolved).
I finally created a symlink directly under:
/usr/src/linux-headers-4.15.0-42-generic/include
$sudo ln -s /usr/lib/gcc/i686-linux-gnu/5/include/stdarg.h stdarg.h
This was just enough to solve the compilation issue.
I am wondering if the kernel headers should come with an implementation of stdarg.h by default (that is the first time I encounter this issue). I have also read that the compiler provide one implementation and most of the time it is better to use the compiler version.
Updated note: if the above solution still does not solve the problem:
Before running make again, do a make clean. Do a ls -la in the folder and look for a ".cache.mk" file. If this is still there, remove it and run "make" again. It should solve the problem.
I had the same issue with CentOS 9, and the other answers didn't work for me. Apparently the problem is that in more recent kernels, it shouldn't be <stdarg.h> but <linux/stdarg.h>. With virtualbox guest additions 6.1.34, it correctly checks for kernel with a version of 5.15.0 or more. But my kernel is the 5.14.xx, meaning the include for stdarg.h is wrong.
Solving the issue
Dependencies
Install all the dependencies for the guest edition
gcc make perl kernel-devel kernel-headers bzip2 dkms
Installation
Run the Guest Addition installation like you would normally. It will fail by saying it is unable to compile the kernel modules. That's expected. It will copy all the file we need to the VM disk.
Editing
We now need to edit the erroneous files.
/opt/VBoxGuestAdditions-6.1.34/src/vboxguest-6.1.34/vboxguest/include/iprt/stdarg.h
/opt/VBoxGuestAdditions-6.1.34/src/vboxguest-6.1.34/vboxsf/include/iprt/stdarg.h
On line 48 (may change for different versions), it check for a version of Linux and select the correct header depending on the version. We need to replace if RTLNX_VER_MIN(5,15,0) with if RTLNX_VER_MIN(5,14,0) in both files.
Compile the kernel modules
We can now compile the kernel modules, and the error should be gone.
sudo rcvboxadd quicksetup all
I personally got an error the first time, but then I recompiled without changing anything and it worked.
Remember that it's just a workaround, it may not work with different versions.
If you using Arch Linux with zen-kernel:
sudo CPATH=/usr/src/linux-zen/include/linux vmware-modconfig --console --install-all
I had the same problem with VirtualBox 6.1.0 running archlinux with kernel 6.1.9.
I downloaded VirtualBoxGuestAdditions_7.2.0.iso file from https://download.virtualbox.org/virtualbox/7.0.2/ link(you may select more appropriate to your VirtualBox version) and assigned as an optical drive to virtualbox machine. After start of the system running blkid command on terminal showed the name of CD rom device which was /dev/sr0. then I created iso folder on
/mnt folder
mkdir /mnt/iso
and mounted cd drive to that folder
mount -o loop /dev/sr0 /mnt/iso
after I cd'ed to /mnt/iso
cd /mnt/iso
and manually run VirtualBoxGuestAdditions.run script
sh ./VirtualBoxGuestAdditions.run
which successfully compiled and istalled required virtualbox guest modules.
Now everytime I update kernel version I redo the same procedure. And it work fine.
It also remove old 6.1.0 guest additons folder.
Python 3.6 has been installed (using the Cygwin setup .exe file, update, etc.). The executable is located in /bin/ ... or is it located in /usr/bin/? Cygwin ls command shows that /usr/bin exists... but on Windows this directory is non-existent. Also the contents of both directories are identical, including if I change a filename... but I haven't as yet found a symlink (in /usr or in / ) to explain this!
I'm struggling to get virtualenvwrapper installed (this is part of a preparation required to follow along with a book, TDD With Python).
I just overcame a first hurdle (eventually) by realising I had to install virtualenvwrapper using pip3, not pip! ... I feel like I'm in at the deep end.
So I did:
pip3 install virtualenvwrapper
echo "source virtualenvwrapper.sh" >> ~/.bashrc
source ~/.bashrc
... then I did
mkvirtualenv --python3=`py -3.6 -c"import sys; print(sys.executable)"` superlists
(NB "python3" is the correct name of the symlink which points to the Python3 executable in /bin/; there is a "python" symlink but that points to Python2.7)
And I got:
Requested Python version (3.6) not installedUsing base prefix '/usr'
New python executable in
/home/Chris/.virtualenvs/superlists/bin/python3Also creating
executable in /home/Chris/.virtualenvs/superlists/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating
/home/Chris/.virtualenvs/superlists/bin/predeactivate
virtualenvwrapper.user_scripts creating
/home/Chris/.virtualenvs/superlists/bin/postdeactivate
virtualenvwrapper.user_scripts creating
/home/Chris/.virtualenvs/superlists/bin/preactivate
virtualenvwrapper.user_scripts creating
/home/Chris/.virtualenvs/superlists/bin/postactivate
virtualenvwrapper.user_scripts creating
/home/Chris/.virtualenvs/superlists/bin/get_env_details (superlists)
Anyone know what's going on? How do I get the system to recognise that Python3.6 is actually installed?
Later Or... am I being very dense? Maybe making a virtual environment using this module always involves installing a new Python executable?
Later still I'm still not clear about this... but it isn't stopping me from using virtualenv and virtualenvwrapper and generally getting on with the book. Despite complaining Python doesn't exist the setup appears (as far as I can tell!) to be using the symlinks under the directories in directory .virtualenv/ to one of the Python symlinks in /bin/ ...
About first question
/usr/bin and /usr/lib are by default also automatic mount points
generated by the Cygwin DLL similar to the way the root directory is
evaluated. /usr/bin points to the directory the Cygwin DLL is
installed in, /usr/lib is supposed to point to the /lib directory.
https://cygwin.com/cygwin-ug-net/using.html#mount-table
For the second, to check if phyton3 is installed
$ cygcheck -c python3
and as mentioned by phd the py command is not a cygwin one, so probably you are mixing something.
I am having trouble getting PhantomJS and CasperJS working within the cygwin environment. I am very new to cygwin. I was able to download both packages for windows and run them via windows cmd.
To get them to work with Cygwin, I tried the following:
I downloaded the tar/zip files for both PhantomJS and CasperJS, I copied the contents on the "bin" folders into C:\cygwin\bin. But when I type in phantomjs on cygwin I get:
/usr/bin/phantomjs: cannot execute binary file
Then, I tried to do:
pip install git+git://github.com/ariya/phantomjs
but after waiting for a while I get the following response:
Downloading/unpacking git+git://github.com/ariya/phantomjs Cloning
git://github.com/ariya/phantomjs to /tmp/pip-dCF1oZ-build Running
setup.py egg_info for package from
git+git://github.com/ariya/phantomjs
Traceback (most recent call last):
File "", line 16, in
IOError: [Errno 2] No such file or directory: '/tmp/pip-dCF1oZ-build/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 16, in
IOError: [Errno 2] No such file or directory:
'/tmp/pip-dCF1oZ-build/setup.py'
---------------------------------------- Command python setup.py egg_info failed with error code 1 in /tmp/pip-dCF1oZ-build Storing
complete log in /home/tkondapalli/.pip/pip.log
Does any one have any advice on how to get this working? Does anyone use PhantomJS/CasperJS in the cygwin environment?
Also, I thought the .exe I am downloading and copying into the C:\cygwin\bin directory is the one for linux, so maybe that doesn't work? So this means that I need to compile from source on cygwin...
So, I started following directions for building phantomjs: http://phantomjs.org/build.html
The first thing we need to do is build OpenSSL for devel, but again I don't know how to do this for cygwin! So I just skipped this step for now, which is probably not right.
I did download the source from github and tried to build it. It failed with the follow error:
Makefile:217: recipe for target `qtemporaryfile.o' failed make: *
[qtemporaryfile.o] Error 1 make: * Waiting for unfinished jobs....
make: *** No targets specified and no makefile found. Stop.
./build.sh: line 90: src/qt/bin/qmake: No such file or directory
Earlier I had downloaded the executables for Linux, so it was not working. This time I downloaded the executables for windows and put it in C:/cygwin/bin, and it worked!
I don't understand why I would need to download the windows executable, when cygwin is a linux emulator. This confuses me, but at least it works now!
From the Cygwin website:
Cygwin is not: a way to run native Linux apps on Windows. You must rebuild your application from source if you want it to run on Windows.
Every applications needs to be rebuilt in order to be use on Windows (as it does not produce an elf file, but .exe file that requires the cygwin dll).
Nevertheless, the shell in cygwin can execute any windows's .exe file (such as ping, ipconfig, cmd, etc.), which is why you are able to run the windows version of PhantomJS under cygwin.
First, download and install Node.js from http://nodejs.org/download
Close and reopen Cygwin and type:
$ npm install -g phantomjs
$ npm install -g casperjs
Just ran into this issue, placing the phantomjs executable in C:/cygwin/bin solved everything. After that all you need to do is run the command C:/cygwin/bin/phantomjs to initialize the application.
Although Cygwin doesn't replace the standard cmd prompt, it is pretty useful!