Python 创建requirements.txt而不使用@~~~东西
我想使用Python 创建requirements.txt而不使用@~~~东西,python,pip,conda,requirements.txt,Python,Pip,Conda,Requirements.txt,我想使用pip freeze>requirements.txt命令创建requirements.txt,并复制到Google Drive以在Google Colab中使用,但出现如下错误: ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/C:/ci/astroid_1592481955828/work' 因此,我打开了requirements
pip freeze>requirements.txt
命令创建requirements.txt,并复制到Google Drive以在Google Colab中使用,但出现如下错误:
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/C:/ci/astroid_1592481955828/work'
因此,我打开了requirements.txt
,在以@文件开头的模块名称后面有一些奇怪的东西:\\\~
这是一个例子
requirements.txt
~~~
jupyter-core==4.6.3
jupyterlab==2.2.6
jupyterlab-server @ file:///tmp/build/80754af9/jupyterlab_server_1594164409481/work
Keras==2.3.1
Keras-Applications @ file:///tmp/build/80754af9/keras-applications_1594366238411/work
Keras-Preprocessing==1.1.0
kiwisolver==1.2.0
~~~
我使用Anaconda安装了这些模块,并将其存储在名为“TensorFlow”的虚拟环境中
是否可以删除模块名称后面的@文件:\\\~
内容,或者我应该如何解决此问题
谢谢。是的,删除
@文件:\\\
,以后尝试conda list-e>requirements.txt而不是pip
,然后再次在conda中使用该文件,因此conda create--name--file requirements.txt如果您使用的是conda,pip freeze
不太可能正常工作。可以删除@文件:\\\