PyCharm.创建工程时使用本地现有的Python里面的site-packages

本文详细介绍了在PyCharm中解决重复安装TensorFlow问题的方法,包括如何正确配置Python包路径,选择合适的虚拟环境,以及如何使TensorFlow对所有项目可用。此外,还探讨了PyCharm中'Virtualenv'、'Pipenv'和'Conda'等不同环境的使用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ZC:我遇到的问题:每次用PyCharm创建一个新的工程的时候,都要用PyCharm安装 tensorflow 又慢又烦...于是想找 PyCharm 导入本地tensorflow的方法,但是搜到的 用的 Anaconda里面的 tensorflow目录下python.exe,但是我的 路径"C:\Program Files\Python37\Lib\site-packages\tensorflow"下 连 exe都么有... 后来自己找到了下面的设置处,记录下来

ZC:据说 Anaconda装 Tnesorflow很方便,还没用过...

 

1、Python 的包的位置:C:\Program Files\Python37\Lib\site-packages

2、

 

 ZC:红框处的两个地方,"Inherited global site-packages" 和 "Make available to all projects",后面这个 不知道要不要 "√"选,但是 前面一个 肯定要 "√"选。

 

3、下面 图中 红色箭头指向的3个选项:"Virtualenv"、"Pipenv"、"Conda" 不知道有何差别联系,也不知道怎么用它们... 现在新建工程都是使用的默认的 "Virtualenv"...

  

 

4、

5、

 

转载于:https://www.cnblogs.com/pythonzc/p/11308465.html

Traceback (most recent call last): File "D:\Python\PyCharm 2024.2.4\PythonCode\zufang\inder.py", line 18, in <module> from seleniumwire import webdriver File "D:\Python\PyCharm 2024.2.4\PythonCode\zufang\.venv\Lib\site-packages\seleniumwire\webdriver.py", line 28, in <module> from seleniumwire import backend, utils File "D:\Python\PyCharm 2024.2.4\PythonCode\zufang\.venv\Lib\site-packages\seleniumwire\backend.py", line 4, in <module> from seleniumwire.server import MitmProxy File "D:\Python\PyCharm 2024.2.4\PythonCode\zufang\.venv\Lib\site-packages\seleniumwire\server.py", line 5, in <module> from seleniumwire.handler import InterceptRequestHandler File "D:\Python\PyCharm 2024.2.4\PythonCode\zufang\.venv\Lib\site-packages\seleniumwire\handler.py", line 5, in <module> from seleniumwire import har File "D:\Python\PyCharm 2024.2.4\PythonCode\zufang\.venv\Lib\site-packages\seleniumwire\har.py", line 11, in <module> from seleniumwire.thirdparty.mitmproxy import connections File "D:\Python\PyCharm 2024.2.4\PythonCode\zufang\.venv\Lib\site-packages\seleniumwire\thirdparty\mitmproxy\connections.py", line 10, in <module> from seleniumwire.thirdparty.mitmproxy.net import tls, tcp File "D:\Python\PyCharm 2024.2.4\PythonCode\zufang\.venv\Lib\site-packages\seleniumwire\thirdparty\mitmproxy\net\tls.py", line 15, in <module> import seleniumwire.thirdparty.mitmproxy.options File "D:\Python\PyCharm 2024.2.4\PythonCode\zufang\.venv\Lib\site-packages\seleniumwire\thirdparty\mitmproxy\options.py", line 5, in <module> from seleniumwire.thirdparty.mitmproxy import optmanager File "D:\Python\PyCharm 2024.2.4\PythonCode\zufang\.venv\Lib\site-packages\seleniumwire\thirdparty\mitmproxy\optmanager.py", line 9, in <module> import blinker._saferef ModuleNotFoundError: No module named 'blinker._saferef'
最新发布
06-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值