How do you use a Python package such as Tensorflow
or Keras
if you cannot install the package on the drive on which pip
always saves the packages?
如果你不能在pip总是保存包的驱动器上安装包,你如何使用Tensorflow或Keras等Python包?
I'm a student at a university and we don't have permission to write to the C
drive, which is where pip works out of (I get a you don't have write permission error when installing packages through pip or conda`).
我是大学的学生,我们没有权限写C盘,这是pip工作的地方(通过pip或conda`安装包时,我得到你没有写权限错误) 。
I do have memory space available on my user drive, which is separate from the C
drive (where the OS is installed).
我的用户驱动器上有可用的内存空间,它与C驱动器(安装操作系统的地方)分开。
So, is there any way I can use these Python libraries without it being installed?
那么,有没有什么方法可以使用这些Python库而不安装它们?
Maybe I can install the package on my user drive and ask the compiler to access it from there? I'm just guessing here, I have no knowledge of how this works.
也许我可以在我的用户驱动器上安装软件包并要求编译器从那里访问它?我只是在这里猜测,我不知道它是如何工作的。
1 个解决方案
#1
0
- install conda
- create new environment (conda create --name foobar python=3.x list of packages
- use anaconda to activate foobar (activate foobar)
- check pip location by typing in cmd 'where pip' to be sure you use pip from withing the python from withing the foobar environment and not the default python installed in your system outside of your conda environment
创建新环境(conda create --name foobar python = 3.x包列表
使用anaconda激活foobar(激活foobar)
通过在cmd'where pip'中键入来检查pip位置,以确保使用pip来支持python来处理foobar环境,而不是在conda环境之外的系统中安装的默认python
and next use the pip from above location to install requested library into your environment.
然后使用上面位置的点来将所请求的库安装到您的环境中。
ps. you may want to consider to install Cygwin on your Windows machine to get use to work with Linux environment.
PS。您可能需要考虑在Windows机器上安装Cygwin以使用Linux环境。
#1
0
- install conda
- create new environment (conda create --name foobar python=3.x list of packages
- use anaconda to activate foobar (activate foobar)
- check pip location by typing in cmd 'where pip' to be sure you use pip from withing the python from withing the foobar environment and not the default python installed in your system outside of your conda environment
创建新环境(conda create --name foobar python = 3.x包列表
使用anaconda激活foobar(激活foobar)
通过在cmd'where pip'中键入来检查pip位置,以确保使用pip来支持python来处理foobar环境,而不是在conda环境之外的系统中安装的默认python
and next use the pip from above location to install requested library into your environment.
然后使用上面位置的点来将所请求的库安装到您的环境中。
ps. you may want to consider to install Cygwin on your Windows machine to get use to work with Linux environment.
PS。您可能需要考虑在Windows机器上安装Cygwin以使用Linux环境。