conda

How to activate conda environment in jenkins build

那年仲夏 提交于 2019-12-05 22:12:53
问题 I need to run jenkins build using a specific conda environment on our jenkins server (running on Windows). I thought it would be as easy as running: activate myenv python test_env.py but this seems to cause the build to exit instead, before the script even starts. Here is the jenkins console log: activate myenv Activating environment "myenv"... Finished: SUCCESS If I remove the activate line, the python script executes fine. FYI, the script I am running: import os f = open('env.txt','w') for

Huge errors trying numba

試著忘記壹切 提交于 2019-12-05 22:03:21
I'm running into a big load of errors using numba. Ironically, the correct result is printed after the errors. I'm using the newest Anaconda python and installed numba with conda install numba once on Ubuntu 13, 64 bit and also anaconda 64 bit and on windows 64 bit with a 32 bit version of anaconda. The script I'm trying to execute is: # -*- coding: utf-8 -*- import math from numba import autojit pi = math.pi @autojit def sinc(x): if x == 0.0: return 1.0 else: return math.sin(x*pi)/(pi*x) if __name__ == '__main__': a = 4.5 print sinc(a) and the errors I get are: DEBUG -- translate:361

pytorch的ModuleNotFoundError: No module named 'torch'

让人想犯罪 __ 提交于 2019-12-05 21:37:53
我的问题是python安装版本和torch的版本不对应问题 pytorch 0.3.1 py36_cuda9.0.176_cudnn7.0.5_2 [cuda90] pytorch python 3.7.3 h0371630_0 在conda中对python的版本进行指定的修改,将3.7版本将为3.6版本 conda update python=3.6 Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import torch >>> exit() 总之,torch还是tensorflow都是 和python有版本的对应关系 的,新手都应该注意。 来源: CSDN 作者: 福桐 链接: https://blog.csdn.net/weixin_40597170/article/details/94719005

Mac在jupyter notebook导入torch出错:ModuleNotFoundError: No module named 'torch' 解决方法

廉价感情. 提交于 2019-12-05 21:37:35
本机上已经装好了pytorch,但是在jupyter notebook导入torch时却提示“No module named 'torch' ”,以下是解决办法。 $conda update conda $conda install mkl=2018 就可以成功导入啦~ 参考: https://github.com/pytorch/pytorch/issues/4827 来源: CSDN 作者: 甜果果2333 链接: https://blog.csdn.net/qq_39362996/article/details/86569156

How to resolve: ModuleNotFoundError: No module named 'google.colab'

孤街醉人 提交于 2019-12-05 21:36:48
I want to run the command: from google.colab import auth But I am getting this error: ModuleNotFoundError: No module named 'google.colab' This is required for accessing files on google drive from python. There is a package google but not module colab in it. How to resolve this error? AFAIK, you can execute the module 'google.colab' from within colab.research.google.com Looking at the tag conda in your question. I assume that you are running the code from your local machine. Please make use of PyDrive to read from google drive on your local machine. References: Google Colaboratory FAQ PyDrive

no module named cv2

依然范特西╮ 提交于 2019-12-05 20:10:48
出现这个问题,是在Python中调用opencv的模块时出现: import cv2 解决办法有多种,从简单到复杂排列下来,是: 1. 使用pip pip install opencv-python 2. 使用conda 使用conda管理多个python版本、多个python环境,是非常方便的。conda下依然可以用pip,也可以用conda来安装: conda install opencv 3. 利用apt/brew等系统包管理工具来安装 sudo apt install python-opencv 当然,brew比apt好一些,版本什么的都可以选的。 4. Windows下使用cv2.pyd 下载OpenCV的Windows预编译包,例如opencv-3.4.5,里面的子目录,找到对应版本的cv2.xxx.pyd文件: 拷贝到执行程序的当前目录,或者拷贝到python安装包下的DLL目录,e.g. E:\soft\Miniconda3\DLLs 然后重开cmd / powershell以生效 5. 手动编译OpenCV源码,生成python的.so/.pyd文件 在Linux下生成.so,在Windows下生成.pyd。这个方法是最费力的方法,当然如果你平时用OpenCV的C/C++接口,这个方法对你来说并不难。 来源: https://www.cnblogs.com

PyCharm: ImportError when importing any module that imports ssl

我的梦境 提交于 2019-12-05 19:59:58
I am unable to debug code or run a Python console due to an inability to import ssl . I get this behavior when using two Anaconda virtual environments I have created. For example when I attempt to debug Python code that uses boto3 I see the following error: C:\home\miniconda\envs\scw\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.4\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 57111 --file C:/home/git/onvif_interact/onvif_interact/notifications.py --config C:\home\data\pullpoint\camera_desk.ini pydev debugger: process 22816 is

How to manage two pip versions in conda?

白昼怎懂夜的黑 提交于 2019-12-05 19:43:07
问题 I am working with conda in Windows. I accidentally installed two versions of pip using python -m pip install --upgrade pip Now when I run conda list from the base env: While pip -version gives pip 10.0.0 If I create a new env with conda create --name py3 pip and run pip --version I get an ImportError, however python -m pip --version works: How can I resolve this? 回答1: First of all I tried to replicate your issue and when I updated pip to 10.0.1 using python -m pip install --upgrade pip , the

anaconda

亡梦爱人 提交于 2019-12-05 19:06:57
two install failure because of bad install package, may be because the package in the tsinghua mirror is updating, anyway I should see the package more clearly and persist to download them from tsinghua mirror. the pipeline of installation of Anaconda3 of linux version from tsinghua mirror 1. download the package named Anaconda3-2019.10-Linux-x86_64.sh in the tsinghua mirror 2. copy the package in the host machine to the virtual machine 3. bash ~/Anaconda3-2019.10-Linux-x86_64.sh 4. Enter (begin) 5. Enter yes (accept terms. It will let you reinput if you directly Enter) 6. Enter (accept

Conda can't activate environment

你。 提交于 2019-12-05 18:55:17
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users>conda env list # conda environments: # deepdream C:\Users\AppData\Local\Continuum\Anaconda32\env s\deepdream pd16.2 C:\Users\AppData\Local\Continuum\Anaconda32\env s\pd16.2 root * C:\Users\AppData\Local\Continuum\Anaconda32 C:\Users>activate deepdream No environment named "deepdream" exists in C:\Users\AppData\Local\Continuum\Anaconda32\envs C:\Users> I've made an environment for the deepdream code and I'm unable to activate this through the command prompt. Seems like conda recognizes