Windows Theano Keras - lazylinker_ext\mod.cpp: No such file or directory

2024/10/13 17:14:17

I am installing Theano and Keras follwing the How do I install Keras and Theano in Anaconda Python on Windows?, which worked fine for me with an older release before. Now I have upgraded to the latest Theano version and when validating its functionality using this command:

Python:

 from theano import function, config, shared, sandbox

it resulted in really long error log containing:

g++.exe: error: C:\Users\John: No such file or directory
g++.exe: error: Dow\AppData\Local\Theano\compiledir_Windows-10-10.0.10240-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.12-64\lazylinker_ext\mod.cpp: No such file or directory

It seems the path to user directory "John Dow" was splitted by g++ to two file paths, since there is space in the name.

Is there any way how to tell python to not to use the "C:\Users\John Dow" directory but e.g. "C:\mytempdir". Setting the USERPROFILE windows variable didn't help.

NOTE: I managed to fix the g++ command, where it failed (by adding quotes to the output), which successfully compiled the sources. Unfortunately it didnt solve my problem, since when started again, it fails on this step. It seems also to be an issue of Theano, since swithcing to different Python version didnt help.

Answer

Answer is from here: Theano: change `base_compiledir` to save compiled files in another directory

i.e. in ~/.theanorc file (or create it) add this line :

[global]
base_compiledir=/some/path
https://en.xdnf.cn/q/118053.html

Related Q&A

Python Threading: Making the thread function return from an external signal

Could anyone please point out whats wrong with this code. I am trying to return the thread through a variable flag, which I want to control in my main thread. test27.pyimport threading import timelock …

Python join data lines together

Hello i have dataset a few thousand lines which is split in even and odd number lines and i cant find a way to join them together again in the same line. Reading the file and overwriting it is fine or …

How to undraw plot with Zelle graphics?

This is a code problem for Python 3.5.2 using John Zelles graphics.py:I have spent a good amount of time looking for the answer here, but just can not figure it out. The function undraw() exists just l…

/bin/sh: line 62: to: command not found

I have a python code in which I am calling a shell command. The part of the code where I did the shell command is:try:def parse(text_list):text = \n.join(text_list)cwd = os.getcwd()os.chdir("/var/…

Using PyMySQL with MariaDB

I have read this article about switching from MySQL to MariaDB on Ubuntu. The article claims that it would be not problem to switch between the two. Currently, I am using PyMySQL to connect to my MySQL…

Overloading str in Python

I have code that looks like the following:class C(str):def __init__(self, a, b):print(init was called!)super().__init__(b)self.a = ac = C(12, c)When I try to run it, it gives me the following error:Tra…

Why cant I install Pillow on my mac? It gives some errors

here is the error from installing Pillow. Im using OS X Mavericks. I tried installing Pillow through pip install.._imaging.c:391:28: warning: implicit conversion loses integer precision: long to int [-…

what on earth the unicode number is?

in python:>>> "\xc4\xe3".decode("gbk").encode("utf-8") \xe4\xbd\xa0 >>> "\xc4\xe3".decode("gbk") u\u4f60we can get two conclusions:1.…

explicitly setting style sheet in python pyqt4?

In pyqt standard way for setting style sheet is like this:MainWindow.setStyleSheet(_fromUtf8("/*\n" "gridline-color: rgb(85, 170, 255);\n" "QToolTip\n" "{\n" &qu…

missing required Charfield in django is saved as empty string and do not raise an error

If I try to save incomplete model instance in Django 1.10, I would expect Django to raise an error. It does not seem to be the case.models.py:from django.db import modelsclass Essai(models.Model):ch1 =…